aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-14 06:39:15 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-14 06:39:15 +0800
commitba1b334527bccd32be59964d3f18d6883f4bee39 (patch)
tree3c1e4a5dc565c4469c78a424e8095729131905c8
parent14b719a06d565edd38e3a94ffda615150be841af (diff)
downloadgsoc2013-epiphany-ba1b334527bccd32be59964d3f18d6883f4bee39.tar
gsoc2013-epiphany-ba1b334527bccd32be59964d3f18d6883f4bee39.tar.gz
gsoc2013-epiphany-ba1b334527bccd32be59964d3f18d6883f4bee39.tar.bz2
gsoc2013-epiphany-ba1b334527bccd32be59964d3f18d6883f4bee39.tar.lz
gsoc2013-epiphany-ba1b334527bccd32be59964d3f18d6883f4bee39.tar.xz
gsoc2013-epiphany-ba1b334527bccd32be59964d3f18d6883f4bee39.tar.zst
gsoc2013-epiphany-ba1b334527bccd32be59964d3f18d6883f4bee39.zip
Persist the selected language for the fonts preferences, and make the
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.
-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);