aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Cimitan <andrea.cimitan@gmail.com>2010-07-22 19:20:43 +0200
committerAndrea Cimitan <andrea.cimitan@gmail.com>2010-07-22 19:20:43 +0200
commit27df2717d21625ebde66fba258896513567810c5 (patch)
tree145c0d1f051bdb438298060c990391cb205a625c /src
parente77cd1f8cb84fa071b386fecde846bff24d15452 (diff)
downloadayatana-indicator-messages-27df2717d21625ebde66fba258896513567810c5.tar.gz
ayatana-indicator-messages-27df2717d21625ebde66fba258896513567810c5.tar.bz2
ayatana-indicator-messages-27df2717d21625ebde66fba258896513567810c5.zip
Fixed position of sub menu indicators (the one with the counter on the right)
Diffstat (limited to 'src')
-rw-r--r--src/indicator-messages.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index adfba93..dd90318 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -570,8 +570,12 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm
if (resized_pixbuf != pixbuf) {
g_object_unref(resized_pixbuf);
}
+
+ /* Add the icon only if present. */
+ gtk_misc_set_alignment(GTK_MISC(mi_data->icon), 0.0, 0.5);
+ gtk_box_pack_start(GTK_BOX(hbox), mi_data->icon, FALSE, FALSE, padding);
+ gtk_widget_show(mi_data->icon);
}
- gtk_widget_show(mi_data->icon);
/* Label, probably a username, chat room or mailbox name */
mi_data->label = gtk_label_new(dbusmenu_menuitem_property_get(newitem, INDICATOR_MENUITEM_PROP_LABEL));
@@ -595,12 +599,6 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm
gtk_box_pack_start(GTK_BOX(hbox), mi_data->right, FALSE, FALSE, padding + font_size/2.0);
gtk_widget_show(mi_data->right);
- /* Build up the running icon */
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(gmi), mi_data->icon);
-
- /* Make sure it always appears */
- gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(gmi), TRUE);
-
gtk_container_add(GTK_CONTAINER(gmi), hbox);
gtk_widget_show(hbox);