[evince] [libview] Remove ev_view_page_label_from_dest()
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evince] [libview] Remove ev_view_page_label_from_dest()
- Date: Sun, 3 Jan 2010 20:19:06 +0000 (UTC)
commit 5e7facafcce547222476061e8a160090356e99aa
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Jan 3 18:14:19 2010 +0100
[libview] Remove ev_view_page_label_from_dest()
It shouldn't be a view method since it depends on the document rather than
the view and it's been replaced by ev_document_links_get_dest_page_label()
libview/ev-view.c | 40 ++--------------------------------------
libview/ev-view.h | 1 -
2 files changed, 2 insertions(+), 39 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index d747581..b6ffd79 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -1753,42 +1753,6 @@ ev_view_handle_link (EvView *view, EvLink *link)
}
}
-gchar *
-ev_view_page_label_from_dest (EvView *view, EvLinkDest *dest)
-{
- EvLinkDestType type;
- gchar *msg = NULL;
-
- type = ev_link_dest_get_dest_type (dest);
-
- switch (type) {
- case EV_LINK_DEST_TYPE_NAMED: {
- EvLinkDest *dest2;
- const gchar *named_dest;
-
- named_dest = ev_link_dest_get_named_dest (dest);
- dest2 = ev_document_links_find_link_dest (EV_DOCUMENT_LINKS (view->document),
- named_dest);
- if (dest2) {
- msg = ev_document_get_page_label (view->document,
- ev_link_dest_get_page (dest2));
- g_object_unref (dest2);
- }
- }
-
- break;
- case EV_LINK_DEST_TYPE_PAGE_LABEL: {
- msg = g_strdup (ev_link_dest_get_page_label (dest));
- }
- break;
- default:
- msg = ev_document_get_page_label (view->document,
- ev_link_dest_get_page (dest));
- }
-
- return msg;
-}
-
static char *
tip_from_action_named (EvLinkAction *action)
{
@@ -1830,8 +1794,8 @@ tip_from_link (EvView *view, EvLink *link)
switch (type) {
case EV_LINK_ACTION_TYPE_GOTO_DEST:
- page_label = ev_view_page_label_from_dest (view,
- ev_link_action_get_dest (action));
+ page_label = ev_document_links_get_dest_page_label (EV_DOCUMENT_LINKS (view->document),
+ ev_link_action_get_dest (action));
if (page_label) {
msg = g_strdup_printf (_("Go to page %s"), page_label);
g_free (page_label);
diff --git a/libview/ev-view.h b/libview/ev-view.h
index c63ad33..1359172 100644
--- a/libview/ev-view.h
+++ b/libview/ev-view.h
@@ -97,7 +97,6 @@ void ev_view_handle_link (EvView *view,
EvLink *link);
gboolean ev_view_next_page (EvView *view);
gboolean ev_view_previous_page (EvView *view);
-gchar* ev_view_page_label_from_dest (EvView *view, EvLinkDest *dest);
void ev_view_autoscroll_start (EvView *view);
void ev_view_autoscroll_stop (EvView *view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]