[evince/wip/recent-view: 12/12] ev-sidebar-thumbnail: (re)set current page when updating visible range
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/recent-view: 12/12] ev-sidebar-thumbnail: (re)set current page when updating visible range
- Date: Mon, 24 Feb 2014 04:05:34 +0000 (UTC)
commit c98a07c89d23488c36a324ffaef74c735d00730b
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Thu May 16 10:15:19 2013 +0200
ev-sidebar-thumbnail: (re)set current page when updating visible range
The range of thumbnails shown in the side pane is lost when you change
the width. If the user moves one page forward or backward, the thumbnail
view gets updated and correctly shows the current page in the pane.
This patch adds a call to ev_sidebar_set_current_page when updating
the visible view.
https://bugzilla.gnome.org/show_bug.cgi?id=631050
shell/ev-sidebar-thumbnails.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 4c81338..e31a9c0 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -95,6 +95,8 @@ static gboolean ev_sidebar_thumbnails_support_document (EvSidebarPage
EvDocument *document);
static void ev_sidebar_thumbnails_page_iface_init (EvSidebarPageInterface *iface);
static const gchar* ev_sidebar_thumbnails_get_label (EvSidebarPage *sidebar_page);
+static void ev_sidebar_thumbnails_set_current_page (EvSidebarThumbnails *sidebar,
+ gint page);
static void thumbnail_job_completed_callback (EvJobThumbnail *job,
EvSidebarThumbnails *sidebar_thumbnails);
static void adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails);
@@ -467,7 +469,11 @@ update_visible_range (EvSidebarThumbnails *sidebar_thumbnails,
clear_range (sidebar_thumbnails, MAX (end_page + 1, old_start_page), old_end_page);
add_range (sidebar_thumbnails, start_page, end_page);
-
+
+ /* Might have a new number of columns, reset current page */
+ ev_sidebar_thumbnails_set_current_page (sidebar_thumbnails,
+ ev_document_model_get_page (sidebar_thumbnails->priv->model));
+
priv->start_page = start_page;
priv->end_page = end_page;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]