[nautilus] Always show icons in places menu in spatial mode.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus] Always show icons in places menu in spatial mode.
- Date: Sat, 8 Aug 2009 13:10:38 +0000 (UTC)
commit eb585679b6e4fad7d252a7458177c4e0a8468298
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 8 15:09:26 2009 +0200
Always show icons in places menu in spatial mode.
Part of bug #590647.
src/nautilus-spatial-window.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index 692a0ad..852d119 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -683,6 +683,7 @@ location_button_clicked_callback (GtkWidget *widget,
name = nautilus_file_get_display_name (file);
menu_item = gtk_image_menu_item_new_with_label (name);
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (menu_item), TRUE);
g_free (name);
if (first_item == NULL) {
@@ -941,6 +942,14 @@ static const GtkActionEntry spatial_entries[] = {
G_CALLBACK (action_search_callback) },
};
+static const char* icon_entries[] = {
+ "/MenuBar/Other Menus/Places/Home",
+ "/MenuBar/Other Menus/Places/Go to Computer",
+ "/MenuBar/Other Menus/Places/Go to Templates",
+ "/MenuBar/Other Menus/Places/Go to Trash",
+ "/MenuBar/Other Menus/Places/Go to Network"
+};
+
static void
nautilus_spatial_window_init (NautilusSpatialWindow *window)
{
@@ -951,6 +960,8 @@ nautilus_spatial_window_init (NautilusSpatialWindow *window)
GtkUIManager *ui_manager;
GtkTargetList *targets;
const char *ui;
+ int i;
+ GtkWidget *menuitem;
window->details = G_TYPE_INSTANCE_GET_PRIVATE (window,
NAUTILUS_TYPE_SPATIAL_WINDOW,
@@ -1042,6 +1053,11 @@ nautilus_spatial_window_init (NautilusSpatialWindow *window)
ui = nautilus_ui_string_get ("nautilus-spatial-window-ui.xml");
gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, NULL);
+
+ 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);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]