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

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

Issue 7791004: linux: delete code that worked around gtk <2.18 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months 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 | « views/controls/combobox/native_combobox_gtk.cc ('k') | webkit/glue/webcursor_gtk.cc » ('j') | 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 8a87830ddc4fd74b958264bd813db792367d55c6..50810bb140fcb57580a84d09db6c5fc9f813be81 100644
--- a/views/controls/menu/native_menu_gtk.cc
+++ b/views/controls/menu/native_menu_gtk.cc
@@ -393,11 +393,9 @@ GtkWidget* NativeMenuGtk::AddMenuItemAt(int index,
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());
}
@@ -606,18 +604,7 @@ void NativeMenuGtk::SendAccessibilityEvent() {
// Get the menu item's label.
std::string name;
-#if GTK_CHECK_VERSION(2, 16, 0)
name = gtk_menu_item_get_label(GTK_MENU_ITEM(menu_item));
-#else
- GList* children = gtk_container_get_children(GTK_CONTAINER(menu_item));
- for (GList* l = g_list_first(children); l != NULL; l = g_list_next(l)) {
- GtkWidget* child = static_cast<GtkWidget*>(l->data);
- if (GTK_IS_LABEL(child)) {
- name = gtk_label_get_label(GTK_LABEL(child));
- break;
- }
- }
-#endif
if (ViewsDelegate::views_delegate) {
ViewsDelegate::views_delegate->NotifyMenuItemFocused(
« no previous file with comments | « views/controls/combobox/native_combobox_gtk.cc ('k') | webkit/glue/webcursor_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698