From: Carlos Garcia Campos Date: Sun, 3 Jan 2010 17:14:19 +0000 (+0100) Subject: [libview] Remove ev_view_page_label_from_dest() X-Git-Tag: EVINCE_2_29_5~25 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=5e7facafcce547222476061e8a160090356e99aa;p=evince.git [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() --- diff --git a/libview/ev-view.c b/libview/ev-view.c index d7475815..b6ffd798 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 c63ad33f..13591727 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);