Enabled accelerators.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 22 Apr 2007 14:39:40 +0000 (16:39 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 22 Apr 2007 14:39:40 +0000 (16:39 +0200)
src/rakt-window.c

index 7cea82202828ca59208b9f1b1c394fdc9bc53009..b929331400187d21b5f1472ae15845c73071525f 100644 (file)
@@ -176,6 +176,7 @@ window_create_menu (RaktWindow *window)
 {
        RaktWindowPriv *priv;
        GtkActionGroup *action_group;
+       GtkAccelGroup *accel_group;
        GError *error = NULL;
 
        priv = GET_PRIV (window);
@@ -191,6 +192,10 @@ window_create_menu (RaktWindow *window)
        gtk_action_group_add_actions (action_group, action_entries,
                                      G_N_ELEMENTS (action_entries), window);
        gtk_ui_manager_insert_action_group (priv->ui_manager, action_group, 0);
+
+       accel_group = gtk_ui_manager_get_accel_group (priv->ui_manager);
+       gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
+
        g_object_unref (action_group);
 
        gtk_ui_manager_add_ui_from_string (priv->ui_manager, ui_layout, -1, &error);