diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-11-13 12:40:25 (EST) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-11-13 12:40:25 (EST) |
commit | 43fba9a73c78d731f2f456b0fad3fe6bfb045aef (patch) | |
tree | 491a157cb394f9c69e0b353d25a3993e3b694b31 | |
parent | 3615593b7bd978c6e5919678189000b8c6b75f15 (diff) | |
download | marquee-43fba9a73c78d731f2f456b0fad3fe6bfb045aef.zip marquee-43fba9a73c78d731f2f456b0fad3fe6bfb045aef.tar.gz marquee-43fba9a73c78d731f2f456b0fad3fe6bfb045aef.tar.bz2 |
MqFindToolbar: Don't show "No matches" on search entry clearing
-rw-r--r-- | src/toolbars/find-toolbar.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/toolbars/find-toolbar.c b/src/toolbars/find-toolbar.c index 42c2a9a..f89f084 100644 --- a/src/toolbars/find-toolbar.c +++ b/src/toolbars/find-toolbar.c @@ -183,7 +183,18 @@ static void failed_to_find_text_cb(WebKitFindController G_GNUC_UNUSED *find_controller, MqFindToolbar *find_toolbar) { - guint32 find_options; + const gchar *search_text; + guint32 find_options; + + search_text = webkit_find_controller_get_search_text( + find_toolbar->find_controller); + + if (!search_text[0]) { + /* Search entry cleared. */ + gtk_spinner_stop(find_toolbar->spinner); + gtk_label_set_text(GTK_LABEL(find_toolbar->matches_label), ""); + return; + } find_options = webkit_find_controller_get_options( find_toolbar->find_controller); |