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 693830 - Ctrl + "+" doesn't zoom in
Ctrl + "+" doesn't zoom in
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
: 711792 734634 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-02-14 17:35 UTC by António Fernandes
Modified: 2014-08-12 00:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to handle multiple accels per action (1.38 KB, patch)
2014-03-10 23:22 UTC, Daniel Goetz
reviewed Details | Review

Description António Fernandes 2013-02-14 17:35:25 UTC
Ctrl + "+" and Ctrl + "-" are the standard shortcuts for zoom in and zoom out. Currently, when previewing a document, Ctrl + "-" works, but Ctrl + "+" doesn't.

I found that Ctrl + "=" is used instead, which I suppose makes life easier for en-US layout users, but makes no sense for pt-PT and probably others layouts.
Comment 1 Cosimo Cecchi 2013-02-18 22:54:27 UTC
We actually add both in Documents.
This seems to be a bug in GtkApplication, where adding two different accelerators for the same action doesn't work.
Comment 2 Lars Karlitski 2013-12-11 14:06:43 UTC

*** This bug has been marked as a duplicate of bug 695917 ***
Comment 3 António Fernandes 2013-12-11 16:43:23 UTC
Reopening and reassigning back to gnome-documents because the original bug as described in comment 0 is still valid.

See also bug 695917 comment 4 and bug 695917 comment 5.
Comment 4 Cosimo Cecchi 2014-03-10 17:18:44 UTC
*** Bug 711792 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Goetz 2014-03-10 23:22:59 UTC
Created attachment 271492 [details] [review]
Patch to handle multiple accels per action

in _initAction it is now checked, if actionEntry.accel is an array, if so, the
new function "set_accels_for_action()" is used.
Comment 6 Cosimo Cecchi 2014-03-11 22:51:09 UTC
Review of attachment 271492 [details] [review]:

Thanks Daniel! This looks mostly good, with only some stylistic comment below.

::: application.js.bak
@@ +248,3 @@
 
+                if (actionEntry.accel){
+                    if (actionEntry.accel instanceof Array) {

Indentation is off in the inner block here - should be four spaces.

@@ +249,3 @@
+                if (actionEntry.accel){
+                    if (actionEntry.accel instanceof Array) {
+                     this.set_accels_for_action(action.print_detailed_name("app."+actionEntry.name,null),actionEntry.accel);

Should use single quotes here and also spaces between "+" and "actionEntry".

@@ +452,3 @@
             { name: 'find-prev', accel: '<Shift><Primary>g',
               window_mode: WindowMode.WindowMode.PREVIEW },
+            { name: 'zoom-in', accel: ['<Primary>plus','<Primary>equal'],

I'm wondering if it wouldn't be better instead to special case the array to have a different "accels" property - but this is also OK.
Comment 7 Cosimo Cecchi 2014-03-18 14:31:56 UTC
I now pushed a slightly changed version of this patch with the proposed changes, since we're approaching hard code freeze.
Comment 8 Debarshi Ray 2014-08-12 00:35:48 UTC
*** Bug 734634 has been marked as a duplicate of this bug. ***