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/bookmarks/bookmark_context_menu.h" | 5 #include "chrome/browser/bookmarks/bookmark_context_menu.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 | 8 |
9 void BookmarkContextMenu::PopupAsContext(guint32 event_time) { | 9 void BookmarkContextMenu::PopupAsContext(guint32 event_time) { |
10 menu_->PopupAsContext(event_time); | 10 menu_->PopupAsContext(event_time); |
11 } | 11 } |
12 | 12 |
13 void BookmarkContextMenu::CreateMenuObject() { | 13 void BookmarkContextMenu::CreateMenuObject() { |
14 menu_.reset(new MenuGtk(this, false)); | 14 menu_.reset(new MenuGtk(this, false)); |
15 } | 15 } |
16 | 16 |
17 void BookmarkContextMenu::AppendItem(int id) { | 17 void BookmarkContextMenu::AppendItem(int id) { |
18 menu_->AppendMenuItemWithLabel( | 18 menu_->AppendMenuItemWithLabel(id, l10n_util::GetStringUTF8(id)); |
19 id, | |
20 MenuGtk::ConvertAcceleratorsFromWindowsStyle( | |
21 l10n_util::GetStringUTF8(id))); | |
22 } | 19 } |
23 | 20 |
24 void BookmarkContextMenu::AppendItem(int id, int localization_id) { | 21 void BookmarkContextMenu::AppendItem(int id, int localization_id) { |
25 menu_->AppendMenuItemWithLabel( | 22 menu_->AppendMenuItemWithLabel(id, l10n_util::GetStringUTF8(localization_id)); |
26 id, | |
27 MenuGtk::ConvertAcceleratorsFromWindowsStyle( | |
28 l10n_util::GetStringUTF8(localization_id))); | |
29 } | 23 } |
30 | 24 |
31 void BookmarkContextMenu::AppendSeparator() { | 25 void BookmarkContextMenu::AppendSeparator() { |
32 menu_->AppendSeparator(); | 26 menu_->AppendSeparator(); |
33 } | 27 } |
34 | 28 |
35 void BookmarkContextMenu::AppendCheckboxItem(int id) { | 29 void BookmarkContextMenu::AppendCheckboxItem(int id) { |
36 menu_->AppendCheckMenuItemWithLabel( | 30 menu_->AppendCheckMenuItemWithLabel(id, l10n_util::GetStringUTF8(id)); |
37 id, | |
38 MenuGtk::ConvertAcceleratorsFromWindowsStyle( | |
39 l10n_util::GetStringUTF8(id))); | |
40 } | 31 } |
OLD | NEW |