]> spindle.queued.net Git - midori/commitdiff
Connect accelerators of implicitly created panel actions
authorChristian Dywan <christian@twotoasts.de>
Thu, 7 Jan 2010 20:52:06 +0000 (21:52 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 7 Jan 2010 23:16:55 +0000 (00:16 +0100)
midori/midori-panel.c

index 5f2c9720f1e5568c2edd2e238bcb7b544c45b454..b38166a95182eca0d3b8cce817afd4f61ffdc019 100644 (file)
@@ -853,13 +853,12 @@ midori_panel_append_page (MidoriPanel*    panel,
         G_CALLBACK (midori_panel_action_activate_cb), panel);
     if (panel->action_group)
     {
-        /* FIXME: For some reason the accelerator only works if a menuitem
-            is created, but not before that. */
         GtkWidget* toplevel = gtk_widget_get_toplevel (GTK_WIDGET (panel));
         GSList* groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
         gtk_action_set_accel_group (action, g_slist_nth_data (groups, 0));
         gtk_action_group_add_action_with_accel (panel->action_group,
                                                 action, NULL);
+        gtk_action_connect_accelerator (action);
     }
     if (n > 0)
         g_object_set (action, "group", g_object_get_data (