Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-page-cache.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2008-09-07 16:27:14 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2008-09-07 16:27:14 (GMT)
commitcfe4ba6711c12ea9ad1ddba4cbd60e964715170b (patch)
tree6efd3a235a74e8c092dfa1e96d5831d1b8595b10 /shell/ev-page-cache.c
parentc8ff46f7c9444ea484ac85b5a8a68d0905acad84 (diff)
Patch for case unsensitive page label match by Michael Lee. See bug
2008-09-07 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * shell/ev-page-cache.c (ev_page_cache_set_page_label): Patch for case unsensitive page label match by Michael Lee. See bug #550136. * shell/ev-page-action.c (create_tool_item): * test/Makefile.am: * test/test1.py: * test/test4.py: * test/test5.py: Added test for the above and updated other tests. svn path=/trunk/; revision=3161
Diffstat (limited to 'shell/ev-page-cache.c')
-rw-r--r--shell/ev-page-cache.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/shell/ev-page-cache.c b/shell/ev-page-cache.c
index bbddbbc..a43876a 100644
--- a/shell/ev-page-cache.c
+++ b/shell/ev-page-cache.c
@@ -482,6 +482,15 @@ ev_page_cache_set_page_label (EvPageCache *page_cache,
}
}
+ /* Second, look for a match with case insensitively */
+ for (i = 0; i < page_cache->n_pages; i++) {
+ if (page_cache->page_labels[i] != NULL &&
+ ! strcasecmp (page_label, page_cache->page_labels[i])) {
+ ev_page_cache_set_current_page (page_cache, i);
+ return TRUE;
+ }
+ }
+
/* Next, parse the label, and see if the number fits */
value = strtol (page_label, &endptr, 10);
if (endptr[0] == '\0') {