Document code, fixes #3

This commit is contained in:
2017-07-14 17:23:42 +02:00
parent 87eba7e3a8
commit bdcf8b0436
17 changed files with 383 additions and 16 deletions

View File

@@ -1,3 +1,5 @@
//! Helper functions for invoking system commands.
use errors::*;
use glib;
use prefs::Prefs;
@@ -6,6 +8,9 @@ use std;
/// Execute an available volume control command asynchronously, starting with
/// the preferences and using some fallback values. If none of these
/// are valid executables in `$PATH`, then return `Err(err)`.
pub fn execute_vol_control_command(prefs: &Prefs) -> Result<()> {
let m_cmd = prefs.get_avail_vol_control_cmd();
@@ -16,6 +21,7 @@ pub fn execute_vol_control_command(prefs: &Prefs) -> Result<()> {
}
/// Try to execute the given command asynchronously via gtk.
pub fn execute_command(cmd: &str) -> Result<()> {
return glib::spawn_command_line_async(cmd)
.map_err(|e| {