[gedit/wip/correct-tab-switching-keybindings] Ctrl+PgUp/PgDown for tab switching
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/correct-tab-switching-keybindings] Ctrl+PgUp/PgDown for tab switching
- Date: Sun, 6 Dec 2015 15:40:41 +0000 (UTC)
commit c30af776cc554b122765efbf834382c00674d1d1
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Dec 6 16:37:17 2015 +0100
Ctrl+PgUp/PgDown for tab switching
Ctrl+PgUp and Ctrl+PgDown are the expected keybindings for tab
switching.
But those keybindings already have actions in GtkTextView and
GtkScrolledWindow. So disable the keybindings at those places. For
GtkScrolledWindow, do it only for GeditNotebook descendants.
gedit/gedit-app.c | 4 ++--
gedit/resources/css/gedit-style.css | 8 ++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index db5300f..82a303c 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -825,8 +825,8 @@ gedit_app_startup (GApplication *application)
add_accelerator (GTK_APPLICATION (application), "win.new-tab-group", "<Primary><Alt>N");
add_accelerator (GTK_APPLICATION (application), "win.previous-tab-group",
"<Primary><Shift><Alt>Page_Up");
add_accelerator (GTK_APPLICATION (application), "win.next-tab-group",
"<Primary><Shift><Alt>Page_Down");
- add_accelerator (GTK_APPLICATION (application), "win.previous-document", "<Primary><Alt>Page_Up");
- add_accelerator (GTK_APPLICATION (application), "win.next-document", "<Primary><Alt>Page_Down");
+ add_accelerator (GTK_APPLICATION (application), "win.previous-document", "<Primary>Page_Up");
+ add_accelerator (GTK_APPLICATION (application), "win.next-document", "<Primary>Page_Down");
load_accels ();
diff --git a/gedit/resources/css/gedit-style.css b/gedit/resources/css/gedit-style.css
index 2223e86..ea9f2a3 100644
--- a/gedit/resources/css/gedit-style.css
+++ b/gedit/resources/css/gedit-style.css
@@ -58,3 +58,11 @@ GeditFileBrowserWidget .small-button {
padding: 2px 4px;
}
+ binding-set TabSwitching {
+ unbind "<Control>Page_Up";
+ unbind "<Control>Page_Down";
+}
+
+GeditView, GeditNotebook GtkScrolledWindow {
+ gtk-key-bindings: TabSwitching;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]