diff options
Show selected completion as a inline-selection
2 files changed, 9 insertions, 1 deletions
| -rw-r--r-- | bookmarks.c | 7 | ||||
| -rw-r--r-- | config.h | 3 |
diff --git a/bookmarks.c b/bookmarks.c index 4bbfb8a..8a69814 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -1,13 +1,17 @@ #include "bookmarks.h" #include "badwolf.h" +#include "config.h" #include <glib/gprintf.h> /* g_fprintf() */ #include <gtk/gtk.h> #include <libxml/xpath.h> gboolean -location_completion_matches(GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data) +location_completion_matches(GtkEntryCompletion *completion, + const gchar *key, + GtkTreeIter *iter, + gpointer user_data) { (void)user_data; gchar *buffer; @@ -30,6 +34,7 @@ location_completion_setup(GtkListStore *list_store) gtk_entry_completion_set_model(location_completion, GTK_TREE_MODEL(list_store)); gtk_entry_completion_set_text_column(location_completion, 0); gtk_entry_completion_set_match_func(location_completion, location_completion_matches, NULL, NULL); + gtk_entry_completion_set_inline_selection(location_completion, BADWOLF_LOCATION_INLINE_SELECTION); } void @@ -104,4 +104,7 @@ */ #define BADWOLF_DOWNLOAD_FILE_PATH_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE +// BADWOLF_LOCATION_INLINE_SELECTION: show selected completion as a selection in location entry +#define BADWOLF_LOCATION_INLINE_SELECTION TRUE + #endif /* CONFIG_H_INCLUDED */ |