aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-01-28 04:13:09 +0800
committerChristian Persch <chpe@src.gnome.org>2006-01-28 04:13:09 +0800
commitca5f11319afff03fbd1421ef3f0063727f76d955 (patch)
treecab10aa1cb05b809ac61017debf8ca941bfdaa38 /src
parent1d515168cdff346b93e9948b5d7d1c5f6c614cca (diff)
downloadgsoc2013-epiphany-ca5f11319afff03fbd1421ef3f0063727f76d955.tar.gz
gsoc2013-epiphany-ca5f11319afff03fbd1421ef3f0063727f76d955.tar.zst
gsoc2013-epiphany-ca5f11319afff03fbd1421ef3f0063727f76d955.zip
Disable pango rendering by default, unless MOZ_ENABLE_PANGO env var is
2006-01-27 Christian Persch <chpe@cvs.gnome.org> * src/ephy-main.c: (main): Disable pango rendering by default, unless MOZ_ENABLE_PANGO env var is set. Bug #328844.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-main.c71
1 files changed, 35 insertions, 36 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 1d14bda0b..a50030bc0 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -486,6 +486,7 @@ main (int argc,
DBusGProxy *proxy;
GError *error = NULL;
guint32 user_time;
+ const char *env;
#ifndef GNOME_PARAM_GOPTION_CONTEXT
GPtrArray *fake_argv_array;
#endif
@@ -614,36 +615,42 @@ main (int argc,
exit (1);
}
+ /* Create DBUS proxy */
+ proxy = ephy_dbus_get_proxy (ephy_dbus_get_default (), EPHY_DBUS_SESSION);
+ if (proxy == NULL)
+ {
+ error = g_error_new (STARTUP_ERROR_QUARK,
+ 0,
+ "Unable to get DBus proxy; aborting activation."); /* FIXME i18n */
+
+ _ephy_dbus_release ();
+
+ show_error_message (&error);
+
+ exit (1);
+ }
+
/* If we're remoting, no need to start up any further services,
* just forward the call.
*/
if (!_ephy_dbus_is_name_owner ())
{
- /* FIXME */
- proxy = ephy_dbus_get_proxy (ephy_dbus_get_default (), EPHY_DBUS_SESSION);
- if (proxy == NULL)
+ if (!call_dbus_proxy (proxy, user_time, &error))
{
- error = g_error_new (STARTUP_ERROR_QUARK,
- 0,
- "Unable to get DBus proxy; aborting activation."); /* FIXME i18n */
- }
-
- if (proxy != NULL &&
- call_dbus_proxy (proxy, user_time, &error))
- {
- gtk_main ();
-
_ephy_dbus_release ();
- gdk_notify_startup_complete ();
- exit (0);
+ show_error_message (&error);
+
+ exit (1);
}
- _ephy_dbus_release ();
+ /* Wait for the response */
+ gtk_main ();
- show_error_message (&error);
+ _ephy_dbus_release ();
- exit (1);
+ gdk_notify_startup_complete ();
+ exit (0);
}
/* We're not remoting; start our services */
@@ -668,27 +675,17 @@ main (int argc,
gtk_about_dialog_set_url_hook (handle_url, NULL, NULL);
gtk_about_dialog_set_email_hook (handle_email, NULL, NULL);
- /* Now create the shell */
- _ephy_shell_create_instance ();
-
- /* Create DBUS proxy */
- proxy = ephy_dbus_get_proxy (ephy_dbus_get_default (), EPHY_DBUS_SESSION);
- if (proxy == NULL)
+ /* Work around bug #328844 */
+ env = g_getenv ("MOZ_ENABLE_PANGO");
+ if (env == NULL ||
+ env[0] == '\0' ||
+ strcmp (env, "0") == 0)
{
- error = g_error_new (STARTUP_ERROR_QUARK,
- 0,
- "Unable to get DBus proxy; aborting activation."); /* FIXME i18n */
-
- g_object_unref (ephy_shell_get_default ());
-
- ephy_file_helpers_shutdown ();
- _ephy_dbus_release ();
-
- show_error_message (&error);
-
- exit (1);
+ g_setenv ("MOZ_DISABLE_PANGO", "1", TRUE);
}
+ /* Now create the shell */
+ _ephy_shell_create_instance ();
g_object_weak_ref (G_OBJECT (proxy),
(GWeakNotify) dbus_g_proxy_finalized_cb,
g_object_ref (ephy_shell_get_default ()));
@@ -696,6 +693,8 @@ main (int argc,
if (!call_dbus_proxy (proxy, user_time, &error))
{
g_object_unref (ephy_shell_get_default ());
+ g_object_unref (proxy);
+ g_assert (ephy_shell_get_default () == NULL);
ephy_file_helpers_shutdown ();
_ephy_dbus_release ();