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 743704 - Add "Ctrl =" keyboard shortcut for zoom in
Add "Ctrl =" keyboard shortcut for zoom in
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
3.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-29 16:16 UTC by ni shengyue
Modified: 2016-01-27 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test patch (1.74 KB, patch)
2015-11-03 15:23 UTC, ni shengyue
reviewed Details | Review

Description ni shengyue 2015-01-29 16:16:07 UTC
I find the  shortcut key is confused,CTRL- is zoom out, while CTRL+ is not zoom in,I think it's strange,and suggest to fix it.
Comment 1 ni shengyue 2015-04-14 18:04:06 UTC
I know that CTRL+ means press CTRL SHIFT and +, but it's not accord people's habit, for example in Firefox, CTRL+ and CTRL- means zoom in and zoom out, linux should not be geek's OK,so I insist this style should be fixed, if possible.
Comment 2 ni shengyue 2015-04-15 00:05:23 UTC
Hi all, 

about this case, I checked the Firefox and suggest follow Firefox's method:

zoom out press 2 keys ,namely CTRL-
zoom in have 2 method:press 2 keys (CTRL=) for MS windows user style, or 3 keys(CTRL and SHIFT and =) for linux geek user.

Seems it can both meet 2 kind user's habit, can anybody agree with me? Than I can continue to modify code to vierify this solution,Thanks very much!

nishengyue
Comment 3 Sébastien Wilmet 2015-05-18 11:49:56 UTC
Here "Ctrl +" works fine, it's the zoom-in action.
Are you sure you press the +?
Comment 4 ni shengyue 2015-06-08 18:25:34 UTC
my devhelp version is 3.14.1 now, and I press "ctrl-" will zoom out,and press "ctrl" and "shift" and "=" will zoom in, it's OK, and I suggest to press "ctrl" and "=" also lead to zoom in ,just as other software like Firefox,it's common using habit from MS Windows.
Comment 5 Sébastien Wilmet 2015-06-08 18:42:20 UTC
I don't know any GNOME application that also defines "ctrl =" for zoom-in. It's dependent on the keyboard layout. With my Dvorak bépo layout, the + and = are not on the same key… The "+" in "Ctrl +" means a greater font size. "=" doesn't have this meaning.
Comment 6 ni shengyue 2015-06-09 16:14:06 UTC
It's hard to explain,I have a try because of my poor English,you can confirm one by one:

1.For example in Firefox,we zoom in by press 2 keys('ctrl' and the left side key of 'Backspace'), and zoom out by press 2 keys('ctrl' and right side key of '0'),right?This is common MS windows user's habit.

2.But for devhelp, you can't press 2 keys('ctrl' and the left side key of 'Backspace') to zoom in, but press 3 keys('ctrl' and 'shift' and left side key of 'Backspace'),right ?

3.people in irc of gnome explain that, the press 2 keys('ctrl' and  left side key of 'Backspace') means press 'ctrl' and '=', while press 3 keys('ctrl' and 'shift' and left side key of 'Backspace') means press 'ctrl' and '+', so it's gnome's logic.

4.but gnome's logic is strange to common MS Windows user, and I notice Firefox ,can press 2 key or 3 key to zoom in, so I suggest devhelp can follow Firefox's method, and both triditional gnome user and MS windows user are all happy.
Comment 7 Frederic Peters 2015-06-09 16:23:17 UTC
From ephy-window.c:

/* Zoom In */

        { "ViewZoomIn", NULL, N_("Zoom _In"), "<control>plus", NULL,
          G_CALLBACK (window_cmd_view_zoom_in) },
        { GDK_KEY_plus,         GDK_CONTROL_MASK,       "ViewZoomIn",            FALSE },
        { GDK_KEY_KP_Add,       GDK_CONTROL_MASK,       "ViewZoomIn",            FALSE },
        { GDK_KEY_equal,        GDK_CONTROL_MASK,       "ViewZoomIn",            FALSE },
        { XF86XK_ZoomIn,        0,                      "ViewZoomIn",           FALSE },

/* Zoom Out */

        { "ViewZoomOut", NULL, N_("Zoom O_ut"), "<control>minus", NULL,
          G_CALLBACK (window_cmd_view_zoom_out) },
        { GDK_KEY_minus,        GDK_CONTROL_MASK,       "ViewZoomOut",           FALSE },
        { GDK_KEY_KP_Subtract,  GDK_CONTROL_MASK,       "ViewZoomOut",           FALSE },
        { XF86XK_ZoomOut,       0,                      "ViewZoomOut",          FALSE }


I wouldn't mind the same behaviour.
Comment 8 ni shengyue 2015-06-09 16:32:09 UTC
yes,just as  Frederic Peters show code of epiphany,I indeed suggest devhelp can also merge this feature.
nishengyue
Comment 9 ni shengyue 2015-11-03 15:23:01 UTC
Created attachment 314740 [details] [review]
test patch

The attachment is my patch for this case submited by myself, please help to review it and check if it can merge the code repository.Thanks.

nisy
Comment 10 Sébastien Wilmet 2015-11-04 15:01:43 UTC
Review of attachment 314740 [details] [review]:

> and check if it can merge the code repository

At the time of submitting the patch, it's your responsibility to check that it merges fine on master!

The commit message should contain the bug URL at the end. The commit title could be: "Add more keybindings for zoom in/out", with a longer explanation after that (summarizing the bug report).

Note that I'm not a maintainer of Devhelp, I'm just helping for the reviews.

::: src/dh-app.c
@@ +349,3 @@
 
+        accels[0] = "<Primary>minus";
+        accels[1] = "<Primary>underscore";  /* GNOME Bugzilla 743704 :zomm in/out as Firefox rule*/

I would remove the comment, the information is anyway available in the git history, easily accessible with git blame.
Comment 11 ni shengyue 2016-01-09 04:57:28 UTC
Thanks, and is there any rule or demo to prepare the patch? I will study it.
And what should I do next about this case? Thanks.

nishengyue
Comment 12 Frederic Peters 2016-01-27 14:52:59 UTC
I missed the patch here, I had it done locally (only zoom in, based on the subject of this report, but I later tried ctrl_ in Firefox and it doesn't have any effect here).

Anyway, that's in, thank you.