Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-05-10 12:09:35 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-05-10 12:09:35 (GMT)
commitdfbedebc6a9968eed8932649e72e80a497dbfed5 (patch)
tree98c67c740371647c2d7ca791c04f2c0095cc6c15 /shell/ev-view.c
parentd58f069362465e0bd50814853b86ab5341beba79 (diff)
This is evil... Make space/backspace global accelerators but enable them
2005-05-10 Marco Pesenti Gritti <mpg@redhat.com> * data/evince-ui.xml: * shell/ev-sidebar-links.c: (ev_sidebar_links_get_treeview): * shell/ev-sidebar-links.h: * shell/ev-sidebar-thumbnails.c: (ev_sidebar_thumbnails_get_treeview): * shell/ev-sidebar-thumbnails.h: * shell/ev-view.c: (ev_view_scroll), (ev_view_scroll_view), (ev_view_class_init): * shell/ev-view.h: * shell/ev-window.c: (update_action_sensitivity), (ev_window_cmd_scroll_forward), (ev_window_cmd_scroll_backward), (set_view_actions_sensitivity), (view_actions_focus_in_cb), (view_actions_focus_out_cb), (enable_view_actions_for_widget), (ev_window_init): This is evil... Make space/backspace global accelerators but enable them only for some widgets (sidebars and view). I dont like it, but I dont know a better way... :/
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index cfcc845..6dfe181 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -59,11 +59,6 @@ enum {
TARGET_TEXT_BUFFER_CONTENTS
};
-enum {
- EV_SCROLL_PAGE_FORWARD,
- EV_SCROLL_PAGE_BACKWARD
-};
-
static const GtkTargetEntry targets[] = {
{ "STRING", 0, TARGET_STRING },
{ "TEXT", 0, TARGET_TEXT },
@@ -1553,26 +1548,9 @@ add_scroll_binding_keypad (GtkBindingSet *binding_set,
G_TYPE_BOOLEAN, horizontal);
}
-static void
-add_scroll_binding_shifted (GtkBindingSet *binding_set,
- guint keyval,
- GtkScrollType scroll_normal,
- GtkScrollType scroll_shifted,
- gboolean horizontal)
-{
- gtk_binding_entry_add_signal (binding_set, keyval, 0,
- "scroll_view", 2,
- GTK_TYPE_SCROLL_TYPE, scroll_normal,
- G_TYPE_BOOLEAN, horizontal);
- gtk_binding_entry_add_signal (binding_set, keyval, GDK_SHIFT_MASK,
- "scroll_view", 2,
- GTK_TYPE_SCROLL_TYPE, scroll_shifted,
- G_TYPE_BOOLEAN, horizontal);
-}
-
-static void
-ev_view_jump (EvView *view,
- GtkScrollType scroll)
+void
+ev_view_scroll (EvView *view,
+ EvScrollType scroll)
{
GtkAdjustment *adjustment;
double value, increment;
@@ -1633,8 +1611,6 @@ ev_view_scroll_view (EvView *view,
ev_page_cache_prev_page (view->page_cache);
} else if (scroll == GTK_SCROLL_PAGE_FORWARD) {
ev_page_cache_next_page (view->page_cache);
- } else if (scroll == EV_SCROLL_PAGE_BACKWARD || scroll == EV_SCROLL_PAGE_FORWARD) {
- ev_view_jump (view, scroll);
} else {
GtkAdjustment *adjustment;
double value;
@@ -1841,9 +1817,6 @@ ev_view_class_init (EvViewClass *class)
add_scroll_binding_keypad (binding_set, GDK_Page_Up, GTK_SCROLL_PAGE_BACKWARD, FALSE);
add_scroll_binding_keypad (binding_set, GDK_Page_Down, GTK_SCROLL_PAGE_FORWARD, FALSE);
-
- add_scroll_binding_shifted (binding_set, GDK_space, EV_SCROLL_PAGE_FORWARD, EV_SCROLL_PAGE_BACKWARD, FALSE);
- add_scroll_binding_shifted (binding_set, GDK_BackSpace, EV_SCROLL_PAGE_BACKWARD, EV_SCROLL_PAGE_FORWARD, FALSE);
}
static void