logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: 41cfd1ccae96dda3378b9666e38e70e547fe87f2
parent 3f164de8eb38f06138d908536b198dcd507a3a74
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  4 Nov 2019 20:11:02 +0100

Show selected completion as a inline-selection

Diffstat:

Mbookmarks.c7++++++-
Mconfig.h3+++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git 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 diff --git a/config.h b/config.h @@ -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 */