]> www.fi.muni.cz Git - evince.git/commitdiff
(set_document_page): handle paper size changes when the page
authorMartin Kretzschmar <martink@src.gnome.org>
Thu, 20 Jan 2005 22:27:28 +0000 (22:27 +0000)
committerMartin Kretzschmar <martink@src.gnome.org>
Thu, 20 Jan 2005 22:27:28 +0000 (22:27 +0000)
changes (test with Free Culture, page 2).

ChangeLog
shell/ev-view.c

index b190b63f8c11dbe266249f0c85ec0e639c9c3a01..e820e7d583924e52cd117ff0458331933b72a898 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * shell/ev-view.c (set_document_page): unset has_selection when
        the page changes.
+       (set_document_page): handle paper size changes when the page
+       changes (test with Free Culture, page 2).
 
 2005-01-20  Marco Pesenti Gritti  <marco@gnome.org>
 
index b10790d5a29d55a417bc80c95a8e0cce0e451ad1..45fc0147d60a083c63977b197ed47e25d2cb4f87 100644 (file)
@@ -1102,6 +1102,10 @@ set_document_page (EvView *view, int page)
 {
        if (view->document) {
                int old_page = ev_document_get_page (view->document);
+               int old_width, old_height;
+
+               ev_document_get_page_size (view->document,
+                                          &old_width, &old_height);
 
                if (old_page != page) {
                        ev_view_set_cursor (view, EV_VIEW_CURSOR_WAIT);
@@ -1109,9 +1113,16 @@ set_document_page (EvView *view, int page)
                }
 
                if (old_page != ev_document_get_page (view->document)) {
+                       int width, height;
+                       
                        g_signal_emit (view, page_changed_signal, 0);
 
                        view->has_selection = FALSE;
+                       ev_document_get_page_size (view->document,
+                                                  &width, &height);
+                       if (width != old_width || height != old_height)
+                               gtk_widget_queue_resize (GTK_WIDGET (view));
+
                        view->find_percent_complete = 0.0;
                        update_find_results (view);     
                }