]> www.fi.muni.cz Git - evince.git/commitdiff
Use page labels instead of numbers.
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Sun, 19 Nov 2006 01:42:57 +0000 (01:42 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 19 Nov 2006 01:42:57 +0000 (01:42 +0000)
2006-11-19  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

* shell/ev-history.c: (ev_history_add_page):
* shell/ev-history.h:
* shell/ev-window.c: (page_changed_cb):

Use page labels instead of numbers.

ChangeLog
shell/ev-history.c
shell/ev-history.h
shell/ev-window.c

index 09618d18e581c016267122a19b2dce988437117e..36dd1e93c1c63184425456750b000cbe56c5ab3f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-11-19  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * shell/ev-history.c: (ev_history_add_page):
+       * shell/ev-history.h:
+       * shell/ev-window.c: (page_changed_cb):
+       
+       Use page labels instead of numbers.
+
 2006-11-19  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * data/evince-toolbar.xml:
index 2029d3c3084acc38dfa1921ae9fdd0d13f973861..c316c841ce0af0fe235c61c451e081ae8165df67 100644 (file)
@@ -164,7 +164,7 @@ ev_history_add_link (EvHistory *history, EvLink *link)
 }
 
 void
-ev_history_add_page (EvHistory *history, int page)
+ev_history_add_page (EvHistory *history, int page, const gchar *label)
 {
        EvLink *link;
        EvLinkDest *dest;
@@ -172,7 +172,8 @@ ev_history_add_page (EvHistory *history, int page)
        gchar *title;
 
        g_return_if_fail (EV_IS_HISTORY (history));
-       title = g_strdup_printf (_("Page: %d"), page);
+       
+       title = g_strdup_printf (_("Page: %s"), label);
 
        dest = ev_link_dest_new_page (page);
        action = ev_link_action_new_dest (dest);
index a815f93b273cdda944faa2fd2a58c1bcf55d425c..4f1ec1aa3c4a591f2443f43b5273061b162ff5f9 100644 (file)
@@ -55,7 +55,8 @@ EvHistory      *ev_history_new                        (void);
 void           ev_history_add_link             (EvHistory  *history,
                                                 EvLink     *linkk);
 void           ev_history_add_page             (EvHistory  *history,
-                                                int         page);
+                                                int         page,
+                                                const gchar *label);
 EvLink        *ev_history_get_link_nth         (EvHistory  *history,
                                                 int         index);
 int            ev_history_get_n_links          (EvHistory  *history);
index 7fb90b2ea13bc333e580a594ada7c27c0f01e006..c7d39cdf0ec0214f9abb21c8770afb99b32a3a57 100644 (file)
@@ -617,10 +617,15 @@ page_changed_cb (EvPageCache *page_cache,
                 gint         page,
                 EvWindow    *ev_window)
 {
+       gchar *label;
+       
        ev_window_update_actions (ev_window);
        
-       if (ev_window->priv->history)
-               ev_history_add_page (ev_window->priv->history, page);
+       if (ev_window->priv->history) {
+               label = ev_page_cache_get_page_label (ev_window->priv->page_cache, page);
+               ev_history_add_page (ev_window->priv->history, page, label);
+               g_free (label);
+       }
 
        if (!ev_window_is_empty (ev_window))
                ev_metadata_manager_set_int (ev_window->priv->uri, "page", page);