WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
90437
[GTK] Don't show accel labels in context menu items
https://bugs.webkit.org/show_bug.cgi?id=90437
Summary
[GTK] Don't show accel labels in context menu items
Carlos Garcia Campos
Reported
2012-07-03 01:12:41 PDT
When a context menu item is created with a GtkMenuItem that has been created from a GtkAction, if the action has an accelerator, it's shown in the menu item label, like menu items in a menu bar. In that case we should reset the accel closure of the menu item label, like GtkUIManager does for popup menus, to make sure the accelerator is not shown. This isn't needed for all other ContextMenuIem constructors, because the GtkAction is created without accelerator by webkit in those cases.
Attachments
Patch
(2.04 KB, patch)
2012-07-03 01:15 PDT
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2012-07-03 01:15:59 PDT
Created
attachment 150554
[details]
Patch
Martin Robinson
Comment 2
2012-07-03 08:06:30 PDT
Comment on
attachment 150554
[details]
Patch I'm not totally sure I understand the patch. Is the issue that accelerator labels are still showing up or that they are both showing up and active? Does gtk_accel_label_set_accel_closure have the side effect of hiding accelerator labels and disabling the accelerator?
Carlos Garcia Campos
Comment 3
2012-07-03 08:31:49 PDT
(In reply to
comment #2
)
> (From update of
attachment 150554
[details]
) > I'm not totally sure I understand the patch. Is the issue that accelerator labels are still showing up or that they are both showing up and active? Does gtk_accel_label_set_accel_closure have the side effect of hiding accelerator labels and disabling the accelerator?
This doesn't affect the action accelerator which is not active while the context menu is shown. For example, if you create a GtkAction for Paste with CTRL+V as shortcut, and _Paste as label. When the context menu is not active you can do CTRL+V to trigger the paste action. When the context menu is active you can just press 'p' to trigger the action, but CTRL+V won't work. When the context menu is built, GTK+ doesn't know whether the menu is part of a menubar or a popup, and the shortcut (CTRL + V) is shown at the right of the menu item. To avoid it, we can simply reset the accel closure of the label contained in the menu item (in case it's an accel label, of course).
Carlos Garcia Campos
Comment 4
2012-07-03 23:18:40 PDT
Committed
r121829
: <
http://trac.webkit.org/changeset/121829
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug