summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/toolbar
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-06 19:09:19 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-06 19:09:19 +0000
commitb80a0f2ddedaf41babb6140b931f111deca11a5b (patch)
tree3032b37b16f1796122242a9d7a57f9a7df08f6d5 /chrome/browser/ui/toolbar
parent0b4592cec2e49d7bab91b2d96d59d9096b45184f (diff)
downloadchromium_src-b80a0f2ddedaf41babb6140b931f111deca11a5b.zip
chromium_src-b80a0f2ddedaf41babb6140b931f111deca11a5b.tar.gz
chromium_src-b80a0f2ddedaf41babb6140b931f111deca11a5b.tar.bz2
Fix extra "&" in back/forward menu on Mac
All "&" characters in the back/forward menu would show up as "&&" on the Mac. The problem was that Windows uses "&" as an accelerator in menus. We were escaping all "&" by replacing them with "&&". r36530 added code to the GTK menu to strip the accelerator. Unfortunately those util functions are in GTK only files. Instead of copying that approach I'm simply #ifdefing out the code that adds the extra "&" characters. BUG=17660 TEST=Verified that back/forward menus look correct. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/toolbar')
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index b64c721..c77c894 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -84,10 +84,13 @@ string16 BackForwardMenuModel::GetLabelAt(int index) const {
GetString(prefs::kAcceptLanguages)));
menu_text = ui::ElideText(menu_text, gfx::Font(), kMaxWidth, false);
+#if !defined(OS_MACOSX)
for (size_t i = menu_text.find('&'); i != string16::npos;
i = menu_text.find('&', i + 2)) {
menu_text.insert(i, 1, '&');
}
+#endif
+
return menu_text;
}