[gnome-notes/libreajans/gnome-notes-helpoverlay: 3/5] Restore Undo and Redo shortcuts



commit d15987bb6b6e02a974bee7a509ec47e8ba3b15c9
Author: Sabri Ünal <libreajans gmail com>
Date:   Thu Feb 13 12:46:00 2020 +0300

    Restore Undo and Redo shortcuts

 src/bjb-application.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/bjb-application.c b/src/bjb-application.c
index e4def44..83107dd 100644
--- a/src/bjb-application.c
+++ b/src/bjb-application.c
@@ -390,12 +390,16 @@ bijiben_startup (GApplication *application)
   g_autoptr(GError) error = NULL;
   GdkRGBA         color = {0,0,0,0};
 
+  const gchar *vaccels_redo[] = {"<Primary><Shift>z", NULL};
+  const gchar *vaccels_undo[] = {"<Primary>z", NULL};
 
   G_APPLICATION_CLASS (bjb_application_parent_class)->startup (application);
   self = BJB_APPLICATION (application);
 
   bjb_apply_style ();
 
+  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);
   g_action_map_add_action_entries (G_ACTION_MAP (application),
                                    app_entries,
                                    G_N_ELEMENTS (app_entries),


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