[devhelp] Sidebar: use dh_book_tree_get_selected_link()



commit a5f310491c2b25c947ece9236c3280a76575c34b
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri May 18 15:03:45 2018 +0200

    Sidebar: use dh_book_tree_get_selected_link()

 devhelp/dh-sidebar.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/devhelp/dh-sidebar.c b/devhelp/dh-sidebar.c
index 735eab3..9e76575 100644
--- a/devhelp/dh-sidebar.c
+++ b/devhelp/dh-sidebar.c
@@ -145,15 +145,15 @@ search_idle_cb (gpointer user_data)
         DhSidebarPrivate *priv = dh_sidebar_get_instance_private (sidebar);
         const gchar *search_text;
         const gchar *book_id;
-        DhLink *book_link;
+        DhLink *selected_link;
         DhLink *exact_link;
 
         priv->idle_search_id = 0;
 
         search_text = gtk_entry_get_text (priv->entry);
 
-        book_link = dh_book_tree_get_selected_book (priv->book_tree);
-        book_id = book_link != NULL ? dh_link_get_book_id (book_link) : NULL;
+        selected_link = dh_book_tree_get_selected_link (priv->book_tree);
+        book_id = selected_link != NULL ? dh_link_get_book_id (selected_link) : NULL;
 
         /* Disconnect the model, see the doc of dh_keyword_model_filter(). */
         gtk_tree_view_set_model (priv->hitlist_view, NULL);
@@ -169,8 +169,8 @@ search_idle_cb (gpointer user_data)
         if (exact_link != NULL)
                 g_signal_emit (sidebar, signals[SIGNAL_LINK_SELECTED], 0, exact_link);
 
-        if (book_link != NULL)
-                dh_link_unref (book_link);
+        if (selected_link != NULL)
+                dh_link_unref (selected_link);
 
         return G_SOURCE_REMOVE;
 }


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