summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristiam Dywan <christian@twotoasts.de>2019-03-04 23:13:16 +0100
committerChristiam Dywan <christian@twotoasts.de>2019-03-04 23:13:16 +0100
commitdd7fcdfa6fdde6dd8914fe0dbeae6c02db2a30f9 (patch)
treeb71d5267a7231e9f59a078a4a2f235b9732eabd0
parent83159193bfbdd9a1afab6e4e03d972138a540126 (diff)
downloadmidori-git-browser_search_entry_toggle.tar.gz
Show/ hide search bar when switching tabsbrowser_search_entry_toggle
The find controller tracks state per web view.
-rw-r--r--core/browser.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/browser.vala b/core/browser.vala
index 73d4e008..4bcf9a24 100644
--- a/core/browser.vala
+++ b/core/browser.vala
@@ -306,6 +306,9 @@ namespace Midori {
}
focus_timeout = Timeout.add (500, () => {
tab.grab_focus ();
+ search_entry.text = tab.get_find_controller ().get_search_text () ?? "";
+ search.visible = search_entry.text != "";
+ search.search_mode_enabled = search.visible;
goto_activated ();
return Source.REMOVE;
}, Priority.LOW);