[rhythmbox] display-page-tree: alt-a accelerator for the add button
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] display-page-tree: alt-a accelerator for the add button
- Date: Thu, 11 Apr 2013 08:56:52 +0000 (UTC)
commit dc8e262b9feb7c697f78e0a6794519fe0c75004a
Author: Jonathan Matthew <jonathan d14n org>
Date: Thu Apr 11 09:23:42 2013 +1000
display-page-tree: alt-a accelerator for the add button
sources/rb-display-page-tree.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/sources/rb-display-page-tree.c b/sources/rb-display-page-tree.c
index 6556c9f..d2dd045 100644
--- a/sources/rb-display-page-tree.c
+++ b/sources/rb-display-page-tree.c
@@ -878,6 +878,7 @@ impl_constructed (GObject *object)
GMenuModel *menu;
GtkBuilder *builder;
GApplication *app;
+ GtkAccelGroup *accel_group;
GActionEntry actions[] = {
{ "display-page-remove", remove_action_cb },
@@ -1045,6 +1046,15 @@ impl_constructed (GObject *object)
gtk_toolbar_insert (GTK_TOOLBAR (display_page_tree->priv->toolbar), button, -1);
g_object_unref (icon);
+ g_object_get (display_page_tree->priv->shell, "accel-group", &accel_group, NULL);
+ gtk_widget_add_accelerator (display_page_tree->priv->add_menubutton,
+ "activate",
+ accel_group,
+ GDK_KEY_A,
+ GDK_MOD1_MASK,
+ GTK_ACCEL_VISIBLE);
+ g_object_unref (accel_group);
+
builder = rb_builder_load ("display-page-add-menu.ui", NULL);
menu = G_MENU_MODEL (gtk_builder_get_object (builder, "display-page-add-menu"));
rb_application_link_shared_menus (RB_APPLICATION (g_application_get_default ()), G_MENU (menu));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]