diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-06 06:36:21 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-06 06:36:21 +0000 |
commit | 8f9bf9745e22d74ae592874c3dafc97ea335f247 (patch) | |
tree | 5cd838d731dbb881a6912fc0cc541a0f7fe9d749 /ui/views/touchui | |
parent | 920746f79e174896f8cc183e83d022376697c961 (diff) | |
download | chromium_src-8f9bf9745e22d74ae592874c3dafc97ea335f247.zip chromium_src-8f9bf9745e22d74ae592874c3dafc97ea335f247.tar.gz chromium_src-8f9bf9745e22d74ae592874c3dafc97ea335f247.tar.bz2 |
Nix TextButton accelerator/mnemonic support and use in Task Manager.
Nix TextButton PrefixType enum and code.
(no special handling of '&' characters)
Nix Button KeyboardShortcut accessibility code.
(half-baked mnemonic support only used by Task Manager)
(should eventually support proper ALT+<char> mnemonics)
Pass button text with accelerator chars removed in:
-WrenchMenu (Chrome menu command strings).
-TouchSelectionController (cut/copy/paste/etc. commands)
Nix bizarre Task Manager 'e' accelerator for "End Process".
(typing on Win selects tasks, but typing 'e' ends the task)
(GTK had ALT+'e' support; but this doesn't seem critical)
(all platforms can TAB to focus and invoke the button via kbd)
Remove '&' from IDS_TASK_MANAGER_KILL, merge with *_CHROMEOS.
BUG=155363,7229,92510
TEST=Win Task Manager "End Process" has no accelerator, only bookmark buttons show '&'.
R=pkasting@chromium.org
TBR=yoshiki@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11365054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/touchui')
-rw-r--r-- | ui/views/touchui/touch_selection_controller_impl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc index a6e151b..a8955c7 100644 --- a/ui/views/touchui/touch_selection_controller_impl.cc +++ b/ui/views/touchui/touch_selection_controller_impl.cc @@ -14,6 +14,7 @@ #include "ui/gfx/rect.h" #include "ui/gfx/screen.h" #include "ui/gfx/size.h" +#include "ui/gfx/text_utils.h" #include "ui/gfx/transform.h" #include "ui/views/background.h" #include "ui/views/controls/button/button.h" @@ -288,11 +289,10 @@ class TouchSelectionControllerImpl::TouchContextMenuView for (size_t i = 0; i < arraysize(kContextMenuCommands); i++) { int command_id = kContextMenuCommands[i]; if (controller_->IsCommandIdEnabled(command_id)) { - TextButton* button = new TextButton( - this, l10n_util::GetStringUTF16(command_id)); + TextButton* button = new TextButton(this, gfx::RemoveAcceleratorChar( + l10n_util::GetStringUTF16(command_id), '&', NULL, NULL)); button->set_focusable(true); button->set_request_focus_on_press(false); - button->set_prefix_type(TextButton::PREFIX_HIDE); button->SetEnabledColor(MenuConfig::instance().text_color); button->set_background(new ContextMenuButtonBackground()); button->set_alignment(TextButton::ALIGN_CENTER); |