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 137151 - Accelerators of hidden menu bars are disabled with update to gtk+-2.4
Accelerators of hidden menu bars are disabled with update to gtk+-2.4
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: Other
2.3.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 137463 139507 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-03-14 13:34 UTC by Hans Breuer
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hans Breuer 2004-03-14 13:34:04 UTC
The image view does not get accelerators like +/- (zoom in/out)
anymore when the gtk version is updated from 2.2.x to 2.3.x
(soon to be 2.4).

This can be considered as a gtk+ abi breakage but OTOH the
accelerators function of Dia are not affected by the gtk+ 
update (maybe cause it's calling gtk_accel_group_new() at the
right place itself ?).

One prerequisite for The Gimp accelerators to not work
anymore is to disable the image view menubar, i.e. they do
work regardless of gtk version with the per image menubar 
switched on.

The backend code for key handling on win32 did not change 
significant so I assume this to be a cross platform issue
(or at least I don't know where to look next, even gtkaccel*
and gtkitem* seem almost unchanged ;-)

Any hint how to fix it (beside switching on the image menu bar)
woud be appreciated.

Thanks,
    Hans
Comment 1 Sven Neumann 2004-03-14 13:53:17 UTC
Can this be verified on other platforms?

IMO it should be reassigned to GTK+ because a GTK+ update should not
break any working features. But then, we might be doing something nasty...
Comment 2 Michael Natterer 2004-03-14 14:22:30 UTC
Confirmed to not work on X11 either.
Comment 3 Michael Natterer 2004-03-16 11:37:28 UTC
Bug was originally reported against GIMP 2.0pre.
Comment 4 Owen Taylor 2004-03-16 18:27:04 UTC
It's an intentional change and fixed a bunch of problems; I
think it's a correct change too.

Thu Nov 27 16:19:03 2003  Tim Janik  <timj@gtk.org>
                                                                     
          
        * gtk/gtkmenu.c: allow accel activation depending on sensitivity
        and the attach widget.
                                                                     
          
        * gtk/gtkmenuitem.c: allow accel activation depending on
visibility,
        sensitivity and the parent menu.
                                                                     
          
        * gtk/gtkwidget.[hc]: introduced ::can-activate-accel signal which
        checks whether accelerators may activate a widget. the default
handler
        demands the widget be sensitive and visible+viewable.

The only question is whether it is a *compatible* correct
change, which I don't have a good answer for; was being
able to activate accelerators on a hidden menu a bug or
a feature? 

However, since we are at the release point, I'm going to
have to say it was a bug; I don't want to switch this back
at the last moment.

You can work around this with a signal connection
to can-activate-accel on your menubar.
Comment 5 Michael Natterer 2004-03-17 11:57:05 UTC
I must say I agree that the new behavior makes more
sense. We will have to add some runtime checks for
the GTK version used anyway because I consider it
impossible to keep GTK's behavior 100% the same given
the huge amount of changes since 1.2.

Will the same fix also be needed once we switched
to GtkActionGroup?
Comment 6 Michael Natterer 2004-03-19 12:54:07 UTC
For the record: added the described workaround in GIMP:

2004-03-19  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): added
	runtime check for GTK+ >= 2.4.0 and make sure the menubar's accels
	can be invoked even if the menubar is invisible (workaround for
	bug #137151).
Comment 7 Michael Natterer 2004-04-08 20:19:05 UTC
*** Bug 139507 has been marked as a duplicate of this bug. ***
Comment 8 Sven Neumann 2004-04-13 19:55:48 UTC
*** Bug 137463 has been marked as a duplicate of this bug. ***