]> spindle.queued.net Git - midori/commitdiff
Enforce icons for webpage menu items and search menu items
authorChristian Dywan <christian@twotoasts.de>
Sat, 25 Jul 2009 21:04:15 +0000 (23:04 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 25 Jul 2009 21:06:17 +0000 (23:06 +0200)
katze/katze-arrayaction.c
midori/midori-searchaction.c
midori/midori-view.c

index 96c25cb1a4fe329400955535d17d97c49c750711..1fb6b925a12e0b1240dc62c23286eb79c93c3b76 100644 (file)
@@ -307,6 +307,10 @@ katze_array_action_generate_menu (KatzeArrayAction* array_action,
             g_object_unref (icon);
         }
         gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
+        #if GTK_CHECK_VERSION (2, 16, 0)
+        gtk_image_menu_item_set_always_show_image (
+            GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
+        #endif
         gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
         g_object_set_data (G_OBJECT (menuitem), "KatzeItem", item);
         if (KATZE_IS_ARRAY (item))
@@ -499,6 +503,10 @@ katze_array_action_proxy_create_menu_proxy_cb (GtkWidget* proxy,
         g_object_unref (icon);
     }
     gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
+    #if GTK_CHECK_VERSION (2, 16, 0)
+    gtk_image_menu_item_set_always_show_image (
+        GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
+    #endif
     g_object_set_data (G_OBJECT (menuitem), "KatzeItem", item);
     g_signal_connect (menuitem, "button-press-event",
         G_CALLBACK (katze_array_action_menu_button_press_cb), array_action);
index e519624946e8141aa6d742578ca543f42f2e4040..816f1e1b11d8eefb7d5730a39ecae2110e37b80d 100644 (file)
@@ -471,6 +471,10 @@ midori_search_action_icon_released_cb (GtkWidget*           entry,
             gtk_image_set_from_pixbuf (GTK_IMAGE (image), icon);
             g_object_unref (icon);
             gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image);
+            #if GTK_CHECK_VERSION (2, 16, 0)
+            gtk_image_menu_item_set_always_show_image (
+                GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
+            #endif
             gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
             g_object_set_data (G_OBJECT (menuitem), "engine", item);
             g_signal_connect (menuitem, "activate",
index 11ea6e9b74bc670ddaee536b481553d8e789d2ec..e9fc7ad36526dabd7ee95da43a7ec67c08c10fb8 100644 (file)
@@ -1286,6 +1286,10 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
                 icon = gtk_image_new_from_pixbuf (pixbuf);
                 g_object_unref (pixbuf);
                 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), icon);
+                #if GTK_CHECK_VERSION (2, 16, 0)
+                gtk_image_menu_item_set_always_show_image (
+                    GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
+                #endif
                 gtk_menu_shell_insert (GTK_MENU_SHELL (sub_menu), menuitem, i - 1);
                 g_object_set_data (G_OBJECT (menuitem), "search",
                                    (gchar*)katze_item_get_uri (item));