From eeac7e657d86802e904337ffef1bf5a0341a8cd0 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 3 Jun 2005 13:42:34 +0000 Subject: Don't open search toolbar on / or ' over formfields: 2005-06-03 Christian Persch Don't open search toolbar on / or ' over formfields: * embed/ephy-embed.c: (ephy_embed_base_init): * embed/ephy-embed.h: New signal for searchable key presses. * embed/mozilla/EventContext.cpp: * embed/mozilla/EventContext.h: Add static function to check if a keypress should be forwarded to the search toolbar. * embed/mozilla/mozilla-embed.cpp: Emit the signal here. * lib/ephy-marshal.list: * src/ephy-find-toolbar.c: (tab_search_key_press_cb), (ephy_find_toolbar_set_embed): Use the new signal instead of dom-key-press. --- embed/ephy-embed.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'embed/ephy-embed.c') diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 79d95e51b..eb9785b29 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -350,6 +350,24 @@ ephy_embed_base_init (gpointer g_class) 1, G_TYPE_POINTER); +/** + * EphyEmbed::ge-search-key-press: + * @embed: + * @event: the #GdkEventKey which triggered this signal + * + * The ::ge-search-key-press signal is emitted for keypresses which + * should be used for find implementations. + **/ + g_signal_new ("ge-search-key-press", + EPHY_TYPE_EMBED, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EphyEmbedIface, context_menu), + g_signal_accumulator_true_handled, NULL, + ephy_marshal_BOOLEAN__BOXED, + G_TYPE_BOOLEAN, + 1, + GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); + initialized = TRUE; } } -- cgit v1.2.3