diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 19:23:12 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 19:23:12 +0000 |
commit | 44394efebe11332e070541d7f288d341ccd8b207 (patch) | |
tree | f37428fff32d513b46fb26f497df53fc17f94bb3 /views | |
parent | 360bc0b11fca09bcfb942f8616c1feaf9d964545 (diff) | |
download | chromium_src-44394efebe11332e070541d7f288d341ccd8b207.zip chromium_src-44394efebe11332e070541d7f288d341ccd8b207.tar.gz chromium_src-44394efebe11332e070541d7f288d341ccd8b207.tar.bz2 |
views: Override gtk-menu-images=0 for menu items with icons.
This lets us disable icons by default, which gets rid of the
ugly GTK+ copy/cut/paste icons in stock menus while still
showing icons for Views menu items that have explicitly asked
for them, like the ones in the Chrome OS network menu.
BUG=chromium-os:4345
TEST=built and ran it
Review URL: http://codereview.chromium.org/4708008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/native_menu_gtk.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc index 96b31f0..a0b2b0a 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()); } |