diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/ephy-find-toolbar.c | 18 |
2 files changed, 25 insertions, 0 deletions
@@ -1,3 +1,10 @@ +2005-06-04 Christian Persch <chpe@cvs.gnome.org> + + * src/ephy-find-toolbar.c: (tab_dom_mouse_click_cb), + (ephy_find_toolbar_set_embed): + + Close find bar on mouse click in the embed. + 2005-06-03 Jean-François Rameau <jframeau@cvs.gnome.org> * embed/mozilla/EventContext.cpp: 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) |