diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 49 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.h | 2 |
2 files changed, 33 insertions, 18 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); 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 |