After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 526149 - GtkCellRendererAccel editing conflicts with mnemonics
GtkCellRendererAccel editing conflicts with mnemonics
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
: 140378 492761 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-04-04 13:14 UTC by Christian Persch
Modified: 2009-08-23 07:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Add checkbox as testcase for bug #526149. (1.19 KB, patch)
2008-04-04 13:16 UTC, Christian Persch
none Details | Review

Description Christian Persch 2008-04-04 13:14:47 UTC
Steps to repro:
0) Put a checkbox with mnemonic "A" in a window
1) Put a treeview with a GtkCellRendererAccel in the same window
1) Click to edit an accel
2) Press Alt-A

Actual results:
The checkbox gets focus and is toggled; the treeview/cell renderer loses focus but is not reset, nor changes to Alt-A.

Expected results:
Editing the accel to Alt-A succeeds.
Comment 1 Christian Persch 2008-04-04 13:16:12 UTC
Created attachment 108606 [details] [review]
[PATCH] Add checkbox as testcase for bug #526149.

 tests/testaccel.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
Comment 2 Christian Persch 2008-04-04 13:17:10 UTC
*** Bug 140378 has been marked as a duplicate of this bug. ***
Comment 3 Christian Persch 2008-05-29 21:15:59 UTC
*** Bug 492761 has been marked as a duplicate of this bug. ***
Comment 4 Kristian Rietveld 2008-06-08 23:09:35 UTC
Problem here seems to be that GtkWindow's default key-press-event handler gets called before the accel cell's.  Which is weird because key-press-event is a RUN_LAST signal so you would expect the accel cell's signal handler to be run first.  Need to investigate this further; should be nailed soon ;)
Comment 5 Christian Persch 2009-07-07 12:44:17 UTC
This is still reproducible using gtk+ git master. 

(In reply to comment #4)
> Need to investigate this further; should be nailed soon ;)

Did you get a chance to look into this?
Comment 6 Kristian Rietveld 2009-08-23 07:01:38 UTC
Fixed now:

commit 6320b12e8c63bd13ca33c5d206d9d2f322f8b21d
Author: Kristian Rietveld <kris@gtk.org>
Date:   Sun Aug 23 08:59:34 2009 +0200

    Bug 526149 - GtkCellRendererAccel editing conflicts with mnemonics
    
    GtkCellRendererAccel also needs to acquire the GTK+ grab in addition to
    a GDK keyboard grab.  With the GDK keyboard grab, KeyPress and
    KeyRelease events are delivered as usual, although we only want to
    receive them for our grab widget.