[gnome-builder] prefs: add accelerator for preferences perspective



commit 4be8f3475f7bf7d64b9141a35868c8a3518e0525
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 27 19:10:57 2016 -0700

    prefs: add accelerator for preferences perspective

 libide/application/ide-application-actions.c     |    2 --
 libide/preferences/ide-preferences-perspective.c |    7 +++++++
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libide/application/ide-application-actions.c b/libide/application/ide-application-actions.c
index 411cc16..80d4304 100644
--- a/libide/application/ide-application-actions.c
+++ b/libide/application/ide-application-actions.c
@@ -318,7 +318,6 @@ ide_application_actions_init (IdeApplication *self)
   static const gchar *left[] = { "F9", NULL };
   static const gchar *right[] = { "<shift>F9", NULL };
   static const gchar *bottom[] = { "<control>F9", NULL };
-  static const gchar *preferences[] = { "<control>comma", NULL };
   static const gchar *global_search[] = { "<control>period", NULL };
   static const gchar *new_file[] = { "<control>n", NULL };
   static const gchar *shortcuts[] = { "<control>F1", "<control><shift>question", NULL };
@@ -333,7 +332,6 @@ ide_application_actions_init (IdeApplication *self)
    * FIXME: Once we get a new shortcuts engine, port these to that.
    */
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.help", help);
-  gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.preferences", preferences);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.shortcuts", shortcuts);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "dockbin.bottom-visible", bottom);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "dockbin.left-visible", left);
diff --git a/libide/preferences/ide-preferences-perspective.c 
b/libide/preferences/ide-preferences-perspective.c
index ab4c974..657c4ec 100644
--- a/libide/preferences/ide-preferences-perspective.c
+++ b/libide/preferences/ide-preferences-perspective.c
@@ -908,6 +908,12 @@ ide_preferences_perspective_get_priority (IdePerspective *perspective)
   return IDE_PREFERENCES_PERSPECTIVE_PRIORITY;
 }
 
+static gchar *
+ide_preferences_perspective_get_accelerator (IdePerspective *perspective)
+{
+  return g_strdup ("<ctrl>comma");
+}
+
 static void
 ide_perspective_iface_init (IdePerspectiveInterface *iface)
 {
@@ -916,4 +922,5 @@ ide_perspective_iface_init (IdePerspectiveInterface *iface)
   iface->get_title = ide_preferences_perspective_get_title;
   iface->get_actions = ide_preferences_perspective_get_actions;
   iface->get_priority = ide_preferences_perspective_get_priority;
+  iface->get_accelerator = ide_preferences_perspective_get_accelerator;
 }


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