From: Carlos Garcia Campos Date: Wed, 31 Mar 2010 12:54:11 +0000 (+0200) Subject: [previewer] Fix keybindings in previewer window X-Git-Tag: EVINCE_2_30_1~19 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=29e2d2c5e24bb6925b488233b22cc78aed6860e2;p=evince.git [previewer] Fix keybindings in previewer window See bug #612972. --- diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c index fd2fe371..2c884f67 100644 --- a/previewer/ev-previewer-window.c +++ b/previewer/ev-previewer-window.c @@ -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);