[gedit/wip/redesign] Add accelerators



commit 97a8c9650aa18b106db8d0c7fa60e776027f76a5
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Fri May 10 11:17:46 2013 +0200

    Add accelerators

 gedit/gedit-app.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 6eba384..2f2c5c4 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -509,6 +509,48 @@ gedit_app_startup (GApplication *application)
                g_object_unref (builder);
        }
 
+       /* Accelerators */
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>O", "win.open", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>S", "win.save", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Shift>S", "win.save_as", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Shift>L", "win.save_all", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>T", "win.new_tab", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>W", "win.close", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Shift>W", "win.close_all", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>F", "win.find", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>H", "win.replace", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Shift>K", "win.clear_highlight", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>I", "win.goto_line", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control>P", "win.print", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "F11", "win.fullscreen", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Alt>N", "win.new_tab_group", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Shift><Alt>Page_Up",
+                                        "win.previous_tab_group", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Shift><Alt>Page_Down",
+                                        "win.next_tab_group", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Alt>Page_Up",
+                                        "win.previous_document", NULL);
+       gtk_application_add_accelerator (GTK_APPLICATION (application),
+                                        "<Control><Alt>Page_Down",
+                                        "win.next_document", NULL);
+
        /*
         * We use the default gtksourceview style scheme manager so that plugins
         * can obtain it easily without a gedit specific api, but we need to


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