Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: views/controls/menu/native_menu_gtk.cc

Issue 4708008: views: Override gtk-menu-images=0 for menu items with icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/views
Patch Set: add GTK_CHECK_VERSION around gtk_image_menu_item_set_always_show_image() Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/native_menu_gtk.cc
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc
index 96b31f07d887630cfc4be9f631a65a436e30c0a1..a0b2b0a4ab4c4fbb09a002682d5883f3ae57ad43 100644
--- a/views/controls/menu/native_menu_gtk.cc
+++ b/views/controls/menu/native_menu_gtk.cc
@@ -353,6 +353,12 @@ GtkWidget* NativeMenuGtk::AddMenuItemAt(int index,
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
gtk_image_new_from_pixbuf(pixbuf));
g_object_unref(pixbuf);
+
+#if GTK_CHECK_VERSION(2,16,0)
+ // Show the image even if the "gtk-menu-images" setting is turned off.
+ gtk_image_menu_item_set_always_show_image(
+ GTK_IMAGE_MENU_ITEM(menu_item), TRUE);
+#endif
} else {
menu_item = gtk_menu_item_new_with_mnemonic(label.c_str());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698