[Xfce4-commits] <thunar:master> Don't show images on image menu items.

Nick Schermer noreply at xfce.org
Wed Sep 26 21:42:02 CEST 2012


Updating branch refs/heads/master
         to 30fad13fb84ce2572d6aa96c3956fa7c5ab61206 (commit)
       from 1df6a901485bd92319d2332c8e81a88a27f5bbb7 (commit)

commit 30fad13fb84ce2572d6aa96c3956fa7c5ab61206
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Sep 26 21:38:17 2012 +0200

    Don't show images on image menu items.
    
    Gtk takes care of this and it breaks "Show images in menus"
    in the appearance settings.

 thunar/thunar-chooser-dialog.c   |    1 -
 thunar/thunar-dnd.c              |    1 -
 thunar/thunar-history.c          |    1 -
 thunar/thunar-shortcuts-view.c   |    2 --
 thunar/thunar-templates-action.c |    2 --
 thunar/thunar-tree-view.c        |    6 ------
 6 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/thunar/thunar-chooser-dialog.c b/thunar/thunar-chooser-dialog.c
index 7d298ef..a593565 100644
--- a/thunar/thunar-chooser-dialog.c
+++ b/thunar/thunar-chooser-dialog.c
@@ -567,7 +567,6 @@ thunar_chooser_dialog_context_menu (ThunarChooserDialog *dialog,
 
   image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-  gtk_widget_show (image);
 
   /* run the menu on the dialog's screen (takes over the floating of menu) */
   thunar_gtk_menu_run (GTK_MENU (menu), GTK_WIDGET (dialog), NULL, NULL, button, timestamp);
diff --git a/thunar/thunar-dnd.c b/thunar/thunar-dnd.c
index 950d656..2205b94 100644
--- a/thunar/thunar-dnd.c
+++ b/thunar/thunar-dnd.c
@@ -109,7 +109,6 @@ thunar_dnd_ask (GtkWidget    *widget,
           {
             image = gtk_image_new_from_icon_name (dnd_action_icons[n], GTK_ICON_SIZE_MENU);
             gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-            gtk_widget_show (image);
           }
       }
 
diff --git a/thunar/thunar-history.c b/thunar/thunar-history.c
index 7134657..d180a97 100644
--- a/thunar/thunar-history.c
+++ b/thunar/thunar-history.c
@@ -474,7 +474,6 @@ thunar_history_show_menu (GtkAction     *action,
       /* setup the image for the file */
       image = gtk_image_new_from_pixbuf (icon);
       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-      gtk_widget_show (image);
 
       /* release the icon */
       g_object_unref (G_OBJECT (icon));
diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index f7d91d1..a931019 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -831,7 +831,6 @@ thunar_shortcuts_view_context_menu (ThunarShortcutsView *view,
   /* set the stock icon */
   image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-  gtk_widget_show (image);
 
   /* append the "Open in New Window" menu action */
   item = gtk_image_menu_item_new_with_mnemonic (_("Open in New Window"));
@@ -941,7 +940,6 @@ thunar_shortcuts_view_context_menu (ThunarShortcutsView *view,
   /* set the remove stock icon */
   image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-  gtk_widget_show (image);
 
   /* append the rename menu item */
   item = gtk_image_menu_item_new_with_mnemonic (_("Re_name Shortcut"));
diff --git a/thunar/thunar-templates-action.c b/thunar/thunar-templates-action.c
index b40aab7..7ea185a 100644
--- a/thunar/thunar-templates-action.c
+++ b/thunar/thunar-templates-action.c
@@ -381,7 +381,6 @@ thunar_templates_action_files_ready (ThunarJob             *job,
       /* allocate an image based on the icon */
       image = gtk_image_new_from_pixbuf (icon);
       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-      gtk_widget_show (image);
 
       /* release the icon reference */
       g_object_unref (icon);
@@ -480,7 +479,6 @@ thunar_templates_action_load_finished (ThunarJob             *job,
       /* add the icon for the emtpy file item */
       image = gtk_image_new_from_stock (GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-      gtk_widget_show (image);
     }
 
   g_signal_handlers_disconnect_matched (job, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL,
diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index f3b0bd3..c6a30c4 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -1096,7 +1096,6 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
   /* set the stock icon */
   image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-  gtk_widget_show (image);
 
   /* append the "Open in New Window" menu action */
   item = gtk_image_menu_item_new_with_mnemonic (_("Open in New Window"));
@@ -1183,7 +1182,6 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
           /* set the stock icon */
           image = gtk_image_new_from_stock (GTK_STOCK_CUT, GTK_ICON_SIZE_MENU);
           gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-          gtk_widget_show (image);
 
           /* append the "Copy" menu action */
           item = gtk_image_menu_item_new_with_mnemonic (_("_Copy"));
@@ -1195,7 +1193,6 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
           /* set the stock icon */
           image = gtk_image_new_from_stock (GTK_STOCK_COPY, GTK_ICON_SIZE_MENU);
           gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-          gtk_widget_show (image);
 
           /* cleanup */
           if (G_LIKELY (parent_file != NULL))
@@ -1212,7 +1209,6 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
       /* set the stock icon */
       image = gtk_image_new_from_stock (GTK_STOCK_PASTE, GTK_ICON_SIZE_MENU);
       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-      gtk_widget_show (image);
 
       /* "Delete" and "Rename" don't make much sense for volumes */
       if (G_LIKELY (volume == NULL))
@@ -1230,7 +1226,6 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
           /* set the stock icon */
           image = gtk_image_new_from_stock (GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
           gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-          gtk_widget_show (image);
 
           /* cleanup */
           if (G_LIKELY (parent_file != NULL))
@@ -1313,7 +1308,6 @@ thunar_tree_view_context_menu (ThunarTreeView *view,
   /* set the stock icon */
   image = gtk_image_new_from_stock (GTK_STOCK_PROPERTIES, GTK_ICON_SIZE_MENU);
   gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-  gtk_widget_show (image);
 
   /* run the menu on the view's screen (taking over the floating reference on the menu) */
   thunar_gtk_menu_run (GTK_MENU (menu), GTK_WIDGET (view), NULL, NULL, (event != NULL) ? event->button : 0,


More information about the Xfce4-commits mailing list