[gnome-builder] editor: register accelerator for editor perspective



commit 74f4bdcfb46d68e507a56b16314ea2584f0ee674
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 27 19:12:18 2016 -0700

    editor: register accelerator for editor perspective
    
    I'm not sure if this one will live long term, but we discussed the idea
    of having <alt>1...n for some typical perspectives as they land.
    
    Still a bit unsure of it though.
    
    What I wish we could do is register <alt>F1..n for these perspectives,
    but many of those are taken by things like help, or the shell.

 libide/editor/ide-editor-perspective.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libide/editor/ide-editor-perspective.c b/libide/editor/ide-editor-perspective.c
index 68953ed..2c8a0b7 100644
--- a/libide/editor/ide-editor-perspective.c
+++ b/libide/editor/ide-editor-perspective.c
@@ -494,6 +494,12 @@ ide_editor_perspective_agree_to_shutdown (IdePerspective *perspective)
   return TRUE;
 }
 
+static gchar *
+ide_editor_perspective_get_accelerator (IdePerspective *perspective)
+{
+  return g_strdup ("<alt>1");
+}
+
 static void
 ide_perspective_iface_init (IdePerspectiveInterface *iface)
 {
@@ -503,6 +509,7 @@ ide_perspective_iface_init (IdePerspectiveInterface *iface)
   iface->get_id = ide_editor_perspective_get_id;
   iface->get_title = ide_editor_perspective_get_title;
   iface->views_foreach = ide_editor_perspective_views_foreach;
+  iface->get_accelerator = ide_editor_perspective_get_accelerator;
 }
 
 static void


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