Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-09-22 13:02:46 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-09-22 13:02:46 (GMT)
commit512ce5e411c8b0e614097cd84ecf209dc8ad0d7e (patch)
treef3e0c0d0fed3899897c1403dbbe80195b573c5e4
parent7d9e5143adb83d52169fae99f3c07b953e948d8e (diff)
Based on a patch from carlosgc@gnome.org. Mouse buttons switch pages in
2005-09-22 Marco Pesenti Gritti <mpg@redhat.com> * shell/ev-view.c: (ev_view_button_release_event): Based on a patch from carlosgc@gnome.org. Mouse buttons switch pages in presentation mode.
-rw-r--r--ChangeLog7
-rw-r--r--shell/ev-view.c26
2 files changed, 26 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index c894b77..be7aca1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-22 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * shell/ev-view.c: (ev_view_button_release_event):
+
+ Based on a patch from carlosgc@gnome.org. Mouse buttons
+ switch pages in presentation mode.
+
2005-09-19 Marco Pesenti Gritti <mpg@redhat.com>
* shell/ev-page-cache.c: (ev_page_cache_get_size):
diff --git a/shell/ev-view.c b/shell/ev-view.c
index fa2df5b..5cc21ab 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -1673,25 +1673,37 @@ ev_view_button_release_event (GtkWidget *widget,
GdkEventButton *event)
{
EvView *view = EV_VIEW (widget);
+ EvLink *link;
if (view->pressed_button == 2) {
ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
}
+ if (view->document) {
+ link = get_link_at_location (view, event->x + view->scroll_x,
+ event->y + view->scroll_y);
+ } else {
+ link = NULL;
+ }
+
view->pressed_button = -1;
view->drag_info.in_drag = FALSE;
if (view->selection_info.selections) {
ev_view_update_primary_selection (view);
- } else if (view->document) {
- EvLink *link;
-
- link = get_link_at_location (view, event->x + view->scroll_x, event->y + view->scroll_y);
- if (link) {
- ev_view_goto_link (view, link);
+ } else if (link) {
+ ev_view_goto_link (view, link);
+ } else if (view->presentation) {
+ switch (event->button) {
+ case 1:
+ ev_view_next_page (view);
+ return TRUE;
+ case 3:
+ ev_view_previous_page (view);
+ return TRUE;
}
}
-
+
return FALSE;
}