aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2011-07-01 12:20:00 +0100
committerJavier Jardón <javier.jardon@codethink.co.uk>2011-07-01 12:20:00 +0100
commitc38905ea640e081824cde487a600f00ef8c74bf8 (patch)
tree733435f96abf00c1b0a261ecf49812b5c3c04b4c
parent637b5cd3ba793be0ffa22955d4570d152733a363 (diff)
downloadayatana-indicator-power-c38905ea640e081824cde487a600f00ef8c74bf8.tar.gz
ayatana-indicator-power-c38905ea640e081824cde487a600f00ef8c74bf8.tar.bz2
ayatana-indicator-power-c38905ea640e081824cde487a600f00ef8c74bf8.zip
Activate the use of icons in the menu
-rw-r--r--src/indicator-power.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index dee5793..acaa822 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -424,14 +424,19 @@ static void
build_menu (IndicatorPower *self)
{
IndicatorPowerPrivate *priv = self->priv;
+ GtkWidget *icon;
GtkWidget *item;
GtkWidget *image;
guint n_devices = 1; /*TODO*/
priv->menu = GTK_MENU (gtk_menu_new ());
- item = gtk_image_menu_item_new_from_stock ("battery", NULL);
+ icon = gtk_image_new_from_icon_name ("battery", GTK_ICON_SIZE_MENU);
+
+ item = gtk_image_menu_item_new ();
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), icon);
gtk_menu_item_set_label (GTK_MENU_ITEM (item), "Battery Remaining: 0:45s"); /*TODO*/
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (item), TRUE);
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (show_info_cb), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (priv->menu), item);