]> spindle.queued.net Git - midori/commitdiff
Always hide findbar on hotkey if visible, or when it loses focus
authorChristian Dywan <christian@twotoasts.de>
Thu, 28 Jan 2010 21:35:21 +0000 (22:35 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 28 Jan 2010 21:35:21 +0000 (22:35 +0100)
midori/midori-browser.c

index 27f9b2eeb26d1d3963ed4ff05459e9450b3c3d23..0973ebe6056f40e6f87705f35e31096b97d57068 100644 (file)
@@ -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;
 }