[gnome-builder] workbench: use "fullscreen" instead of "toggle-focus-mode"



commit ef6ab82bc57f998faaf8a394c240c0d18c547a5a
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 29 21:23:27 2017 -0700

    workbench: use "fullscreen" instead of "toggle-focus-mode"
    
    This will be more discoverable to users from the command line
    since it is the word used in other places in the stack.

 data/keybindings/shared.css                  |    1 -
 libide/application/ide-application-actions.c |    2 ++
 libide/workbench/ide-workbench-actions.c     |   11 +++++++----
 3 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/data/keybindings/shared.css b/data/keybindings/shared.css
index 260d3ca..f54bd89 100644
--- a/data/keybindings/shared.css
+++ b/data/keybindings/shared.css
@@ -19,7 +19,6 @@
 @binding-set builder-workbench-bindings
 {
   bind "<ctrl>comma" { "set-perspective" ("preferences") };
-  bind "F11" { "action" ("win", "toggle-focus-mode", "") };
 }
 
 entry.gb-command-bar-entry {
diff --git a/libide/application/ide-application-actions.c b/libide/application/ide-application-actions.c
index f44e92f..c838a9b 100644
--- a/libide/application/ide-application-actions.c
+++ b/libide/application/ide-application-actions.c
@@ -425,6 +425,7 @@ ide_application_actions_init (IdeApplication *self)
   static const gchar *help[] = { "F1", NULL };
   static const gchar *command_bar[] = { "<ctrl>Return", "<ctrl>KP_Enter", NULL };
   static const gchar *build[] = { "<ctrl>F7", NULL };
+  static const gchar *fullscreen[] = { "F11", NULL };
 
   g_action_map_add_action_entries (G_ACTION_MAP (self), IdeApplicationActions,
                                    G_N_ELEMENTS (IdeApplicationActions), self);
@@ -438,6 +439,7 @@ ide_application_actions_init (IdeApplication *self)
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "dockbin.left-visible", left);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "dockbin.right-visible", right);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "perspective.new-file", new_file);
+  gtk_application_set_accels_for_action (GTK_APPLICATION (self), "win.fullscreen", fullscreen);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "win.global-search", global_search);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "win.show-command-bar", command_bar);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "build-manager.build", build);
diff --git a/libide/workbench/ide-workbench-actions.c b/libide/workbench/ide-workbench-actions.c
index 02e1f2b..3ea45d9 100644
--- a/libide/workbench/ide-workbench-actions.c
+++ b/libide/workbench/ide-workbench-actions.c
@@ -228,12 +228,15 @@ ide_workbench_actions_counters (GSimpleAction *action,
 }
 
 static void
-ide_workbench_action_toggle_focus_mode (GSimpleAction *action,
-                                        GVariant      *state,
-                                        gpointer       user_data)
+ide_workbench_actions_fullscreen (GSimpleAction *action,
+                                  GVariant      *state,
+                                  gpointer       user_data)
 {
   IdeWorkbench *self = user_data;
 
+  g_assert (IDE_IS_WORKBENCH (self));
+  g_assert (g_variant_is_of_type (state, G_VARIANT_TYPE_BOOLEAN));
+
   ide_workbench_set_focus_mode (self, g_variant_get_boolean (state));
   g_simple_action_set_state (action, state);
 }
@@ -249,7 +252,7 @@ ide_workbench_actions_init (IdeWorkbench *self)
     { "save-all", ide_workbench_actions_save_all },
     { "save-all-quit", ide_workbench_actions_save_all_quit },
     { "counters", ide_workbench_actions_counters },
-    { "toggle-focus-mode", NULL, NULL, "false", ide_workbench_action_toggle_focus_mode },
+    { "fullscreen", NULL, NULL, "false", ide_workbench_actions_fullscreen },
   };
 
   g_action_map_add_action_entries (G_ACTION_MAP (self), actions, G_N_ELEMENTS (actions), self);


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