diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-08-08 19:32:18 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-08-08 19:32:18 +0800 |
commit | 1bb4b10ce6a3e857b14e0637e17203960dcc9543 (patch) | |
tree | 13cc19b248d1c9b042ba8ccd3bf3a837f0778ac5 /embed/mozilla/mozilla-embed-single.cpp | |
parent | 5edd4b22cdae0b762add8316fe023a334f67060d (diff) | |
download | gsoc2013-epiphany-1bb4b10ce6a3e857b14e0637e17203960dcc9543.tar gsoc2013-epiphany-1bb4b10ce6a3e857b14e0637e17203960dcc9543.tar.gz gsoc2013-epiphany-1bb4b10ce6a3e857b14e0637e17203960dcc9543.tar.bz2 gsoc2013-epiphany-1bb4b10ce6a3e857b14e0637e17203960dcc9543.tar.lz gsoc2013-epiphany-1bb4b10ce6a3e857b14e0637e17203960dcc9543.tar.xz gsoc2013-epiphany-1bb4b10ce6a3e857b14e0637e17203960dcc9543.tar.zst gsoc2013-epiphany-1bb4b10ce6a3e857b14e0637e17203960dcc9543.zip |
Make ephy_embed_single_open_window() return the newly opened embed widget.
2004-08-08 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed-single.c: (ephy_embed_single_open_window):
* embed/ephy-embed-single.h:
* embed/mozilla/mozilla-embed-single.cpp: (impl_open_window):
* src/ephy-tab.c: (popups_manager_show):
Make ephy_embed_single_open_window() return the newly opened
embed widget.
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 8da7ce61e..ba379377e 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -45,6 +45,7 @@ #include "EphySingle.h" #include "EphyBrowser.h" #include "EphyUtils.h" +#include "MozillaPrivate.h" #include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-utils.h> @@ -898,28 +899,31 @@ impl_permission_manager_list (EphyPermissionManager *manager, return list; } -static void +static GtkWidget * impl_open_window (EphyEmbedSingle *single, EphyEmbed *parent, const char *address, + const char *name, const char *features) { nsCOMPtr<nsIDOMWindow> domWindow; - nsCOMPtr<nsIDOMWindow> dummy; if (parent) { EphyBrowser *browser; browser = (EphyBrowser *) _mozilla_embed_get_ephy_browser (MOZILLA_EMBED(parent)); - g_return_if_fail (browser != NULL); + g_return_val_if_fail (browser != NULL, NULL); browser->GetDOMWindow (getter_AddRefs (domWindow)); } nsCOMPtr<nsIWindowWatcher> wWatch(do_GetService ("@mozilla.org/embedcomp/window-watcher;1")); - wWatch->OpenWindow (domWindow, address, "", features, nsnull, - getter_AddRefs (dummy)); + nsCOMPtr<nsIDOMWindow> newWindow; + wWatch->OpenWindow (domWindow, address, name, features, nsnull, + getter_AddRefs (newWindow)); + + return MozillaFindEmbed (newWindow); } static void |