<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>90437</bug_id>
          
          <creation_ts>2012-07-03 01:12:41 -0700</creation_ts>
          <short_desc>[GTK] Don&apos;t show accel labels in context menu items</short_desc>
          <delta_ts>2012-07-03 23:18:40 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>662034</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-07-03 01:12:41 -0700</bug_when>
    <thetext>When a context menu item is created with a GtkMenuItem that has been created from a GtkAction, if the action has an accelerator, it&apos;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&apos;t needed for all other ContextMenuIem constructors, because the GtkAction is created without accelerator by webkit in those cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>662036</commentid>
    <comment_count>1</comment_count>
      <attachid>150554</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-07-03 01:15:59 -0700</bug_when>
    <thetext>Created attachment 150554
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>662222</commentid>
    <comment_count>2</comment_count>
      <attachid>150554</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2012-07-03 08:06:30 -0700</bug_when>
    <thetext>Comment on attachment 150554
Patch

I&apos;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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>662239</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-07-03 08:31:49 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 150554 [details])
&gt; I&apos;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&apos;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 &apos;p&apos; to trigger the action, but CTRL+V won&apos;t work. When the context menu is built, GTK+ doesn&apos;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&apos;s an accel label, of course).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>662675</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-07-03 23:18:40 -0700</bug_when>
    <thetext>Committed r121829: &lt;http://trac.webkit.org/changeset/121829&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>150554</attachid>
            <date>2012-07-03 01:15:59 -0700</date>
            <delta_ts>2012-07-03 09:14:46 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>wk-context-menu-items-accels.diff</filename>
            <type>text/plain</type>
            <size>2090</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCA4ZjNmZDQ2Li5lYzAwZWI3IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjIg
QEAKKzIwMTItMDctMDMgIENhcmxvcyBHYXJjaWEgQ2FtcG9zICA8Y2dhcmNpYUBpZ2FsaWEuY29t
PgorCisgICAgICAgIFtHVEtdIERvbid0IHNob3cgYWNjZWwgbGFiZWxzIGluIGNvbnRleHQgbWVu
dSBpdGVtcworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
OTA0MzcKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBX
aGVuIGEgY29udGV4dCBtZW51IGl0ZW0gaXMgY3JlYXRlZCB3aXRoIGEgR3RrTWVudUl0ZW0gdGhh
dCBoYXMKKyAgICAgICAgYmVlbiBjcmVhdGVkIGZyb20gYSBHdGtBY3Rpb24sIGlmIHRoZSBhY3Rp
b24gaGFzIGFuIGFjY2VsZXJhdG9yLAorICAgICAgICBpdCdzIHNob3duIGluIHRoZSBtZW51IGl0
ZW0gbGFiZWwsIGxpa2UgbWVudSBpdGVtcyBpbiBhIG1lbnUKKyAgICAgICAgYmFyLiBJbiB0aGF0
IGNhc2Ugd2Ugc2hvdWxkIHJlc2V0IHRoZSBhY2NlbCBjbG9zdXJlIG9mIHRoZSBtZW51CisgICAg
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Q0LDE3IEBA
IHN0YXRpYyBQbGF0Zm9ybU1lbnVJdGVtRGVzY3JpcHRpb24gY3JlYXRlUGxhdGZvcm1NZW51SXRl
bURlc2NyaXB0aW9uKENvbnRleHRNZW51CiBDb250ZXh0TWVudUl0ZW06OkNvbnRleHRNZW51SXRl
bShQbGF0Zm9ybU1lbnVJdGVtRGVzY3JpcHRpb24gaXRlbSkKICAgICA6IG1fcGxhdGZvcm1EZXNj
cmlwdGlvbihpdGVtKQogeworICAgIC8vIERvbid0IHNob3cgYWNjZWwgbGFiZWxzIGluIGNvbnRl
eHQgbWVudSBpdGVtcy4KKyAgICBHdGtBY3Rpb24qIGFjdGlvbiA9IGd0a0FjdGlvbigpOworICAg
IGlmICghYWN0aW9uKQorICAgICAgICByZXR1cm47CisKKyAgICBpZiAoIWd0a19hY3Rpb25fZ2V0
X2FjY2VsX3BhdGgoYWN0aW9uKSkKKyAgICAgICAgcmV0dXJuOworCisgICAgR3RrV2lkZ2V0KiBj
aGlsZCA9IGd0a19iaW5fZ2V0X2NoaWxkKEdUS19CSU4oaXRlbSkpOworICAgIGlmIChHVEtfSVNf
QUNDRUxfTEFCRUwoY2hpbGQpKQorICAgICAgICBndGtfYWNjZWxfbGFiZWxfc2V0X2FjY2VsX2Ns
b3N1cmUoR1RLX0FDQ0VMX0xBQkVMKGNoaWxkKSwgMCk7CiB9CiAKIENvbnRleHRNZW51SXRlbTo6
Q29udGV4dE1lbnVJdGVtKENvbnRleHRNZW51KiBzdWJNZW51KQo=
</data>
<flag name="review"
          id="158821"
          type_id="1"
          status="+"
          setter="mrobinson"
    />
          </attachment>
      

    </bug>

</bugzilla>