From: Christian Dywan Date: Sat, 25 Jul 2009 21:04:15 +0000 (+0200) Subject: Enforce icons for webpage menu items and search menu items X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b478db85abc512395cc2afd2f292aa362c5dc5d3;p=midori Enforce icons for webpage menu items and search menu items --- diff --git a/katze/katze-arrayaction.c b/katze/katze-arrayaction.c index 96c25cb1..1fb6b925 100644 --- a/katze/katze-arrayaction.c +++ b/katze/katze-arrayaction.c @@ -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); diff --git a/midori/midori-searchaction.c b/midori/midori-searchaction.c index e5196249..816f1e1b 100644 --- a/midori/midori-searchaction.c +++ b/midori/midori-searchaction.c @@ -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", diff --git a/midori/midori-view.c b/midori/midori-view.c index 11ea6e9b..e9fc7ad3 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -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));