From b554cbc8162b9ec619c50544930c84f58cf659bd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 24 Aug 2011 19:36:07 -0500 Subject: Remove an unused hbox in the application menu item --- src/indicator-messages.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/indicator-messages.c b/src/indicator-messages.c index f2baf83..8b99c18 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -584,8 +584,6 @@ new_application_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbu gint padding = 4; gtk_widget_style_get(GTK_WIDGET(gmi), "horizontal-padding", &padding, NULL); - GtkWidget * hbox = gtk_hbox_new(FALSE, 0); - /* Set the minimum size, we always want it to take space */ gint width, height; gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height); @@ -602,12 +600,10 @@ new_application_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbu /* Application name in a label */ GtkWidget * label = gtk_label_new(dbusmenu_menuitem_property_get(newitem, APPLICATION_MENUITEM_PROP_NAME)); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); - gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, padding); gtk_widget_show(label); /* Insert the hbox */ - gtk_container_add(GTK_CONTAINER(gmi), hbox); - gtk_widget_show(hbox); + gtk_container_add(GTK_CONTAINER(gmi), label); /* Attach some of the standard GTK stuff */ dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, gmi, parent); -- cgit v1.2.3 From 8be78fecb42c91a002411fa9e2a7c207e57079ee Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 24 Aug 2011 20:26:02 -0500 Subject: Removing unneeded header --- src/messages-service.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/messages-service.c b/src/messages-service.c index c6a806b..e8fe576 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -32,7 +32,6 @@ with this program. If not, see . #include #include -#include #include "im-menu-item.h" #include "app-menu-item.h" -- cgit v1.2.3 From d1898c3e94c48e9369a7142c7c7d8986bcbbb184 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 24 Aug 2011 21:29:14 -0500 Subject: Switching the padding to the toggle-spacing like the image menu item and using it at creation of the box --- src/indicator-messages.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 8b99c18..3a8bbf9 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -694,9 +694,9 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm gint padding = 4; gint font_size = RIGHT_LABEL_FONT_SIZE; - gtk_widget_style_get(GTK_WIDGET(gmi), "horizontal-padding", &padding, NULL); + gtk_widget_style_get(GTK_WIDGET(gmi), "toggle-spacing", &padding, NULL); - GtkWidget * hbox = gtk_hbox_new(FALSE, 0); + GtkWidget * hbox = gtk_hbox_new(FALSE, padding); /* Icon, probably someone's face or avatar on an IM */ mi_data->icon = gtk_image_new(); @@ -731,7 +731,7 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm } } 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_box_pack_start(GTK_BOX(hbox), mi_data->icon, FALSE, FALSE, 0); if (pixbuf != NULL) { gtk_widget_show(mi_data->icon); @@ -740,7 +740,7 @@ new_indicator_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbusm /* Label, probably a username, chat room or mailbox name */ mi_data->label = gtk_label_new(dbusmenu_menuitem_property_get(newitem, INDICATOR_MENUITEM_PROP_LABEL)); gtk_misc_set_alignment(GTK_MISC(mi_data->label), 0.0, 0.5); - gtk_box_pack_start(GTK_BOX(hbox), mi_data->label, TRUE, TRUE, padding); + gtk_box_pack_start(GTK_BOX(hbox), mi_data->label, TRUE, TRUE, 0); gtk_widget_show(mi_data->label); /* Usually either the time or the count on the individual -- cgit v1.2.3 From 78470983d1c9833bf9353f3b36a62ee5a0382899 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 24 Aug 2011 21:29:38 -0500 Subject: Don't look up a style value we're not using --- src/indicator-messages.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 3a8bbf9..2476d4d 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -581,9 +581,6 @@ new_application_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbu GtkMenuItem * gmi = GTK_MENU_ITEM(gtk_image_menu_item_new()); gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(gmi), TRUE); - gint padding = 4; - gtk_widget_style_get(GTK_WIDGET(gmi), "horizontal-padding", &padding, NULL); - /* Set the minimum size, we always want it to take space */ gint width, height; gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height); -- cgit v1.2.3