diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-07-30 04:12:55 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-07-30 04:12:55 +0800 |
commit | db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0 (patch) | |
tree | 02234f3fb181aca685fcc29da0ff92687c7a1cfa /embed/mozilla | |
parent | 941de06806cb6c145ac2b522ad276add5bdbb2fd (diff) | |
download | gsoc2013-epiphany-db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0.tar gsoc2013-epiphany-db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0.tar.gz gsoc2013-epiphany-db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0.tar.bz2 gsoc2013-epiphany-db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0.tar.lz gsoc2013-epiphany-db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0.tar.xz gsoc2013-epiphany-db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0.tar.zst gsoc2013-epiphany-db1f5a7b30564f89cf1fdbb3cd6a8fae68a9bfd0.zip |
Implement ::grab-focus and remove ephy_embed_activate ().
2005-07-29 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed.c:
* embed/ephy-embed.h:
* embed/mozilla/mozilla-embed.cpp:
Implement ::grab-focus and remove ephy_embed_activate ().
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 4176821fc..1d96f65a4 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -184,9 +184,20 @@ mozilla_embed_get_type (void) } static void -impl_activate (EphyEmbed *embed) +mozilla_embed_grab_focus (GtkWidget *widget) { - gtk_widget_grab_focus (GTK_BIN (embed)->child); + GtkWidget *child; + + child = gtk_bin_get_child (GTK_BIN (widget)); + + if (child != NULL) + { + gtk_widget_grab_focus (child); + } + else + { + g_warning ("Need to realize the embed before grabbing focus!\n"); + } } #ifdef GTKMOZEMBED_BROKEN_FOCUS @@ -290,6 +301,7 @@ mozilla_embed_class_init (MozillaEmbedClass *klass) gtk_object_class->destroy = mozilla_embed_destroy; + widget_class->grab_focus = mozilla_embed_grab_focus; widget_class->realize = mozilla_embed_realize; #ifdef GTKMOZEMBED_BROKEN_FOCUS @@ -1126,7 +1138,6 @@ ephy_embed_iface_init (EphyEmbedIface *iface) iface->shistory_go_nth = impl_shistory_go_nth; iface->get_security_level = impl_get_security_level; iface->show_page_certificate = impl_show_page_certificate; - iface->activate = impl_activate; iface->set_encoding = impl_set_encoding; iface->get_encoding = impl_get_encoding; iface->has_automatic_encoding = impl_has_automatic_encoding; |