Add gtk_image_menu_item_set_always_show_image to gtk3-compat.h

This commit is contained in:
Christian Dywan 2011-11-08 21:52:47 +01:00
parent 75b9f809ae
commit eed822dc8b
4 changed files with 1 additions and 8 deletions

View file

@ -31,6 +31,7 @@ G_BEGIN_DECLS
#define gtk_menu_item_set_label(menuitem, label) \ #define gtk_menu_item_set_label(menuitem, label) \
gtk_label_set_label (GTK_LABEL (GTK_BIN (menuitem)->child), \ gtk_label_set_label (GTK_LABEL (GTK_BIN (menuitem)->child), \
label ? label : ""); label ? label : "");
#define gtk_image_menu_item_set_always_show_image(menuitem, yesno) ()
#endif #endif
#if !GTK_CHECK_VERSION (2, 18, 0) #if !GTK_CHECK_VERSION (2, 18, 0)

View file

@ -398,10 +398,8 @@ 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_set_always_show_image (
GTK_IMAGE_MENU_ITEM (menuitem), TRUE); GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
#endif
gtk_menu_shell_append (menu, menuitem); gtk_menu_shell_append (menu, menuitem);
g_object_set_data (G_OBJECT (menuitem), "KatzeItem", item); g_object_set_data (G_OBJECT (menuitem), "KatzeItem", item);
if (KATZE_ITEM_IS_FOLDER (item)) if (KATZE_ITEM_IS_FOLDER (item))
@ -622,10 +620,8 @@ 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_set_always_show_image (
GTK_IMAGE_MENU_ITEM (menuitem), TRUE); 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);
if (KATZE_ITEM_IS_FOLDER (item)) if (KATZE_ITEM_IS_FOLDER (item))
{ {

View file

@ -473,10 +473,8 @@ midori_search_action_icon_released_cb (GtkWidget* entry,
gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name, gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name,
GTK_ICON_SIZE_MENU); GTK_ICON_SIZE_MENU);
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_set_always_show_image (
GTK_IMAGE_MENU_ITEM (menuitem), TRUE); 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

@ -2450,10 +2450,8 @@ midori_view_populate_popup (MidoriView* view,
else else
icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
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_set_always_show_image (
GTK_IMAGE_MENU_ITEM (menuitem), TRUE); GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
#endif
gtk_menu_shell_insert (GTK_MENU_SHELL (sub_menu), menuitem, i); gtk_menu_shell_insert (GTK_MENU_SHELL (sub_menu), menuitem, i);
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));