]> www.fi.muni.cz Git - evince.git/commitdiff
[previewer] Fix keybindings in previewer window
authorCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 31 Mar 2010 12:54:11 +0000 (14:54 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 31 Mar 2010 14:17:02 +0000 (16:17 +0200)
See bug #612972.

previewer/ev-previewer-window.c

index fd2fe37162a246112b87c6cc3bbafed08cf99bb8..2c884f67c6f007b70f50d732056face514dd4f77 100644 (file)
@@ -318,6 +318,18 @@ ev_previewer_window_set_document (EvPreviewerWindow *window,
        gtk_action_group_set_sensitive (window->action_group, TRUE);
 }
 
+static void
+ev_previewer_window_connect_action_accelerators (EvPreviewerWindow *window)
+{
+       GList *actions;
+
+       gtk_ui_manager_ensure_update (window->ui_manager);
+
+       actions = gtk_action_group_list_actions (window->action_group);
+       g_list_foreach (actions, (GFunc)gtk_action_connect_accelerator, NULL);
+       g_list_free (actions);
+}
+
 static void
 ev_previewer_window_dispose (GObject *object)
 {
@@ -478,6 +490,11 @@ ev_previewer_window_constructor (GType                  type,
        g_free (ui_path);
        g_free (datadir);
 
+       /* GTKUIManager connects actions accels only for menu items,
+        * but not for tool items. See bug #612972.
+        */
+       ev_previewer_window_connect_action_accelerators (window);
+
        view_sizing_mode_changed (window->model, NULL, window);
 
        vbox = gtk_vbox_new (FALSE, 0);