diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-06-05 13:46:29 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-06-05 13:46:29 -0500 |
commit | f49835864541e39f42ed6b06feabbdbcd8d3eac2 (patch) | |
tree | b46d109841d0eb3bb37a9af21e29e50caf1eed51 | |
parent | d2b044691c8c13c5b6f66ffdea492be9451053c4 (diff) | |
download | ayatana-indicator-session-f49835864541e39f42ed6b06feabbdbcd8d3eac2.tar.gz ayatana-indicator-session-f49835864541e39f42ed6b06feabbdbcd8d3eac2.tar.bz2 ayatana-indicator-session-f49835864541e39f42ed6b06feabbdbcd8d3eac2.zip |
In device-menu-mgr, remove unused context from show_system_settings_with_context()
-rw-r--r-- | src/device-menu-mgr.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index 5a31716..a76ecd5 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -71,10 +71,9 @@ static void setup_up (DeviceMenuMgr* self); static void device_menu_mgr_rebuild_items (DeviceMenuMgr *self); static void machine_sleep_with_context (DeviceMenuMgr* self, gchar* type); -static void show_system_settings_with_context (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type); - +static void show_system_settings (DbusmenuMenuitem * mi, + guint timestamp, + gpointer userdata); static void machine_sleep_from_hibernate (DbusmenuMenuitem * mi, guint timestamp, @@ -393,23 +392,18 @@ show_dialog (DbusmenuMenuitem * mi, guint timestamp, gchar * type) } static void -show_system_settings_with_context (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type) +show_system_settings (DbusmenuMenuitem * mi G_GNUC_UNUSED, + guint timestamp G_GNUC_UNUSED, + gpointer user_data G_GNUC_UNUSED) { - gchar * control_centre_command = g_strdup_printf("%s %s", - "gnome-control-center", - type); - - g_debug("Command centre exec call '%s'", control_centre_command); + const char * const cmd = "gnome-control-center"; GError * error = NULL; - if (!g_spawn_command_line_async(control_centre_command, &error)) + if (!g_spawn_command_line_async (cmd, &error)) { g_warning("Unable to show dialog: %s", error->message); g_error_free(error); } - g_free(control_centre_command); } static void @@ -421,7 +415,7 @@ device_menu_mgr_build_settings_items (DeviceMenuMgr* self) _("System Settingsā¦")); g_signal_connect (G_OBJECT(system_settings_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(show_system_settings_with_context), ""); + G_CALLBACK(show_system_settings), NULL); dbusmenu_menuitem_child_add_position(self->root_item, system_settings_menuitem, 0); |