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-05-10 16:01:08 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-05-10 16:01:08 (GMT)
commit5112457d6c321bde178c3577eb37bd0ee62bc209 (patch)
tree27359add349147708706c397821632be6621ab09 /shell/ev-page-action.c
parentf7d8183b26d763d0501f40720aed357d5aa35029 (diff)
Update label when connecting proxy. Fix a warning with NULL page_cache.
2005-05-10 Marco Pesenti Gritti <mpg@redhat.com> * shell/ev-page-action.c: (update_pages_label), (connect_proxy): Update label when connecting proxy. Fix a warning with NULL page_cache.
Diffstat (limited to 'shell/ev-page-action.c')
-rw-r--r--shell/ev-page-action.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/ev-page-action.c b/shell/ev-page-action.c
index 8ba9d77..2eed376 100644
--- a/shell/ev-page-action.c
+++ b/shell/ev-page-action.c
@@ -132,7 +132,7 @@ update_pages_label (EvPageActionWidget *proxy,
gint n_pages;
n_pages = page_cache ? ev_page_cache_get_n_pages (page_cache) : 0;
- if (ev_page_cache_has_nonnumeric_page_labels (page_cache)) {
+ if (page_cache && ev_page_cache_has_nonnumeric_page_labels (page_cache)) {
label_text = g_strdup_printf (_("(%d of %d)"), page + 1, n_pages);
} else {
label_text = g_strdup_printf (_("of %d"), n_pages);
@@ -429,6 +429,8 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
g_signal_connect_object (action, "notify::page-cache",
G_CALLBACK (update_page_cache),
proxy, 0);
+ update_page_cache (EV_PAGE_ACTION (action), NULL,
+ EV_PAGE_ACTION_WIDGET (proxy));
/* We only go through this whole rigmarole if we can set
* GtkEntryCompletion::popup-set-width, which appeared in
* GTK+-2.7.0 */