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 778606 - Shortcut for Incognito Window does not work
Shortcut for Incognito Window does not work
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
3.23.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-14 13:02 UTC by adria.arrufat
Modified: 2017-02-15 01:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Restore keybinding Ctrl+Shift+N for opening incognito windows (1.49 KB, patch)
2017-02-14 13:43 UTC, Adrian Perez
none Details | Review
[PATCH v2] Restore keybinding Ctrl+Shift+N for opening incognito windows (1.50 KB, patch)
2017-02-14 13:47 UTC, Adrian Perez
none Details | Review
[PATCH v3] Restore keybinding Ctrl+Shift+N for opening incognito windows (2.46 KB, patch)
2017-02-14 18:20 UTC, Adrian Perez
committed Details | Review

Description adria.arrufat 2017-02-14 13:02:49 UTC
Using latest master version 3.23.90+, New Incognito Window shortcut (Shift+Ctrl+N) does not work.
Other shortcuts seem to work (new window, search, history).

The problem exists in both X and Wayland.
Comment 1 Adrian Perez 2017-02-14 13:36:52 UTC
Confirmed. I have been taking a look at the changes since then, and my prime
suspect is this commit, which removes old (non-GAction) code to handle the
Ctrl+Shift+N keybinding:

  https://git.gnome.org/browse/epiphany/commit/?id=8c2427f3b

So the only place now which defines a keyboard shortcut for opening an
incognito window is “src/resources/gtk/application-menu.ui”, which has:

  <item>                                                                     
     <attribute name="label" translatable="yes">New _Incognito Window</attribute>
     <attribute name="action">app.new-incognito</attribute>                                                                                                 
     <attribute name="accel">&lt;Primary&gt;i</attribute>                     
  </item>

Therefore the only working keyboard shortcut presently is <Primary>i (which
translates into Ctrl+I for most platforms). We have to decide one of the
following options:

 1. Keeping only Ctrl+I (<Primary>i): This implies changing the keyboard
    shortcuts help popup window and documentation.
 2. Changing it to Ctrl+Shift+N (<Primary><Shift>n): This means we lose
    Ctrl+I, but I am going to guess most people use Ctrl+Shift+N because
    of the orthogonality with Ctrl+N, so this is my preferred solution.
 3. Add additional code to be able to use *both* keyboard shortcuts.

Personally I would go for (2).
Comment 2 Adrian Perez 2017-02-14 13:43:11 UTC
Created attachment 345732 [details] [review]
[PATCH] Restore keybinding Ctrl+Shift+N for opening incognito windows
Comment 3 Adrian Perez 2017-02-14 13:47:31 UTC
Created attachment 345734 [details] [review]
[PATCH v2] Restore keybinding Ctrl+Shift+N for opening incognito windows
Comment 4 Michael Catanzaro 2017-02-14 15:53:44 UTC
Review of attachment 345734 [details] [review]:

OK, but please also edit ephy_window_should_view_receive_key_press_event() to ensure webpages cannot intercept this shortcut. We couldn't do that for Ctrl+I since it's often used for italics, but we do it for Ctrl+N and should do it for Ctrl+Shift+N as well.
Comment 5 Adrian Perez 2017-02-14 18:20:13 UTC
Created attachment 345748 [details] [review]
[PATCH v3] Restore keybinding Ctrl+Shift+N for opening incognito windows

This new version handles adds Ctrl+Shift+N as one of the keyboard shortcuts
that webpages cannot handle, so users can always open a new window (Ctrl+N
is also handled this way).
Comment 6 Michael Catanzaro 2017-02-14 19:17:24 UTC
Review of attachment 345748 [details] [review]:

Yup
Comment 7 Adrian Perez 2017-02-14 22:09:59 UTC
(In reply to Michael Catanzaro from comment #6)
> Review of attachment 345748 [details] [review] [review]:
> 
> Yup

FWIW, I do not have commit access to the repository, if an Epiphany
maintainer could land the patch, that would be great. Thanks!