Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--shell/ev-history.c5
-rw-r--r--shell/ev-history.h3
-rw-r--r--shell/ev-window.c9
4 files changed, 20 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 09618d1..36dd1e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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:
* po/POTFILES.in:
* shell/Makefile.am:
diff --git a/shell/ev-history.c b/shell/ev-history.c
index 2029d3c..c316c84 100644
--- a/shell/ev-history.c
+++ b/shell/ev-history.c
@@ -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);
diff --git a/shell/ev-history.h b/shell/ev-history.h
index a815f93..4f1ec1a 100644
--- a/shell/ev-history.h
+++ b/shell/ev-history.h
@@ -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);
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 7fb90b2..c7d39cd 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -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);