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

Side by Side Diff: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm

Issue 7080012: Mac. Make wrench menu controller ignore embedded ampersand (Windows accelerator key marker) in bo... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h" 5 #import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h"
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #import "chrome/browser/app_controller_mac.h" 9 #import "chrome/browser/app_controller_mac.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 default: 100 default:
101 NOTREACHED(); 101 NOTREACHED();
102 break; 102 break;
103 } 103 }
104 [self adjustPositioning]; 104 [self adjustPositioning];
105 [menu insertItem:customItem.get() atIndex:index]; 105 [menu insertItem:customItem.get() atIndex:index];
106 } 106 }
107 107
108 - (NSMenu*)bookmarkSubMenu { 108 - (NSMenu*)bookmarkSubMenu {
109 NSString* title = l10n_util::GetNSString(IDS_BOOKMARKS_MENU); 109 NSString* title = l10n_util::GetNSString(IDS_BOOKMARKS_MENU);
110 return [[[self menu] itemWithTitle:title] submenu]; 110 // Strip windows accelerator mark.
111 NSString* processedTitle = [title stringByReplacingOccurrencesOfString:@"&"
112 withString:@""];
Avi (use Gerrit) 2011/05/27 21:08:09 NAK. This is what l10n_util::GetNSStringWithFixup
mafv 2011/05/27 21:22:28 Done.
113 return [[[self menu] itemWithTitle:processedTitle] submenu];
111 } 114 }
112 115
113 - (void)updateBookmarkSubMenu { 116 - (void)updateBookmarkSubMenu {
114 BookmarkMenuBridge* bridge = [[NSApp delegate] bookmarkMenuBridge]; 117 BookmarkMenuBridge* bridge = [[NSApp delegate] bookmarkMenuBridge];
115 NSMenu* bookmarkMenu = [self bookmarkSubMenu]; 118 NSMenu* bookmarkMenu = [self bookmarkSubMenu];
116 if (bridge && bookmarkMenu) 119 if (bridge && bookmarkMenu)
117 bridge->UpdateSubMenu(bookmarkMenu); 120 bridge->UpdateSubMenu(bookmarkMenu);
118 } 121 }
119 122
120 - (void)menuWillOpen:(NSMenu*)menu { 123 - (void)menuWillOpen:(NSMenu*)menu {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 parentFrame.size.width += delta; 219 parentFrame.size.width += delta;
217 parentFrame.origin.x -= delta; 220 parentFrame.origin.x -= delta;
218 [[editCut_ superview] setFrame:parentFrame]; 221 [[editCut_ superview] setFrame:parentFrame];
219 } 222 }
220 223
221 - (NSButton*)zoomDisplay { 224 - (NSButton*)zoomDisplay {
222 return zoomDisplay_; 225 return zoomDisplay_;
223 } 226 }
224 227
225 @end // @implementation WrenchMenuController 228 @end // @implementation WrenchMenuController
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698