Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2005-02-04 14:31:03 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-02-04 14:31:03 (GMT)
commitd4311e9d07fca361e09bedffd0fdc3209aa30fd6 (patch)
tree57468104f4202467a23b3d1617df3fdadf64d871
parent74687fdef3d1c74e11598f6d443418ddb61e0b33 (diff)
Clamp page number, dont try to move to not existant pages.
2005-02-04 Marco Pesenti Gritti <marco@gnome.org> * TODO: * shell/ev-view.c: (set_document_page): Clamp page number, dont try to move to not existant pages.
-rw-r--r--ChangeLog8
-rw-r--r--TODO6
-rw-r--r--shell/ev-view.c8
3 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c32c7a8..0224ec0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2005-02-04 Marco Pesenti Gritti <marco@gnome.org>
+ * TODO:
+ * shell/ev-view.c: (set_document_page):
+
+ Clamp page number, dont try to move to
+ not existant pages.
+
+2005-02-04 Marco Pesenti Gritti <marco@gnome.org>
+
* backend/ev-document-find.c: (ev_document_find_changed):
* backend/ev-document-find.h:
* pdf/xpdf/pdf-document.cc:
diff --git a/TODO b/TODO
index 65c5dd1..4e6ef58 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,6 @@
Hook up recent documents support (though rumors are that it's slow)
Improve Find system
- Find Next/Previous don't go to other pages
- Find Next/Previous doesn't focus the results
Display location of results in thumbnails?
Only display thumbnails of pages found?
@@ -37,4 +35,6 @@ Move to having three sizing types:
Create a TODO list
Create a project page (http://www.gnome.org/projects/evince/)
Encrypted PDF support
-
+Improve Find system
+ Find Next/Previous don't go to other pages
+ Find Next/Previous doesn't focus the results
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 6d071a9..68767d4 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -944,8 +944,14 @@ update_find_status_message (EvView *view)
}
static void
-set_document_page (EvView *view, int page)
+set_document_page (EvView *view, int new_page)
{
+ int page;
+ int pages;
+
+ pages = ev_document_get_n_pages (view->document);
+ page = CLAMP (new_page, 1, pages);
+
if (view->document) {
int old_page = ev_document_get_page (view->document);
int old_width, old_height;