[gnome-system-log] window: add an F10 accelerator for the gear menu
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-log] window: add an F10 accelerator for the gear menu
- Date: Mon, 5 Nov 2012 15:29:04 +0000 (UTC)
commit 6aaca4f9b1c60e9afbe44ed69429e9a79c98836e
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Nov 5 10:28:16 2012 -0500
window: add an F10 accelerator for the gear menu
https://bugzilla.gnome.org/show_bug.cgi?id=687551
src/logview-app.c | 3 +++
src/logview-window.c | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/logview-app.c b/src/logview-app.c
index 900e2eb..d342d67 100644
--- a/src/logview-app.c
+++ b/src/logview-app.c
@@ -348,6 +348,9 @@ logview_app_init_actions (LogviewApp *app)
app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "app-menu"));
gtk_application_set_app_menu (GTK_APPLICATION (app), app_menu);
+ /* menu accel */
+ SIMPLE_ACCEL (app, "F10", "win.gear-menu");
+
/* action accels */
SIMPLE_ACCEL (app, "<Control>f", "win.search");
SIMPLE_ACCEL (app, "<Control>o", "win.open");
diff --git a/src/logview-window.c b/src/logview-window.c
index e802037..832cfe8 100644
--- a/src/logview-window.c
+++ b/src/logview-window.c
@@ -1139,6 +1139,7 @@ action_toggle (GSimpleAction *action,
static GActionEntry action_entries[] = {
{ "autoscroll", action_toggle, NULL, "true", action_autoscroll_change_state },
{ "search", action_toggle, NULL, "false", action_search_change_state },
+ { "gear-menu", action_toggle, NULL, "false", NULL },
{ "open", action_open, NULL, NULL, NULL },
{ "close", action_close, NULL, NULL, NULL },
{ "copy", action_copy, NULL, NULL, NULL },
@@ -1204,6 +1205,7 @@ logview_window_init (LogviewWindow *logview)
gtk_builder_add_from_resource (builder, "/org/gnome/logview/logview-gear-menu.ui", NULL);
menu = G_MENU_MODEL (gtk_builder_get_object (builder, "gear-menu"));
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (w), menu);
+ gtk_actionable_set_action_name (GTK_ACTIONABLE (w), "win.gear-menu");
priv->filters_placeholder = G_MENU_MODEL (gtk_builder_get_object (builder, "filters-placeholder"));
g_object_unref (builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]