]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-view.c
Updated German translation.
[evince.git] / shell / ev-view.c
index 5d7df6b3a5f1b768e50aabe3f36448a82c45d02e..64f14843fde37257e0a83649710f6a5b1c196580 100644 (file)
@@ -483,6 +483,9 @@ view_set_adjustment_values (EvView         *view,
 static void
 view_update_range_and_current_page (EvView *view)
 {
+       if (view->pending_scroll != SCROLL_TO_KEEP_POSITION)
+               return;
+
        /* Presentation trumps all other modes */
        if (view->presentation) {
                view->start_page = view->current_page;
@@ -813,8 +816,8 @@ get_page_extents (EvView       *view,
                gint max_width;
                gint x, y;
 
-               ev_page_cache_get_max_width (view->page_cache, view->scale,
-                                            view->rotation, &max_width);
+               ev_page_cache_get_max_width (view->page_cache, view->rotation,
+                                            view->scale, &max_width);
                max_width = max_width + border->left + border->right;
                /* Get the location of the bounding box */
                if (view->dual_page) {
@@ -1566,6 +1569,28 @@ ev_view_button_release_event (GtkWidget      *widget,
        return FALSE;
 }
 
+static gint
+ev_view_focus_in (GtkWidget     *widget,
+                 GdkEventFocus *event)
+{
+       if (EV_VIEW (widget)->pixbuf_cache)
+               ev_pixbuf_cache_style_changed (EV_VIEW (widget)->pixbuf_cache);
+       gtk_widget_queue_draw (widget);
+
+       return FALSE;
+}
+
+static gint
+ev_view_focus_out (GtkWidget     *widget,
+                    GdkEventFocus *event)
+{
+       if (EV_VIEW (widget)->pixbuf_cache)
+               ev_pixbuf_cache_style_changed (EV_VIEW (widget)->pixbuf_cache);
+       gtk_widget_queue_draw (widget);
+
+       return FALSE;
+}
+
 static gboolean
 ev_view_leave_notify_event (GtkWidget *widget, GdkEventCrossing   *event)
 {
@@ -1894,6 +1919,8 @@ ev_view_class_init (EvViewClass *class)
        widget_class->button_press_event = ev_view_button_press_event;
        widget_class->motion_notify_event = ev_view_motion_notify_event;
        widget_class->button_release_event = ev_view_button_release_event;
+       widget_class->focus_in_event = ev_view_focus_in;
+       widget_class->focus_out_event = ev_view_focus_out;
        widget_class->size_request = ev_view_size_request;
        widget_class->size_allocate = ev_view_size_allocate;
        widget_class->realize = ev_view_realize;
@@ -3145,8 +3172,9 @@ ev_view_select_all (EvView *view)
                EvViewSelection *selection;
 
                ev_page_cache_get_size (view->page_cache,
+                                       i,
                                        view->rotation,
-                                       i, 1.0, &width, &height);
+                                       1.0, &width, &height);
 
                selection = g_new0 (EvViewSelection, 1);
                selection->page = i;