From 27b3a31636135db43034b5cbebb996e4b6d86db2 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 18 Aug 2003 22:42:39 +0000 Subject: Add activate api. 2003-08-19 Marco Pesenti Gritti * embed/ephy-embed.c: (ephy_embed_activate): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: Add activate api. * src/window-commands.c: (window_cmd_go_back), (window_cmd_go_up), (window_cmd_go_forward), (window_cmd_view_stop), (window_cmd_view_reload): Activate on navigation commands. It seem like a better beahvior and it avoid some mozilla focus craziness. --- embed/mozilla/mozilla-embed.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'embed/mozilla/mozilla-embed.cpp') diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 63c696d80..66695ef64 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -308,6 +308,16 @@ impl_find_next (EphyEmbed *embed, return didFind ? G_OK : G_FAILED; } +static gresult +impl_activate (EphyEmbed *embed) +{ + g_return_val_if_fail (IS_EPHY_EMBED (embed), G_FAILED); + + gtk_widget_grab_focus (GTK_BIN (embed)->child); + + return G_OK; +} + static gresult impl_find_set_properties (EphyEmbed *embed, char *search_string, @@ -363,6 +373,7 @@ ephy_embed_init (EphyEmbedClass *embed_class) embed_class->shistory_copy = impl_shistory_copy; embed_class->get_security_level = impl_get_security_level; embed_class->find_next = impl_find_next; + embed_class->activate = impl_activate; embed_class->find_set_properties = impl_find_set_properties; embed_class->set_encoding = impl_set_encoding; embed_class->select_all = impl_select_all; -- cgit v1.2.3