diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | data/Makefile.am | 6 | ||||
-rw-r--r-- | data/epiphany-pango.schemas | 46 | ||||
-rw-r--r-- | lib/ephy-prefs.h | 3 | ||||
-rw-r--r-- | src/ephy-main.c | 23 |
5 files changed, 79 insertions, 9 deletions
@@ -1,3 +1,13 @@ +2006-04-09 Christian Persch <chpe@cvs.gnome.org> + + * data/Makefile.am: + A data/epiphany-pango.schemas: + * lib/ephy-prefs.h: + * src/ephy-main.c: (main): + + Enable pango for some indic languages, which depend on it for correct + rendering. Bug #335799. + 2006-04-03 Jean-François Rameau <jframeau@cvs.gnome.org> * src/ephy-net-monitor.c: diff --git a/data/Makefile.am b/data/Makefile.am index 92fffef04..7f9fd11ed 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -30,9 +30,9 @@ desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop) schemadir = $(GCONF_SCHEMA_FILE_DIR) -font_schema_files = epiphany-fonts.schemas +extra_schema_files = epiphany-fonts.schemas epiphany-pango.schemas schema_in_files = epiphany.schemas.in epiphany-lockdown.schemas.in -schema_DATA = $(schema_in_files:.schemas.in=.schemas) $(font_schema_files) +schema_DATA = $(schema_in_files:.schemas.in=.schemas) $(extra_schema_files) aboutdir = $(pkgdatadir) about_DATA = epiphany.xhtml @@ -73,7 +73,7 @@ endif EXTRA_DIST = \ $(service_in_files) \ $(schema_in_files) \ - $(font_schema_files) \ + $(extra_schema_files) \ $(desktop_in_files) \ $(about_DATA) \ $(mimepermission_DATA) \ diff --git a/data/epiphany-pango.schemas b/data/epiphany-pango.schemas new file mode 100644 index 000000000..5b5ee5a9e --- /dev/null +++ b/data/epiphany-pango.schemas @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<gconfschemafile> + <schemalist> + <schema> + <key>/schemas/apps/epiphany/web/enable_pango</key> + <applyto>/apps/epiphany/web/enable_pango</applyto> + <owner>epiphany</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Whether to enable the gecko pango renderer</short> + <long>Whether to enabled the gecko pango renderer.</long> + </locale> + <locale name="bn"> + <default>true</default> + </locale> + <locale name="gu"> + <default>true</default> + </locale> + <locale name="hi"> + <default>true</default> + </locale> + <locale name="kn"> + <default>true</default> + </locale> + <locale name="ml"> + <default>true</default> + </locale> + <locale name="mr"> + <default>true</default> + </locale> + <locale name="ne"> + <default>true</default> + </locale> + <locale name="pa"> + <default>true</default> + </locale> + <locale name="ta"> + <default>true</default> + </locale> + <locale name="te"> + <default>true</default> + </locale> + </schema> + </schemalist> +</gconfschemafile> diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h index a1ee22117..6082d1c09 100644 --- a/lib/ephy-prefs.h +++ b/lib/ephy-prefs.h @@ -38,6 +38,9 @@ G_BEGIN_DECLS #define CONF_DESKTOP_IS_HOME_DIR "/apps/nautilus/preferences/desktop_is_home_dir" #define CONF_NETWORK_MANAGED "/apps/epiphany/general/managed_network" +/* i18n pref */ +#define CONF_GECKO_ENABLE_PANGO "/apps/epiphany/web/enable_pango" + /* Directories */ #define CONF_STATE_SAVE_DIR "/apps/epiphany/directories/save" #define CONF_STATE_SAVE_IMAGE_DIR "/apps/epiphany/directories/saveimage" diff --git a/src/ephy-main.c b/src/ephy-main.c index 6b81bc064..16865aecb 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -91,7 +91,7 @@ static const GOptionEntry option_entries[] = { "profile", 0, 0, G_OPTION_ARG_STRING, &profile_directory, N_("Profile directory to use in the private instance"), N_("DIR") }, { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &arguments, - "", "" }, + "", N_("URL ...")}, { NULL } }; @@ -415,6 +415,7 @@ main (int argc, GError *error = NULL; guint32 user_time; const char *env; + gboolean enable_pango; #ifndef GNOME_PARAM_GOPTION_CONTEXT GPtrArray *fake_argv_array; #endif @@ -494,7 +495,7 @@ main (int argc, /* get this early, since gdk will unset the env var */ user_time = get_startup_id (); - option_context = g_option_context_new (_("GNOME Web Browser")); + option_context = g_option_context_new (""); option_group = g_option_group_new ("epiphany", N_("GNOME Web Browser"), N_("GNOME Web Browser options"), @@ -685,15 +686,25 @@ main (int argc, gtk_about_dialog_set_url_hook (handle_url, NULL, NULL); gtk_about_dialog_set_email_hook (handle_email, NULL, NULL); - /* Work around bug #328844 */ + /* Work around bug #328844, and avoid the gecko+pango performance problem */ env = g_getenv ("MOZ_ENABLE_PANGO"); - if (env == NULL || - env[0] == '\0' || - strcmp (env, "0") == 0) + enable_pango = env != NULL && + env[0] != '\0' && + g_ascii_strtoull (env, NULL, 10) != 0; + + if (eel_gconf_get_boolean (CONF_GECKO_ENABLE_PANGO)) + { + g_print ("NOTE: Enabling gecko pango renderer; this may cause performance degradation.\n" + "You can set " CONF_GECKO_ENABLE_PANGO " to \"false\" to disable it.\n"); + } + else if (!enable_pango) { g_setenv ("MOZ_DISABLE_PANGO", "1", TRUE); } + /* Work-around Flash Player crash */ + g_setenv ("XLIB_SKIP_ARGB_VISUALS", "1", FALSE); + /* Now create the shell */ _ephy_shell_create_instance (); |