aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-14 02:26:28 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-14 02:26:28 +0800
commitb086814a1ff6d94b29ae2185aebb22321da7e1a4 (patch)
treee46e46cf0fa82fe990ccdf9c3eb2eb3fd002a15d /embed/mozilla/mozilla-embed-single.cpp
parent33be35697d5adebab76b93d863b127c300e8c7e5 (diff)
downloadgsoc2013-epiphany-b086814a1ff6d94b29ae2185aebb22321da7e1a4.tar
gsoc2013-epiphany-b086814a1ff6d94b29ae2185aebb22321da7e1a4.tar.gz
gsoc2013-epiphany-b086814a1ff6d94b29ae2185aebb22321da7e1a4.tar.bz2
gsoc2013-epiphany-b086814a1ff6d94b29ae2185aebb22321da7e1a4.tar.lz
gsoc2013-epiphany-b086814a1ff6d94b29ae2185aebb22321da7e1a4.tar.xz
gsoc2013-epiphany-b086814a1ff6d94b29ae2185aebb22321da7e1a4.tar.zst
gsoc2013-epiphany-b086814a1ff6d94b29ae2185aebb22321da7e1a4.zip
Put back borked mozilla alert.
2003-11-13 Marco Pesenti Gritti <marco@gnome.org> * embed/ephy-embed-shell.c: (ephy_embed_shell_get_embed_single): * embed/mozilla/mozilla-embed-single.cpp: * embed/mozilla/mozilla-embed-single.h: * src/ephy-shell.h: Put back borked mozilla alert.
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp49
1 files changed, 33 insertions, 16 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index cfaf6028f..50c75484c 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -315,20 +315,6 @@ mozilla_register_external_protocols (void)
mozilla_register_MailtoProtocolHandler ();
}
-static void
-mozilla_embed_single_init (MozillaEmbedSingle *mes)
-{
- mes->priv = MOZILLA_EMBED_SINGLE_GET_PRIVATE (mes);
-
- mes->priv->theme_window = NULL;
- mes->priv->user_prefs =
- g_build_filename (ephy_dot_dir (),
- MOZILLA_PROFILE_DIR,
- MOZILLA_PROFILE_NAME,
- MOZILLA_PROFILE_FILE,
- NULL);
-}
-
static nsresult
getUILang (nsAString& aUILang)
{
@@ -387,8 +373,8 @@ mozilla_init_chrome (void)
return NS_OK;
}
-gboolean
-mozilla_embed_single_init_services (MozillaEmbedSingle *single)
+static gboolean
+init_services (MozillaEmbedSingle *single)
{
/* Pre initialization */
mozilla_init_home ();
@@ -424,6 +410,37 @@ mozilla_embed_single_init_services (MozillaEmbedSingle *single)
}
static void
+mozilla_embed_single_init (MozillaEmbedSingle *mes)
+{
+ mes->priv = MOZILLA_EMBED_SINGLE_GET_PRIVATE (mes);
+
+ mes->priv->theme_window = NULL;
+ mes->priv->user_prefs =
+ g_build_filename (ephy_dot_dir (),
+ MOZILLA_PROFILE_DIR,
+ MOZILLA_PROFILE_NAME,
+ MOZILLA_PROFILE_FILE,
+ NULL);
+
+ if (!init_services (mes))
+ {
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new
+ (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("Epiphany can't be used now. "
+ "Mozilla initialization failed. Check your "
+ "MOZILLA_FIVE_HOME environmental variable."));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+
+ exit (0);
+ }
+}
+
+static void
mozilla_embed_single_finalize (GObject *object)
{
MozillaEmbedSingle *mes = MOZILLA_EMBED_SINGLE (object);