Enforce icons for webpage menu items and search menu items

This commit is contained in:
Christian Dywan 2009-07-25 23:04:15 +02:00
parent 225d5643e0
commit b478db85ab
3 changed files with 16 additions and 0 deletions

View file

@ -307,6 +307,10 @@ katze_array_action_generate_menu (KatzeArrayAction* array_action,
g_object_unref (icon); g_object_unref (icon);
} }
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); 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); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
g_object_set_data (G_OBJECT (menuitem), "KatzeItem", item); g_object_set_data (G_OBJECT (menuitem), "KatzeItem", item);
if (KATZE_IS_ARRAY (item)) if (KATZE_IS_ARRAY (item))
@ -499,6 +503,10 @@ katze_array_action_proxy_create_menu_proxy_cb (GtkWidget* proxy,
g_object_unref (icon); g_object_unref (icon);
} }
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); 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_object_set_data (G_OBJECT (menuitem), "KatzeItem", item);
g_signal_connect (menuitem, "button-press-event", g_signal_connect (menuitem, "button-press-event",
G_CALLBACK (katze_array_action_menu_button_press_cb), array_action); G_CALLBACK (katze_array_action_menu_button_press_cb), array_action);

View file

@ -471,6 +471,10 @@ midori_search_action_icon_released_cb (GtkWidget* entry,
gtk_image_set_from_pixbuf (GTK_IMAGE (image), icon); gtk_image_set_from_pixbuf (GTK_IMAGE (image), icon);
g_object_unref (icon); g_object_unref (icon);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); 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); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
g_object_set_data (G_OBJECT (menuitem), "engine", item); g_object_set_data (G_OBJECT (menuitem), "engine", item);
g_signal_connect (menuitem, "activate", g_signal_connect (menuitem, "activate",

View file

@ -1286,6 +1286,10 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view,
icon = gtk_image_new_from_pixbuf (pixbuf); icon = gtk_image_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf); g_object_unref (pixbuf);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), icon); 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); gtk_menu_shell_insert (GTK_MENU_SHELL (sub_menu), menuitem, i - 1);
g_object_set_data (G_OBJECT (menuitem), "search", g_object_set_data (G_OBJECT (menuitem), "search",
(gchar*)katze_item_get_uri (item)); (gchar*)katze_item_get_uri (item));