From 867f9fe6955aed2b63bf671f85ae403a6152db74 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 7 Jun 2012 10:36:13 -0500 Subject: remove some dead code. --- src/indicator-power.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/indicator-power.c b/src/indicator-power.c index 33f49e7..f3a7235 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -180,14 +180,6 @@ spawn_command_line_async (const char * command) g_clear_error (&err); } -static void -show_info_cb (GtkMenuItem *item, - gpointer data) -{ - /*TODO: show the statistics of the specific device*/ - spawn_command_line_async ("gnome-power-statistics"); -} - static void option_toggled_cb (GtkCheckMenuItem *item, IndicatorPower * self) { @@ -195,13 +187,6 @@ option_toggled_cb (GtkCheckMenuItem *item, IndicatorPower * self) gtk_check_menu_item_get_active(item)); } -static void -show_preferences_cb (GtkMenuItem *item, - gpointer data) -{ - spawn_command_line_async ("gnome-control-center power"); -} - /* ensure that the entry is using self's accessible description */ static void refresh_entry_accessible_desc (IndicatorPower * self, IndicatorObjectEntry * entry) @@ -289,8 +274,8 @@ menu_add_device (GtkMenu * menu, const IndicatorPowerDevice * device) gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); added = TRUE; - g_signal_connect (G_OBJECT (item), "activate", - G_CALLBACK (show_info_cb), NULL); + g_signal_connect_swapped (G_OBJECT (item), "activate", + G_CALLBACK (spawn_command_line_async), "gnome-power-statistics"); g_free (short_details); g_free (details); @@ -356,8 +341,8 @@ build_menu (IndicatorPower *self) item = gtk_image_menu_item_new_with_label (_("Power Settingsā€¦")); image = gtk_image_new_from_icon_name (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); - g_signal_connect (G_OBJECT (item), "activate", - G_CALLBACK (show_preferences_cb), NULL); + g_signal_connect_swapped (G_OBJECT (item), "activate", + G_CALLBACK (spawn_command_line_async), "gnome-control-center power"); gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), item); } -- cgit v1.2.3