From 7144cfbeda560ee9dcf8522574defede4df18f98 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 4 Jun 2005 20:16:24 +0000 Subject: Close find bar on mouse click in the embed. 2005-06-04 Christian Persch * src/ephy-find-toolbar.c: (tab_dom_mouse_click_cb), (ephy_find_toolbar_set_embed): Close find bar on mouse click in the embed. --- src/ephy-find-toolbar.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/ephy-find-toolbar.c') diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c index 041a4f85c..0805c31d2 100644 --- a/src/ephy-find-toolbar.c +++ b/src/ephy-find-toolbar.c @@ -214,6 +214,21 @@ tab_search_key_press_cb (EphyEmbed *embed, return retval && (oldhash != newhash || priv->preedit_changed) && !priv->activated; } +static gboolean +tab_dom_mouse_click_cb (EphyEmbed *embed, + gpointer event, + EphyFindToolbar *toolbar) +{ + EphyFindToolbarPrivate *priv = toolbar->priv; + + if (!priv->explicit_focus) + { + ephy_find_toolbar_close (toolbar); + } + + return FALSE; +} + #endif /* HAVE_TYPEAHEADFIND */ static void @@ -598,6 +613,9 @@ ephy_find_toolbar_set_embed (EphyFindToolbar *toolbar, g_signal_connect_object (embed, "ge-search-key-press", G_CALLBACK (tab_search_key_press_cb), toolbar, 0); + g_signal_connect_object (embed, "dom-mouse-click", + G_CALLBACK (tab_dom_mouse_click_cb), + toolbar, 0); #endif if (priv->find != NULL) -- cgit