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:
authorJonathan Blandford <jrb@redhat.com>2005-08-25 06:34:20 (GMT)
committer Jonathan Blandford <jrb@src.gnome.org>2005-08-25 06:34:20 (GMT)
commit9a1a3b315f05568f6e28f64f685338dc120d5491 (patch)
treeaf6de51724acab978387377c9d7c724ba1323867 /shell/ev-view.c
parentebe3e0a897cc51ccfb4f35619c600962900d709e (diff)
Redo rotation (again). prepare for 0.4.0
Thu Aug 25 02:32:32 2005 Jonathan Blandford <jrb@redhat.com> * backend/ev-document-misc.c: (ev_document_misc_get_thumbnail_frame): * backend/ev-document-misc.h: * configure.ac: * pdf/ev-poppler.cc: * shell/Makefile.am: * shell/ev-sidebar-thumbnails.c: (add_range), (ev_sidebar_thumbnails_set_loading_icon), (ev_sidebar_thumbnails_refresh), (ev_sidebar_thumbnails_set_document): * shell/ev-sidebar-thumbnails.h: * shell/ev-view.c: (ev_view_motion_notify_event), (ev_view_set_property), (ev_view_get_property), (ev_view_class_init), (ev_view_set_rotation): * shell/ev-window.c: (ev_window_cmd_edit_rotate_left), (ev_window_cmd_edit_rotate_right), (ev_window_rotation_changed_cb), (ev_window_init): * tiff/tiff-document.c: (tiff_document_thumbnails_get_thumbnail): Redo rotation (again). prepare for 0.4.0
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 1e95459..a59b64a 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -53,6 +53,7 @@ enum {
PROP_PRESENTATION,
PROP_SIZING_MODE,
PROP_ZOOM,
+ PROP_ROTATION,
};
enum {
@@ -1465,7 +1466,11 @@ ev_view_motion_notify_event (GtkWidget *widget,
if (!view->document)
return FALSE;
- if (view->pressed_button == 1) {
+ /* For the Evince 0.4.x release, we limit selection to un-rotated
+ * documents only.
+ */
+ if (view->pressed_button == 1 &&
+ view->rotation == 0) {
view->selection_info.in_selection = TRUE;
view->motion_x = event->x + view->scroll_x;
view->motion_y = event->y + view->scroll_y;
@@ -1515,7 +1520,11 @@ ev_view_motion_notify_event (GtkWidget *widget,
return TRUE;
}
- } else if (view->pressed_button <= 0) {
+ /* For the Evince 0.4.x release, we limit links to un-rotated documents
+ * only.
+ */
+ } else if (view->pressed_button <= 0 &&
+ view->rotation == 0) {
EvLink *link;
link = get_link_at_location (view, event->x + view->scroll_x, event->y + view->scroll_y);
@@ -1856,6 +1865,9 @@ ev_view_set_property (GObject *object,
case PROP_ZOOM:
ev_view_set_zoom (view, g_value_get_double (value), FALSE);
break;
+ case PROP_ROTATION:
+ ev_view_set_rotation (view, g_value_get_int (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -1895,6 +1907,9 @@ ev_view_get_property (GObject *object,
case PROP_ZOOM:
g_value_set_double (value, view->scale);
break;
+ case PROP_ROTATION:
+ g_value_set_int (value, view->rotation);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -2023,6 +2038,15 @@ ev_view_class_init (EvViewClass *class)
MAX_SCALE,
1.0,
G_PARAM_READWRITE));
+ g_object_class_install_property (object_class,
+ PROP_ROTATION,
+ g_param_spec_double ("rotation",
+ "Rotation",
+ "Rotation",
+ 0,
+ 360,
+ 0,
+ G_PARAM_READWRITE));
binding_set = gtk_binding_set_by_class (class);
@@ -2432,6 +2456,8 @@ ev_view_set_rotation (EvView *view, int rotation)
ev_pixbuf_cache_clear (view->pixbuf_cache);
gtk_widget_queue_resize (GTK_WIDGET (view));
}
+
+ g_object_notify (G_OBJECT (view), "rotation");
}
int