]> www.fi.muni.cz Git - evince.git/commitdiff
Handle title links for real. Gosh, how long has this been broken.
authorJonathan Blandford <jrb@redhat.com>
Mon, 28 Feb 2005 04:03:27 +0000 (04:03 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Mon, 28 Feb 2005 04:03:27 +0000 (04:03 +0000)
Sun Feb 27 23:00:31 2005  Jonathan Blandford  <jrb@redhat.com>

        * shell/ev-sidebar-links.c (do_one_iteration): Handle title links
        for real.  Gosh, how long has this been broken.

        * pdf/xpdf/pdf-document.cc (build_link_from_action): add back the
        check for a NULL link.  We crash otherwise.

ChangeLog
pdf/xpdf/pdf-document.cc
shell/ev-sidebar-links.c

index 90350f0ad5bba4a58ae33ef42831503c37996a0f..2f7a796ce8ef5530e85d9afa51974ae49d67a5ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sun Feb 27 23:00:31 2005  Jonathan Blandford  <jrb@redhat.com>
+
+       * shell/ev-sidebar-links.c (do_one_iteration): Handle title links
+       for real.  Gosh, how long has this been broken.
+
+       * pdf/xpdf/pdf-document.cc (build_link_from_action): add back the
+       check for a NULL link.  We crash otherwise.
+
 2005-02-27  Marco Pesenti Gritti  <marco@gnome.org>
 
        * NEWS:
index 49da9e90b37308c862c040ec31ddff2bee66c3d7..41c2eb89c734c867b3d27bfd4eabeac85f299e19 100644 (file)
@@ -813,7 +813,9 @@ build_link_from_action (PdfDocument *pdf_document,
 {
        EvLink *link = NULL;
 
-       if (link_action->getKind () == actionGoToR) {
+        if (link_action == NULL) {
+               link = ev_link_new_title (title);
+       } else if (link_action->getKind () == actionGoToR) {
                g_warning ("actionGoToR links not implemented");
        } else if (link_action->getKind () == actionLaunch) {
                g_warning ("actionLaunch links not implemented");
index 03d445e803afabf343be14a2f4c64b0edf4717ec..19b9ecfe20558bbfeb87238951b3d7555f85cf73 100644 (file)
@@ -251,6 +251,7 @@ do_one_iteration (EvSidebarLinks *ev_sidebar_links)
        IdleStackData *stack_data;
        GtkTreeIter tree_iter;
        EvDocumentLinksIter *child_iter;
+       EvLinkType link_type;
        gint page;
 
        g_assert (priv->idle_stack);
@@ -266,12 +267,12 @@ do_one_iteration (EvSidebarLinks *ev_sidebar_links)
        }
 
        page = ev_link_get_page (link);
+       link_type = ev_link_get_link_type (link);
        gtk_tree_store_append (GTK_TREE_STORE (priv->model), &tree_iter, stack_data->tree_iter);
        gtk_tree_store_set (GTK_TREE_STORE (priv->model), &tree_iter,
                            LINKS_COLUMN_MARKUP, ev_link_get_title (link),
                            LINKS_COLUMN_PAGE_NUM, page,
-                           /* FIXME: Handle links for real. */
-                           LINKS_COLUMN_PAGE_VALID, (page >= 0),
+                           LINKS_COLUMN_PAGE_VALID, (link_type == EV_LINK_TYPE_PAGE),
                            LINKS_COLUMN_LINK, link,
                            -1);
        g_object_unref (link);