]> www.fi.muni.cz Git - evince.git/commitdiff
Patch from Nickolay Shmyrev to fix the -p option, #170458
authorJonathan Blandford <jrb@redhat.com>
Fri, 20 May 2005 05:47:54 +0000 (05:47 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Fri, 20 May 2005 05:47:54 +0000 (05:47 +0000)
Fri May 20 01:46:57 2005  Jonathan Blandford  <jrb@redhat.com>

        * shell/ev-view.c: Patch from Nickolay Shmyrev to fix the -p
        option, #170458

ChangeLog
shell/ev-view.c

index 358d6487cacecc3deb7b98c8c6e6a3c2479cbae9..6188d1e8073c84d4932294a297ed1d69a1c8ec8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 20 01:46:57 2005  Jonathan Blandford  <jrb@redhat.com>
+
+       * shell/ev-view.c: Patch from Nickolay Shmyrev to fix the -p
+       option, #170458
+
 Fri May 20 01:27:01 2005  Jonathan Blandford  <jrb@redhat.com>
 
        * shell/ev-view.c: Patch from Nickolay Shmyrev to to scroll to
index 04dfd73fd65e9d933d47e56f2eaa5c5c522024e3..e9cbee5e180f68895b3c389619bf78901eb6d4c7 100644 (file)
@@ -1186,9 +1186,6 @@ ev_view_size_request (GtkWidget      *widget,
 {
        EvView *view = EV_VIEW (widget);
 
-       if (!GTK_WIDGET_REALIZED (widget))
-               return;
-
        if (view->document == NULL) {
                requisition->width = 1;
                requisition->height = 1;
@@ -1274,15 +1271,6 @@ ev_view_realize (GtkWidget *widget)
                gdk_window_set_background (widget->window, &widget->style->black);
        else
                gdk_window_set_background (widget->window, &widget->style->mid [GTK_STATE_NORMAL]);
-
-       if (view->document) {
-               /* We can't get page size without a target, so we have to
-                * queue a size request at realization. Could be fixed
-                * with EvDocument changes to allow setting a GdkScreen
-                * without setting a target.
-                */
-               gtk_widget_queue_resize (widget);
-       }
 }
 
 static void
@@ -1916,7 +1904,13 @@ page_changed_cb (EvPageCache *page_cache,
 {
        if (view->current_page != new_page) {
 
-               view_scroll_to_page (view, new_page);
+               if (view->pending_scroll != SCROLL_TO_CURRENT_PAGE) {
+                       /* Should scroll right now */
+                       view_scroll_to_page (view, new_page);
+               } else {        
+                       /* We'll scroll to new page on allocate */
+                       view->current_page = new_page;
+               }
 
                if (EV_IS_DOCUMENT_FIND (view->document)) {
                        view->find_page = new_page;