summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Carlson <gnomebugzilla@mejlamej.nu>2009-08-08 15:08:08 +0200
committerCosimo Cecchi <cosimoc@gnome.org>2009-08-08 15:08:08 +0200
commit826d5237d2ea179006b62def4db376544e74d764 (patch)
tree6564b66c74def011243e197fc42c09bd289bdaff
parent9cba51e5cb8827997eb4203c6eed4614efa34aaa (diff)
downloadnautilus-826d5237d2ea179006b62def4db376544e74d764.tar.gz
Always show icons in the history and go menu.
Part of bug #590647.
-rw-r--r--src/nautilus-navigation-window-menus.c21
-rw-r--r--src/nautilus-window-menus.c9
2 files changed, 30 insertions, 0 deletions
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index 774a778cf..f25e3517f 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -339,6 +339,15 @@ connect_proxy_cb (GtkActionGroup *action_group,
gtk_label_set_max_width_chars (label, MENU_ITEM_MAX_WIDTH_CHARS);
}
+static const char* icon_entries[] = {
+ "/MenuBar/Other Menus/Go/Home",
+ "/MenuBar/Other Menus/Go/Computer",
+ "/MenuBar/Other Menus/Go/Go to Templates",
+ "/MenuBar/Other Menus/Go/Go to Trash",
+ "/MenuBar/Other Menus/Go/Go to Network",
+ "/MenuBar/Other Menus/Go/Go to Location"
+};
+
/**
* refresh_go_menu:
*
@@ -350,7 +359,10 @@ refresh_go_menu (NautilusNavigationWindow *window)
{
GtkUIManager *ui_manager;
GList *node;
+ GtkWidget *menuitem;
int index;
+ const char *ui;
+ int i;
g_assert (NAUTILUS_IS_NAVIGATION_WINDOW (window));
@@ -371,6 +383,15 @@ refresh_go_menu (NautilusNavigationWindow *window)
window->details->go_menu_action_group,
-1);
g_object_unref (window->details->go_menu_action_group);
+
+ for (i = 0; i < G_N_ELEMENTS (icon_entries); i++) {
+ menuitem = gtk_ui_manager_get_widget (
+ ui_manager,
+ icon_entries[i]);
+
+ gtk_image_menu_item_set_always_show_image (
+ GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
+ }
/* Add in a new set of history items. */
for (node = nautilus_get_history_list (), index = 0;
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index d3b2a5fd1..506d592fb 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -162,8 +162,10 @@ nautilus_menus_append_bookmark_to_menu (NautilusWindow *window,
BookmarkHolder *bookmark_holder;
char action_name[128];
char *name;
+ char *path;
GdkPixbuf *pixbuf;
GtkAction *action;
+ GtkWidget *menuitem;
g_assert (NAUTILUS_IS_WINDOW (window));
g_assert (NAUTILUS_IS_BOOKMARK (bookmark));
@@ -203,7 +205,14 @@ nautilus_menus_append_bookmark_to_menu (NautilusWindow *window,
GTK_UI_MANAGER_MENUITEM,
FALSE);
+ path = g_strdup_printf ("%s/%s", parent_path, action_name);
+ menuitem = gtk_ui_manager_get_widget (window->details->ui_manager,
+ path);
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (menuitem),
+ TRUE);
+
g_object_unref (pixbuf);
+ g_free (path);
g_free (name);
}