aboutsummaryrefslogtreecommitdiffstats
path: root/src
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 /src
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.
Diffstat (limited to 'src')
-rw-r--r--src/prefs-dialog.c20
1 files changed, 15 insertions, 5 deletions
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);