[epiphany] Restore keybinding Ctrl+Shift+N for opening incognito windows



commit ed54cf59236c20835b47ea168c29eec74627d060
Author: Adrian Perez de Castro <aperez igalia com>
Date:   Tue Feb 14 15:39:18 2017 +0200

    Restore keybinding Ctrl+Shift+N for opening incognito windows
    
    This was lost after 8c2427f3b, which removed the old (non-GAction) code
    for handling this shortcut. A side effect of this patch is that we lose
    the ability of opening new incognito windows with Ctrl+I, but probably
    most people do no even know about that one: Firefox uses Ctrl+Shift+P,
    and Chrom{e,ium} use Ctrl+Shift+N. Also, Ctrl+Shift+N is orthogonal with
    Ctrl+N, which opens a new window.
    
    Additionally, handle Ctrl+Shift+N as one of the keyboard shortcuts that
    the web view should not be able to intercept (like Ctrl+N) so a webpage
    will not prevent users from creating new windows.
    
    TL;DR: Nobody is going to miss Ctrl+I, but people are already missing
    Ctrl+Shift+I.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=778606

 src/ephy-window.c                     |    3 ++-
 src/resources/gtk/application-menu.ui |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index b3a31e3..822776c 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -542,7 +542,8 @@ ephy_window_should_view_receive_key_press_event (EphyWindow  *window,
            keyval != GDK_KEY_KP_3;        /* Next Tab */
 
   if ((event->state & state_mask) == (GDK_SHIFT_MASK | GDK_CONTROL_MASK))
-    return keyval != GDK_KEY_Page_Up &&   /* Move Tab Left */
+    return keyval != GDK_KEY_n &&         /* New Incognito Window */
+           keyval != GDK_KEY_Page_Up &&   /* Move Tab Left */
            keyval != GDK_KEY_KP_9 &&      /* Move Tab Left */
            keyval != GDK_KEY_Page_Down && /* Move Tab Right */
            keyval != GDK_KEY_KP_3;        /* Move Tab Right */
diff --git a/src/resources/gtk/application-menu.ui b/src/resources/gtk/application-menu.ui
index f86a710..9ba1775 100644
--- a/src/resources/gtk/application-menu.ui
+++ b/src/resources/gtk/application-menu.ui
@@ -10,7 +10,7 @@
       <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>
+        <attribute name="accel">&lt;Primary&gt;&lt;Shift&gt;n</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">Reopen Closed _Tab</attribute>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]