OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/menu_gtk.h" | 5 #include "chrome/browser/gtk/menu_gtk.h" |
6 | 6 |
| 7 #include "app/l10n_util.h" |
7 #include "base/logging.h" | 8 #include "base/logging.h" |
8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
9 #include "chrome/common/gtk_util.h" | 10 #include "chrome/common/gtk_util.h" |
10 #include "chrome/common/l10n_util.h" | |
11 #include "skia/include/SkBitmap.h" | 11 #include "skia/include/SkBitmap.h" |
12 | 12 |
13 MenuGtk::MenuGtk(MenuGtk::Delegate* delegate, | 13 MenuGtk::MenuGtk(MenuGtk::Delegate* delegate, |
14 const MenuCreateMaterial* menu_data, | 14 const MenuCreateMaterial* menu_data, |
15 GtkAccelGroup* accel_group) | 15 GtkAccelGroup* accel_group) |
16 : delegate_(delegate), | 16 : delegate_(delegate), |
17 dummy_accel_group_(gtk_accel_group_new()), | 17 dummy_accel_group_(gtk_accel_group_new()), |
18 menu_(gtk_menu_new()) { | 18 menu_(gtk_menu_new()) { |
19 BuildMenuIn(menu_.get(), menu_data, accel_group); | 19 BuildMenuIn(menu_.get(), menu_data, accel_group); |
20 } | 20 } |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 widget, menu->delegate_->IsCommandEnabled(data->id)); | 288 widget, menu->delegate_->IsCommandEnabled(data->id)); |
289 | 289 |
290 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); | 290 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); |
291 if (submenu) { | 291 if (submenu) { |
292 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, | 292 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, |
293 userdata); | 293 userdata); |
294 } | 294 } |
295 } | 295 } |
296 } | 296 } |
297 } | 297 } |
OLD | NEW |