X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-page-action.c;h=deb9b773895708913c94c0c3b16ac143a60156e6;hb=42414e4f59ef90ea80e49214ea6c50b38dd4ba2d;hp=e378d306003f8d0deb26f01b024b48f5c7b7d2c2;hpb=a154e22c19e8c654971c4fc06ddf106c30f47f87;p=evince.git diff --git a/shell/ev-page-action.c b/shell/ev-page-action.c index e378d306..deb9b773 100644 --- a/shell/ev-page-action.c +++ b/shell/ev-page-action.c @@ -103,7 +103,11 @@ update_pages_label (EvPageActionWidget *proxy, gint n_pages; n_pages = page_cache ? ev_page_cache_get_n_pages (page_cache) : 0; - label_text = g_strdup_printf (_("(%d of %d)"), page + 1, n_pages); + if (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); + } gtk_label_set_text (GTK_LABEL (proxy->label), label_text); g_free (label_text); } @@ -193,10 +197,10 @@ update_page_cache (EvPageAction *page, GParamSpec *pspec, EvPageActionWidget *pr g_signal_handler_disconnect (proxy->page_cache, proxy->signal_id); if (page_cache != NULL) { - signal_id = g_signal_connect (page_cache, - "page-changed", - G_CALLBACK (page_changed_cb), - proxy); + signal_id = g_signal_connect_object (page_cache, + "page-changed", + G_CALLBACK (page_changed_cb), + proxy, 0); /* Set the initial value */ page_changed_cb (page_cache, ev_page_cache_get_current_page (page_cache), @@ -415,7 +419,6 @@ ev_page_action_dispose (GObject *object) EvPageAction *page = EV_PAGE_ACTION (object); if (page->priv->page_cache) { - g_signal_handlers_disconnect_matched (page->priv->page_cache, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, page_changed_cb, NULL); g_object_unref (page->priv->page_cache); page->priv->page_cache = NULL; }