Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-page-action.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-04-16 10:20:47 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-04-16 10:20:47 (GMT)
commit94ba47eee644072736b10ef3fe2188043ade22dd (patch)
treef89a8bd2b3366519985f65fdc61707e1fa5c7961 /shell/ev-page-action.c
parenta5542ba7635d06d7b4b8e94ea472f29cbf4d2c4e (diff)
Remove some assertions, documents can have 0 pages. Make initial current
2005-04-16 Marco Pesenti Gritti <mpg@redhat.com> * backend/ev-page-cache.c: (ev_page_cache_init), (_ev_page_cache_new): Remove some assertions, documents can have 0 pages. Make initial current page -1. * shell/ev-page-action.c: (page_changed_cb): Show "" if current page is -1 * shell/ev-window.c: (update_action_sensitivity), (ev_window_setup_document): When document has 0 pages do not set the view and make nearly everything insensitive.
Diffstat (limited to 'shell/ev-page-action.c')
-rw-r--r--shell/ev-page-action.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ev-page-action.c b/shell/ev-page-action.c
index 4b559c5..d122be4 100644
--- a/shell/ev-page-action.c
+++ b/shell/ev-page-action.c
@@ -100,7 +100,7 @@ page_changed_cb (EvPageCache *page_cache,
{
g_assert (proxy);
- if (page_cache != NULL) {
+ if (page_cache != NULL && page >= 0) {
gchar *page_label = ev_page_cache_get_page_label (page_cache, page);
gtk_entry_set_text (GTK_ENTRY (proxy->entry), page_label);
gtk_editable_set_position (GTK_EDITABLE (proxy->entry), -1);