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 345339 - keybinding for zoom is wrong
keybinding for zoom is wrong
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.7.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2006-06-19 17:36 UTC by Don Scorgie
Modified: 2006-10-19 17:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Fix to allow detection of Ctrl +/- (851 bytes, patch)
2006-09-16 19:51 UTC, Michael Chudobiak
none Details | Review

Description Don Scorgie 2006-06-19 17:36:19 UTC
The menu entry for the zoom keybingings claim that to zoom in is "ctrl+ +" and zoom out is "ctrl + -".

In actuality, the ctrl+ {+,-} don't work when using the numpad, but without ctrl works.  Using the "normal" + and - keys work with ctrl, but don't seem to require it.

Using Ubuntu Dapper
Comment 1 Michael Chudobiak 2006-09-14 18:44:59 UTC
Hmm, relevant code snippet (duplicated several places):

        /* Zoom in. */
    case GDK_plus:
    case GDK_equal:
    case GDK_KP_Add:
        image_viewer_zoom_in (viewer);
        break;

        /* Zoom out. */
    case GDK_minus:
    case GDK_KP_Subtract:
        image_viewer_zoom_out (viewer);
        break;

It looks like the Ctrl key status is simply ignored. The +/= key (GDK_plus, GDK_equal) works whether Ctrl is pressed or not. It looks like the numeric keypad "+" (GDK_KP_Add) should work the same way. But it doesn't...

Maybe this is a GDK bug?
Comment 2 Michael Chudobiak 2006-09-16 19:51:46 UTC
Created attachment 72909 [details] [review]
Fix to allow detection of Ctrl +/-

Not a GDK bug. In src/gth-browser.c (key_press_cb), this piece of code makes the function

	if ((event->state & GDK_CONTROL_MASK) || (event->state & GDK_MOD1_MASK))
		return FALSE;

return if the control modifier is set, before interpreting the key pressed. ctrl++ and ctrl+- work, because they are connect to the toolbar zoom buttons in src/gth-window-actions-entries.h.

Patch attached.
Comment 3 Michael Chudobiak 2006-10-19 17:47:05 UTC
Fixed in CVS.

- Mike