[nautilus] window-bookmarks: make sure we get an icon for bookmarks in the menu



commit 055b16f45c4d3c7b5b543df5b8457702f2d3164e
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Feb 17 10:30:22 2011 -0500

    window-bookmarks: make sure we get an icon for bookmarks in the menu

 src/nautilus-window-bookmarks.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window-bookmarks.c b/src/nautilus-window-bookmarks.c
index 81e0187..48dc9c9 100644
--- a/src/nautilus-window-bookmarks.c
+++ b/src/nautilus-window-bookmarks.c
@@ -192,6 +192,7 @@ connect_proxy_cb (GtkActionGroup *action_group,
                   gpointer dummy)
 {
 	GtkLabel *label;
+	GIcon *icon;
 
 	if (!GTK_IS_MENU_ITEM (proxy))
 		return;
@@ -201,6 +202,13 @@ connect_proxy_cb (GtkActionGroup *action_group,
 	gtk_label_set_use_underline (label, FALSE);
 	gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
 	gtk_label_set_max_width_chars (label, MENU_ITEM_MAX_WIDTH_CHARS);
+
+	icon = g_object_get_data (G_OBJECT (action), "menu-icon");
+
+	if (icon != NULL) {
+		gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy),
+					       gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_MENU));
+	}
 }
 
 /* Struct that stores all the info necessary to activate a bookmark. */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]