[gnome-builder] workbench: focus workbench menu with F10
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] workbench: focus workbench menu with F10
- Date: Mon, 13 Apr 2015 22:15:14 +0000 (UTC)
commit d05036dd2e18adac702cc202210c087ccb857c7a
Author: Christian Hergert <christian hergert me>
Date: Mon Apr 13 15:15:08 2015 -0700
workbench: focus workbench menu with F10
This matches the accelerator in other applications such as gedit.
src/app/gb-application.c | 1 +
src/workbench/gb-workbench-actions.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 2420043..eb9906f 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -153,6 +153,7 @@ gb_application_load_keybindings (GbApplication *self)
g_autofree gchar *name = NULL;
static const struct { gchar *name; gchar *binding; } shared_bindings[] = {
{ "workspace.toggle-sidebar", "F9" },
+ { "workbench.show-gear-menu", "F10" },
{ "workbench.global-search", "<ctrl>period" },
{ "app.preferences", "<ctrl>comma" },
{ NULL }
diff --git a/src/workbench/gb-workbench-actions.c b/src/workbench/gb-workbench-actions.c
index fb0bf1f..e8a8d90 100644
--- a/src/workbench/gb-workbench-actions.c
+++ b/src/workbench/gb-workbench-actions.c
@@ -270,6 +270,18 @@ gb_workbench_actions_search_docs (GSimpleAction *action,
gb_editor_workspace_search_help (self->editor_workspace, str);
}
+static void
+gb_workbench_actions_show_gear_menu (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ GbWorkbench *self = user_data;
+
+ g_assert (GB_IS_WORKBENCH (self));
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->gear_menu_button), TRUE);
+}
+
static const GActionEntry GbWorkbenchActions[] = {
{ "build", gb_workbench_actions_build },
{ "dayhack", gb_workbench_actions_dayhack },
@@ -282,6 +294,7 @@ static const GActionEntry GbWorkbenchActions[] = {
{ "save-all", gb_workbench_actions_save_all },
{ "search-docs", gb_workbench_actions_search_docs, "s" },
{ "show-command-bar", gb_workbench_actions_show_command_bar },
+ { "show-gear-menu", gb_workbench_actions_show_gear_menu },
};
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]