aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--data/epiphany.schemas.in18
-rw-r--r--src/prefs-dialog.c20
3 files changed, 41 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 631fae3b8..ffd85b965 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-14 Christian Persch <chpe@cvs.gnome.org>
+
+ * data/epiphany.schemas.in:
+ * src/prefs-dialog.c: (create_fonts_language_menu):
+
+ Persist the selected language for the fonts preferences, and make
+ the default translatable.
+
2003-06-13 Christian Persch <chpe@cvs.gnome.org>
* src/ephy_window.c: (update_window_visibility):
diff --git a/data/epiphany.schemas.in b/data/epiphany.schemas.in
index d3f9f0d60..196ebff7a 100644
--- a/data/epiphany.schemas.in
+++ b/data/epiphany.schemas.in
@@ -35,6 +35,24 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/epiphany/dialogs/preferences_font_language</key>
+ <applyto>/apps/epiphany/dialogs/preferences_font_language</applyto>
+ <owner>epiphany</owner>
+ <type>string</type>
+ <locale name="C">
+ <default>x-western</default>
+ <short>The currently selected fonts language</short>
+ <long>
+ The currently selected fonts language. Valid values are ar (arabic),
+ x-baltic (baltic languages), x-central-euro (central european languages),
+ x-cyrillic (languages written with cyrillic alphabet), el (greek),
+ he (hebrew), ja (japanese), ko (korean), zh-CN (simplified chinese),
+ th (thai), zh-TW (traditional chinese), tr (turkish), x-unicode (other
+ languages) and x-western (languages written in latin script).
+ </long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/epiphany/web/use_own_colors</key>
<applyto>/apps/epiphany/web/use_own_colors</applyto>
<owner>epiphany</owner>
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 80e0dc931..131c1b48b 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -243,7 +243,7 @@ enum
MEMORY_CACHE_PROP
};
-#define CONF_FONTS_FOR_LANGUAGE "/apps/epiphany/dialogs/preferences_fonts_for_lang"
+#define CONF_FONTS_FOR_LANGUAGE "/apps/epiphany/dialogs/preferences_font_language"
static const
EphyDialogProperty properties [] =
@@ -664,7 +664,8 @@ create_fonts_language_menu (PrefsDialog *dialog)
guint i;
guint n_fonts_languages;
const FontsLanguageInfo *fonts_language;
-
+ char **lang_codes;
+
n_fonts_languages = ephy_langs_get_n_font_languages ();
fonts_language = ephy_langs_get_font_languages ();
@@ -699,9 +700,18 @@ create_fonts_language_menu (PrefsDialog *dialog)
gtk_option_menu_set_menu (GTK_OPTION_MENU(optionmenu), menu);
- /* FIXME: find a way to set this to the user's current locale's lang */
- gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu),
- dialog->priv->language);
+ lang_codes = g_new0 (char *, n_fonts_languages);
+ for (i = 0; i < n_fonts_languages; i++)
+ {
+ lang_codes[i] = fonts_language[i].code;
+ }
+ ephy_dialog_add_enum (EPHY_DIALOG (dialog), FONTS_LANGUAGE_PROP,
+ n_fonts_languages, (const char **) lang_codes);
+ g_free (lang_codes);
+
+ dialog->priv->language =
+ gtk_option_menu_get_history (GTK_OPTION_MENU (optionmenu));
+
g_signal_connect (optionmenu, "changed",
G_CALLBACK (fonts_language_optionmenu_changed_cb),
dialog);