[devhelp] Book: fix FIXME about page: and book: completions



commit 2ebe367da358cf517c3ab9a24e0b61ebbc047ec7
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Dec 21 14:59:12 2017 +0100

    Book: fix FIXME about page: and book: completions
    
    See:
    https://bugzilla.gnome.org/show_bug.cgi?id=791442#c3
    
    The page: and book: filtering feature is not intended to be used with
    the Devhelp application GUI.
    
    In case of DH_LINK_TYPE_BOOK it would have been easy to fix the
    completion, it's the book ID that needs to be completed, not the book
    title, so it would have been possible to fix the code by calling
    dh_link_get_book_id(). In case of DH_LINK_TYPE_PAGE there is no dh_link
    function to get the page_id, so it would have required a bit more work
    to implement dh_link_get_page_id().

 src/dh-book.c |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)
---
diff --git a/src/dh-book.c b/src/dh-book.c
index 356a7d1..e38bfd2 100644
--- a/src/dh-book.c
+++ b/src/dh-book.c
@@ -522,20 +522,6 @@ dh_book_get_completions (DhBook *book)
                         DhLink *link = l->data;
                         gchar *str;
 
-                        /* Add additional "page:" and "book:" completions.
-                         * FIXME: broken, doesn't match what DhKeywordModel
-                         * does. But maybe the feature will be removed, see:
-                         * https://bugzilla.gnome.org/show_bug.cgi?id=791442
-                         */
-                        if (dh_link_get_link_type (link) == DH_LINK_TYPE_BOOK) {
-                                str = g_strdup_printf ("book:%s", dh_link_get_name (link));
-                                priv->completions = g_list_prepend (priv->completions, str);
-                        }
-                        else if (dh_link_get_link_type (link) == DH_LINK_TYPE_PAGE) {
-                                str = g_strdup_printf ("page:%s", dh_link_get_name (link));
-                                priv->completions = g_list_prepend (priv->completions, str);
-                        }
-
                         str = g_strdup (dh_link_get_name (link));
                         priv->completions = g_list_prepend (priv->completions, str);
                 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]