aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-11 18:19:04 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-11 18:19:04 +0800
commit7beb933c60288ce8e5756e591a089a82ab1c6b6c (patch)
tree06e3ab839f705249f1ee3e17d2a920133a97916a /embed/mozilla/mozilla-embed-single.cpp
parent760bb6dfe800fb1edd33d158ee19bd898f09fb2e (diff)
downloadgsoc2013-epiphany-7beb933c60288ce8e5756e591a089a82ab1c6b6c.tar
gsoc2013-epiphany-7beb933c60288ce8e5756e591a089a82ab1c6b6c.tar.gz
gsoc2013-epiphany-7beb933c60288ce8e5756e591a089a82ab1c6b6c.tar.bz2
gsoc2013-epiphany-7beb933c60288ce8e5756e591a089a82ab1c6b6c.tar.lz
gsoc2013-epiphany-7beb933c60288ce8e5756e591a089a82ab1c6b6c.tar.xz
gsoc2013-epiphany-7beb933c60288ce8e5756e591a089a82ab1c6b6c.tar.zst
gsoc2013-epiphany-7beb933c60288ce8e5756e591a089a82ab1c6b6c.zip
Build xul dialogs using GtkWindow+GtkMozEmbed. Make src code simpler and
2003-11-11 Marco Pesenti Gritti <marco@gnome.org> * embed/ephy-embed-single.c: (ephy_embed_single_class_init): * embed/ephy-embed-single.h: * embed/mozilla/mozilla-embed-persist.cpp: * embed/mozilla/mozilla-embed-single.cpp: * embed/mozilla/mozilla-embed.cpp: * embed/mozilla/mozilla-embed.h: * src/ephy-nautilus-view.c: (gnv_embed_new_window_cb): * src/ephy-session.c: (write_ephy_window): * src/ephy-shell.c: (ephy_shell_init): * src/ephy-tab.c: (ephy_tab_size_to_cb): * src/ephy-window.c: (translate_default_chrome): Build xul dialogs using GtkWindow+GtkMozEmbed. Make src code simpler and fix a pair of bugs.
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp39
1 files changed, 3 insertions, 36 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index df298d73a..6f03b5ea9 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -25,6 +25,7 @@
#include "glib.h"
#include "ephy-debug.h"
#include "gtkmozembed.h"
+#include "mozilla-embed.h"
#include "mozilla-embed-single.h"
#include "ephy-file-helpers.h"
#include "mozilla-notifiers.h"
@@ -231,43 +232,9 @@ mozilla_embed_single_new_window_orphan_cb (GtkMozEmbedSingle *embed,
guint chrome_mask,
EphyEmbedSingle *shell)
{
- /* FIXME conversion duped in mozilla_embed */
- EphyEmbed *new_embed;
- int i;
- EmbedChromeMask mask = EMBED_CHROME_OPENASPOPUP;
-
- struct
- {
- guint chromemask;
- EmbedChromeMask embed_mask;
- }
- conversion_map [] =
- {
- { GTK_MOZ_EMBED_FLAG_DEFAULTCHROME, EMBED_CHROME_DEFAULT },
- { GTK_MOZ_EMBED_FLAG_MENUBARON, EMBED_CHROME_MENUBARON },
- { GTK_MOZ_EMBED_FLAG_TOOLBARON, EMBED_CHROME_TOOLBARON },
- { GTK_MOZ_EMBED_FLAG_STATUSBARON, EMBED_CHROME_STATUSBARON },
- { GTK_MOZ_EMBED_FLAG_WINDOWRAISED, EMBED_CHROME_WINDOWRAISED },
- { GTK_MOZ_EMBED_FLAG_WINDOWLOWERED, EMBED_CHROME_WINDOWLOWERED },
- { GTK_MOZ_EMBED_FLAG_CENTERSCREEN, EMBED_CHROME_CENTERSCREEN },
- { GTK_MOZ_EMBED_FLAG_OPENASDIALOG, EMBED_CHROME_OPENASDIALOG },
- { GTK_MOZ_EMBED_FLAG_OPENASCHROME, EMBED_CHROME_OPENASCHROME },
- { 0, EMBED_CHROME_NONE }
- };
+ g_assert (chrome_mask && GTK_MOZ_EMBED_FLAG_OPENASCHROME);
- for (i = 0; conversion_map[i].chromemask != 0; i++)
- {
- if (chrome_mask & conversion_map[i].chromemask)
- {
- mask = (EmbedChromeMask) (mask | conversion_map[i].embed_mask);
- }
- }
-
- g_signal_emit_by_name (shell, "new_window_orphan", &new_embed, mask);
-
- g_assert (new_embed != NULL);
-
- *retval = GTK_MOZ_EMBED(EPHY_EMBED(new_embed));
+ *retval = _mozilla_embed_new_xul_dialog ();
}
static void