[devhelp] Book: do not provide completion for book titles
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] Book: do not provide completion for book titles
- Date: Sat, 20 Jan 2018 09:14:33 +0000 (UTC)
commit a4c82b8a71f8a30e09ee223396f8cf9f1c123590
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Jan 20 10:11:58 2018 +0100
Book: do not provide completion for book titles
src/dh-book.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/dh-book.c b/src/dh-book.c
index e351da2..864f887 100644
--- a/src/dh-book.c
+++ b/src/dh-book.c
@@ -526,6 +526,13 @@ dh_book_get_completion (DhBook *book)
DhLink *link = l->data;
const gchar *str;
+ /* Do not provide completion for book titles. Normally
+ * the user doesn't need it, it's more convenient to
+ * choose a book with the DhBookTree.
+ */
+ if (dh_link_get_link_type (link) == DH_LINK_TYPE_BOOK)
+ continue;
+
str = dh_link_get_name (link);
dh_completion_add_string (priv->completion, str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]