aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog9
-rw-r--r--embed/ephy-embed-shell.c16
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp49
-rw-r--r--embed/mozilla/mozilla-embed-single.h2
-rw-r--r--src/ephy-shell.h3
5 files changed, 44 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index bf0f8e566..6a2802dfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
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.
+
+2003-11-13 Marco Pesenti Gritti <marco@gnome.org>
+
* src/ephy-shell.c: (ephy_shell_finalize):
Looks like we need to unregister factory since
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index e338a0c35..e15aba244 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -209,21 +209,7 @@ ephy_embed_shell_get_embed_single (EphyEmbedShell *shell)
if (!shell->priv->embed_single)
{
- EphyEmbedSingle *single;
- gboolean res;
-
- single = mozilla_embed_single_new ();
- res = mozilla_embed_single_init_services
- (MOZILLA_EMBED_SINGLE (single));
-
- if (res)
- {
- shell->priv->embed_single = single;
- }
- else
- {
- g_object_unref (single);
- }
+ shell->priv->embed_single = mozilla_embed_single_new ();
}
return shell->priv->embed_single;
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);
diff --git a/embed/mozilla/mozilla-embed-single.h b/embed/mozilla/mozilla-embed-single.h
index 71cc48416..dfefd0a5a 100644
--- a/embed/mozilla/mozilla-embed-single.h
+++ b/embed/mozilla/mozilla-embed-single.h
@@ -50,8 +50,6 @@ GType mozilla_embed_single_get_type (void);
EphyEmbedSingle *mozilla_embed_single_new (void);
-gboolean mozilla_embed_single_init_services (MozillaEmbedSingle *single);
-
G_END_DECLS
#endif
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 32a01a48c..66e12ace5 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -55,8 +55,7 @@ typedef enum
{
EPHY_SHELL_ERROR_MISSING_SERVER,
EPHY_SHELL_ERROR_OBJECT_REG_FAILED,
- EPHY_SHELL_ERROR_FACTORY_REG_FAILED,
- EPHY_SHELL_ERROR_MOZILLA_REG_FAILED
+ EPHY_SHELL_ERROR_FACTORY_REG_FAILED
} EphyShellError;
typedef enum