diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-06-19 12:23:58 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-06-19 12:23:58 -0500 |
commit | e19572fc77c5b80144bdbbcf9040b5a66eb4fa37 (patch) | |
tree | 4f51b20d942c12f4937090256a056d54b64dbba0 | |
parent | 7c5b6382ccb5d557a33c2f8bd6d41e7b474fdcd1 (diff) | |
download | ayatana-indicator-session-e19572fc77c5b80144bdbbcf9040b5a66eb4fa37.tar.gz ayatana-indicator-session-e19572fc77c5b80144bdbbcf9040b5a66eb4fa37.tar.bz2 ayatana-indicator-session-e19572fc77c5b80144bdbbcf9040b5a66eb4fa37.zip |
action_func_spawn_async() doesn't need a varargs argument anymore.
-rw-r--r-- | src/session-menu-mgr.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c index d676337..ccc27de 100644 --- a/src/session-menu-mgr.c +++ b/src/session-menu-mgr.c @@ -131,7 +131,7 @@ static void action_func_switch_to_lockscreen (SessionMenuMgr *); static void action_func_switch_to_greeter (SessionMenuMgr *); static void action_func_switch_to_guest (SessionMenuMgr *); static void action_func_switch_to_user (AccountsUser *); -static void action_func_spawn_async (const char * fmt, ...); +static void action_func_spawn_async (const char * cmd); static gboolean is_this_guest_session (void); static gboolean is_this_live_session (void); @@ -952,22 +952,17 @@ update_user_menuitems (SessionMenuMgr * mgr) ***/ static void -action_func_spawn_async (const char * fmt, ...) +action_func_spawn_async (const char * cmd) { - va_list marker; - va_start (marker, fmt); - gchar * cmd = g_strdup_vprintf (fmt, marker); - va_end (marker); - GError * error = NULL; + g_spawn_command_line_async (cmd, &error); + if (error != NULL) { g_warning ("Unable to execute \"%s\": %s", cmd, error->message); g_clear_error (&error); } - - g_free (cmd); } /* Calling "Lock" locks the screen & goes to black. |