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

Side by Side Diff: chrome/browser/ui/libgtkui/menu_util.cc

Issue 2449243002: Gtk3 ui: Add libgtk3ui as a separate build component (Closed)
Patch Set: Add theme_properties dep to //chrome/browser/ui Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/libgtkui/menu_util.h ('k') | chrome/browser/ui/libgtkui/native_theme_gtk2.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/libgtk2ui/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/libgtk2ui/gtk2_util.h" 9 #include "chrome/browser/ui/libgtkui/gtk2_util.h"
10 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" 10 #include "chrome/browser/ui/libgtkui/skia_utils_gtk2.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 libgtk2ui { 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());
21 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), image); 21 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), image);
22 return menu_item; 22 return menu_item;
23 } 23 }
24 24
25 GtkWidget* BuildMenuItemWithImage(const std::string& label, 25 GtkWidget* BuildMenuItemWithImage(const std::string& label,
26 const gfx::Image& icon) { 26 const gfx::Image& icon) {
27 GdkPixbuf* pixbuf = GdkPixbufFromSkBitmap(*icon.ToSkBitmap()); 27 GdkPixbuf* pixbuf = GdkPixbufFromSkBitmap(*icon.ToSkBitmap());
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 } 254 }
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 libgtk2ui 264 } // namespace libgtkui
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtkui/menu_util.h ('k') | chrome/browser/ui/libgtkui/native_theme_gtk2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698