diff options
author | Jonathan Blandford <jrb@redhat.com> | 2005-05-20 05:47:54 (GMT) |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2005-05-20 05:47:54 (GMT) |
commit | 681b0a3166a61b96b9a0ee35ca1b0aaa487809b3 (patch) | |
tree | 7e291aaadb4eba0d1240b88936870dc1101b7055 /shell | |
parent | fba0ac29870eb3907c86a48733ba30d158f1b119 (diff) |
Patch from Nickolay Shmyrev to fix the -p option, #170458
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
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-view.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c index 04dfd73..e9cbee5 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -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; |