[gnome-notes] Add new shortcut: Ctrl+D: Open in New Window
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-notes] Add new shortcut: Ctrl+D: Open in New Window
- Date: Mon, 17 Feb 2020 01:21:36 +0000 (UTC)
commit f68ffe73f8f43f8cb71994c3732d5bf0a9e7765a
Author: Sabri Ünal <libreajans gmail com>
Date: Thu Feb 13 12:48:30 2020 +0300
Add new shortcut: Ctrl+D: Open in New Window
data/resources/help-overlay.ui | 7 +++++++
src/bjb-application.c | 2 ++
2 files changed, 9 insertions(+)
---
diff --git a/data/resources/help-overlay.ui b/data/resources/help-overlay.ui
index 3256b50..e342685 100644
--- a/data/resources/help-overlay.ui
+++ b/data/resources/help-overlay.ui
@@ -69,6 +69,13 @@
<object class="GtkShortcutsGroup">
<property name="title" translatable="yes" context="shortcut window">Note edit
mode</property>
<property name="visible">True</property>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="accelerator"><Primary>d</property>
+ <property name="title" translatable="yes" context="shortcut window">Open in
a new window</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
<child>
<object class="GtkShortcutsShortcut">
<property name="accelerator"><Primary>b</property>
diff --git a/src/bjb-application.c b/src/bjb-application.c
index 807f812..2f6ef60 100644
--- a/src/bjb-application.c
+++ b/src/bjb-application.c
@@ -390,6 +390,7 @@ bijiben_startup (GApplication *application)
g_autoptr(GError) error = NULL;
GdkRGBA color = {0,0,0,0};
+ const gchar *vaccels_detach[] = {"<Primary>d", NULL};
const gchar *vaccels_redo[] = {"<Primary><Shift>z", NULL};
const gchar *vaccels_undo[] = {"<Primary>z", NULL};
const gchar *vaccels_trash[] = {"<Primary>Delete", NULL};
@@ -399,6 +400,7 @@ bijiben_startup (GApplication *application)
bjb_apply_style ();
+ gtk_application_set_accels_for_action (GTK_APPLICATION (application), "win.detach-window",
vaccels_detach);
gtk_application_set_accels_for_action (GTK_APPLICATION (application), "win.redo", vaccels_redo);
gtk_application_set_accels_for_action (GTK_APPLICATION (application), "win.undo", vaccels_undo);
gtk_application_set_accels_for_action (GTK_APPLICATION (application), "win.trash", vaccels_trash);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]