aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--embed/ephy-embed.c7
-rw-r--r--embed/ephy-embed.h3
-rw-r--r--embed/mozilla/mozilla-embed.cpp11
-rw-r--r--src/window-commands.c10
5 files changed, 46 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 50929017a..757fefdd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2003-08-19 Marco Pesenti Gritti <marco@.gnome.org>
+
+ * 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.
+
2003-08-17 Marco Pesenti Gritti <marco@.gnome.org>
* embed/mozilla/EphyWrapper.cpp:
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index f9bf0dc7b..48e9cdcf3 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -558,6 +558,13 @@ ephy_embed_find_next (EphyEmbed *embed,
}
gresult
+ephy_embed_activate (EphyEmbed *embed)
+{
+ EphyEmbedClass *klass = EPHY_EMBED_GET_CLASS (embed);
+ return klass->activate (embed);
+}
+
+gresult
ephy_embed_set_encoding (EphyEmbed *embed,
const char *encoding)
{
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index 27fe2e504..24006c039 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -260,6 +260,7 @@ struct EphyEmbedClass
gboolean wrap_around);
gresult (* find_next) (EphyEmbed *embed,
gboolean backwards);
+ gresult (* activate) (EphyEmbed *embed);
gresult (* print) (EphyEmbed *embed,
EmbedPrintInfo *info);
gresult (* print_preview_close) (EphyEmbed *embed);
@@ -390,6 +391,8 @@ gresult ephy_embed_find_next (EphyEmbed *embed,
gresult ephy_embed_set_encoding (EphyEmbed *embed,
const char *encoding);
+gresult ephy_embed_activate (EphyEmbed *embed);
+
/* Printing */
gresult ephy_embed_print (EphyEmbed *embed,
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
@@ -309,6 +309,16 @@ impl_find_next (EphyEmbed *embed,
}
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,
gboolean case_sensitive,
@@ -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;
diff --git a/src/window-commands.c b/src/window-commands.c
index 2ea06e6b3..66145daf4 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -79,6 +79,8 @@ window_cmd_go_back (EggAction *action,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
+ ephy_embed_activate (embed);
+
ephy_embed_go_back (embed);
}
@@ -91,6 +93,8 @@ window_cmd_go_up (EggAction *action,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
+ ephy_embed_activate (embed);
+
ephy_embed_go_up (embed);
}
@@ -146,6 +150,8 @@ window_cmd_go_forward (EggAction *action,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
+ ephy_embed_activate (embed);
+
ephy_embed_go_forward (embed);
}
@@ -185,6 +191,8 @@ window_cmd_view_stop (EggAction *action,
embed = ephy_window_get_active_embed (window);
g_return_if_fail (embed != NULL);
+ ephy_embed_activate (embed);
+
ephy_embed_stop_load (embed);
}
@@ -220,6 +228,8 @@ window_cmd_view_reload (EggAction *action,
force = TRUE;
}
+ ephy_embed_activate (embed);
+
ephy_embed_reload (embed, force ? EMBED_RELOAD_NORMAL
: EMBED_RELOAD_BYPASSCACHE);
}