From 6a28b5037cf06f218c7fde1a3dc046743ad4971e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Aliste?= Date: Mon, 27 May 2013 23:47:01 -0400 Subject: shell: Remove ev_window_set_view_accels_sensitivity Now that we chain the accels to the focused widget, we do not need anymore to disable accels when the view is not focused. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=39defbd --- shell/ev-window.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/shell/ev-window.c b/shell/ev-window.c index b415234f..4899ea5e 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -635,36 +635,6 @@ ev_window_update_actions (EvWindow *ev_window) } } -static const gchar *view_accels[] = { - "PageDown", - "PageUp", - "Plus", - "Minus", - "KpPlus", - "KpMinus", - "Equal", - "p", - "n", - "FitPage", - "FitWidth" -}; - -static void -ev_window_set_view_accels_sensitivity (EvWindow *window, gboolean sensitive) -{ - gboolean can_find; - gint i; - - if (!window->priv->action_group) - return; - - for (i = 0; i < G_N_ELEMENTS (view_accels); i++) - ev_window_set_action_sensitive (window, view_accels[i], sensitive); - - can_find = window->priv->document && EV_IS_DOCUMENT_FIND (window->priv->document); - ev_window_set_action_sensitive (window, "Slash", sensitive && can_find); -} - static void set_widget_visibility (GtkWidget *widget, gboolean visible) { @@ -6736,8 +6706,6 @@ view_actions_focus_in_cb (GtkWidget *widget, GdkEventFocus *event, EvWindow *win update_chrome_flag (window, EV_CHROME_RAISE_TOOLBAR, FALSE); ev_window_set_action_sensitive (window, "ViewToolbar", TRUE); - ev_window_set_view_accels_sensitivity (window, TRUE); - update_chrome_visibility (window); return FALSE; @@ -6746,8 +6714,6 @@ view_actions_focus_in_cb (GtkWidget *widget, GdkEventFocus *event, EvWindow *win static gboolean view_actions_focus_out_cb (GtkWidget *widget, GdkEventFocus *event, EvWindow *window) { - ev_window_set_view_accels_sensitivity (window, FALSE); - return FALSE; } @@ -7791,8 +7757,6 @@ ev_window_init (EvWindow *ev_window) gtk_ui_manager_get_accel_group (ev_window->priv->ui_manager); gtk_window_add_accel_group (GTK_WINDOW (ev_window), accel_group); - ev_window_set_view_accels_sensitivity (ev_window, FALSE); - action_group = gtk_action_group_new ("ViewPopupActions"); ev_window->priv->view_popup_action_group = action_group; gtk_action_group_set_translation_domain (action_group, NULL); -- cgit v1.2.1