evince r3503 - in trunk: . shell
- From: carlosgc svn gnome org
- To: svn-commits-list gnome org
- Subject: evince r3503 - in trunk: . shell
- Date: Sun, 1 Mar 2009 16:28:06 +0000 (UTC)
Author: carlosgc
Date: Sun Mar 1 16:28:06 2009
New Revision: 3503
URL: http://svn.gnome.org/viewvc/evince?rev=3503&view=rev
Log:
2009-03-01 Carlos Garcia Campos <carlosgc gnome org>
* shell/ev-window.c: (ev_window_set_document),
(ev_window_reload_job_cb):
Do not lose page position when reloading. Fixes bug #573091.
Modified:
trunk/ChangeLog
trunk/shell/ev-window.c
Modified: trunk/shell/ev-window.c
==============================================================================
--- trunk/shell/ev-window.c (original)
+++ trunk/shell/ev-window.c Sun Mar 1 16:28:06 2009
@@ -1248,6 +1248,18 @@
g_signal_connect (ev_window->priv->page_cache, "history-changed",
G_CALLBACK (history_changed_cb), ev_window);
+ if (ev_window->priv->in_reload && ev_window->priv->dest) {
+ gint page;
+
+ /* Restart the current page */
+ page = CLAMP (ev_link_dest_get_page (ev_window->priv->dest),
+ 0,
+ ev_page_cache_get_n_pages (ev_window->priv->page_cache) - 1);
+ ev_page_cache_set_current_page (ev_window->priv->page_cache, page);
+ g_object_unref (ev_window->priv->dest);
+ ev_window->priv->dest = NULL;
+ }
+
if (ev_page_cache_get_n_pages (ev_window->priv->page_cache) > 0) {
ev_view_set_document (view, document);
} else {
@@ -1486,7 +1498,6 @@
EvWindow *ev_window)
{
GtkWidget *widget;
- gint page;
if (ev_job_is_failed (job)) {
ev_window_clear_reload_job (ev_window);
@@ -1498,14 +1509,6 @@
}
ev_window_set_document (ev_window, job->document);
-
- /* Restart the current page */
- page = CLAMP (ev_link_dest_get_page (ev_window->priv->dest),
- 0,
- ev_page_cache_get_n_pages (ev_window->priv->page_cache) - 1);
- ev_page_cache_set_current_page (ev_window->priv->page_cache, page);
- g_object_unref (ev_window->priv->dest);
- ev_window->priv->dest = NULL;
/* Restart the search after reloading */
widget = gtk_window_get_focus (GTK_WINDOW (ev_window));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]