summaryrefslogtreecommitdiff
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorJosé Aliste <[email protected]>2013-05-27 23:47:01 -0400
committerraveit65 <[email protected]>2017-11-22 17:51:12 +0100
commit6a28b5037cf06f218c7fde1a3dc046743ad4971e (patch)
tree4384000018b608b0604f75e7d7e9b8cf7fc089f3 /shell/ev-window.c
parent471b87793bff4e81c5f6f47efd8dcc69349e4758 (diff)
downloadatril-6a28b5037cf06f218c7fde1a3dc046743ad4971e.tar.bz2
atril-6a28b5037cf06f218c7fde1a3dc046743ad4971e.tar.xz
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
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c36
1 files changed, 0 insertions, 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);