OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/libgtkui/menu_util.h" | 5 #include "chrome/browser/ui/libgtkui/menu_util.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/ui/libgtkui/gtk2_util.h" | 9 #include "chrome/browser/ui/libgtkui/gtk_util.h" |
10 #include "chrome/browser/ui/libgtkui/skia_utils_gtk2.h" | 10 #include "chrome/browser/ui/libgtkui/skia_utils_gtk.h" |
11 #include "ui/base/accelerators/accelerator.h" | 11 #include "ui/base/accelerators/accelerator.h" |
12 #include "ui/base/accelerators/menu_label_accelerator_util_linux.h" | 12 #include "ui/base/accelerators/menu_label_accelerator_util_linux.h" |
13 #include "ui/base/models/menu_model.h" | 13 #include "ui/base/models/menu_model.h" |
14 | 14 |
15 G_GNUC_BEGIN_IGNORE_DEPRECATIONS | 15 G_GNUC_BEGIN_IGNORE_DEPRECATIONS |
16 | 16 |
17 namespace libgtkui { | 17 namespace libgtkui { |
18 | 18 |
19 GtkWidget* BuildMenuItemWithImage(const std::string& label, GtkWidget* image) { | 19 GtkWidget* BuildMenuItemWithImage(const std::string& label, GtkWidget* image) { |
20 GtkWidget* menu_item = gtk_image_menu_item_new_with_mnemonic(label.c_str()); | 20 GtkWidget* menu_item = gtk_image_menu_item_new_with_mnemonic(label.c_str()); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); | 256 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); |
257 if (submenu) { | 257 if (submenu) { |
258 gtk_container_foreach( | 258 gtk_container_foreach( |
259 GTK_CONTAINER(submenu), &SetMenuItemInfo, block_activation_ptr); | 259 GTK_CONTAINER(submenu), &SetMenuItemInfo, block_activation_ptr); |
260 } | 260 } |
261 } | 261 } |
262 } | 262 } |
263 | 263 |
264 } // namespace libgtkui | 264 } // namespace libgtkui |
OLD | NEW |