aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-06-07 10:36:13 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-06-07 10:36:13 -0500
commit867f9fe6955aed2b63bf671f85ae403a6152db74 (patch)
treeddf47f94890a8a070c1d396a4873481ffd4d1a13 /src
parent8b31b764a1f13c4f1651790157712794c11ea8d4 (diff)
downloadayatana-indicator-power-867f9fe6955aed2b63bf671f85ae403a6152db74.tar.gz
ayatana-indicator-power-867f9fe6955aed2b63bf671f85ae403a6152db74.tar.bz2
ayatana-indicator-power-867f9fe6955aed2b63bf671f85ae403a6152db74.zip
remove some dead code.
Diffstat (limited to 'src')
-rw-r--r--src/indicator-power.c23
1 files 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
@@ -181,27 +181,12 @@ spawn_command_line_async (const char * command)
}
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)
{
gtk_widget_set_visible (GTK_WIDGET (self->priv->label),
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);
}