From: Martin Kretzschmar Date: Thu, 20 Jan 2005 22:27:28 +0000 (+0000) Subject: (set_document_page): handle paper size changes when the page X-Git-Tag: EVINCE_0_1_1~24 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=0fbeb6dce7d8a42870a9a6bcf935dff7510ab466;p=evince.git (set_document_page): handle paper size changes when the page changes (test with Free Culture, page 2). --- diff --git a/ChangeLog b/ChangeLog index b190b63f..e820e7d5 100644 --- 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 diff --git a/shell/ev-view.c b/shell/ev-view.c index b10790d5..45fc0147 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -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); }