From ca9420bdfcce62702b6e30afd1f0e1f38f556f6e Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 28 Jan 2010 22:35:21 +0100 Subject: [PATCH] Always hide findbar on hotkey if visible, or when it loses focus --- midori/midori-browser.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 27f9b2ee..0973ebe6 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -202,6 +202,9 @@ midori_search_action_get_icon (KatzeItem* item, GtkWidget* widget, const gchar** icon_name); +static void +_midori_browser_find_done (MidoriBrowser* browser); + static GtkAction* _action_by_name (MidoriBrowser* browser, const gchar* name) @@ -2537,7 +2540,9 @@ static void _action_find_activate (GtkAction* action, MidoriBrowser* browser) { - if (!GTK_WIDGET_VISIBLE (browser->find)) + if (GTK_WIDGET_VISIBLE (browser->find)) + _midori_browser_find_done (browser); + else { GtkWidget* view; const gchar* text; @@ -2613,8 +2618,7 @@ midori_browser_find_text_focus_out_event_cb (GtkWidget* entry, GdkEventFocus* event, MidoriBrowser* browser) { - if (browser->find_typing) - _midori_browser_find_done (browser); + _midori_browser_find_done (browser); return FALSE; } -- 2.39.5