aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-14 02:36:01 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-14 02:36:01 +0800
commit4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6 (patch)
treebb38b0edc318de13df4676b74925d57820ce1728 /src
parent486d194d5a04616abb66e7eac63b63231c013447 (diff)
downloadgsoc2013-epiphany-4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6.tar
gsoc2013-epiphany-4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6.tar.gz
gsoc2013-epiphany-4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6.tar.bz2
gsoc2013-epiphany-4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6.tar.lz
gsoc2013-epiphany-4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6.tar.xz
gsoc2013-epiphany-4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6.tar.zst
gsoc2013-epiphany-4e4136a14c342e8aaa0d55a86d9aa83c5f4e70e6.zip
Persist the language selected for the fonts preferences. Make the
2003-06-13 Christian Persch <chpe@cvs.gnome.org> * src/prefs-dialog.c: (create_language_menu): Persist the language selected for the fonts preferences. Make the initialiser of the languages menu safe for NULL list from eel_gconf_get_string_list.
Diffstat (limited to 'src')
-rw-r--r--src/prefs-dialog.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 87e62d64b..80e0dc931 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -243,6 +243,8 @@ enum
MEMORY_CACHE_PROP
};
+#define CONF_FONTS_FOR_LANGUAGE "/apps/epiphany/dialogs/preferences_fonts_for_lang"
+
static const
EphyDialogProperty properties [] =
{
@@ -257,7 +259,7 @@ EphyDialogProperty properties [] =
{ LANGUAGE_PROP, "language_optionmenu", NULL, PT_NORMAL, NULL },
/* Appeareance */
- { FONTS_LANGUAGE_PROP, "fonts_language_optionmenu", NULL, PT_NORMAL, NULL },
+ { FONTS_LANGUAGE_PROP, "fonts_language_optionmenu", CONF_FONTS_FOR_LANGUAGE, PT_AUTOAPPLY, NULL },
{ SERIF_PROP, "serif_combo", NULL, PT_NORMAL, NULL },
{ SANSSERIF_PROP, "sansserif_combo", NULL, PT_NORMAL, NULL },
{ MONOSPACE_PROP, "monospace_combo", NULL, PT_NORMAL, NULL },
@@ -1005,22 +1007,23 @@ create_language_menu (PrefsDialog *dialog)
/* init value from first element of the list */
list = eel_gconf_get_string_list (CONF_RENDERING_LANGUAGE);
- g_return_if_fail (list != NULL); /* FIXME: doesn't connect the handler! */
+ if (list)
+ {
+ code = (const gchar *) list->data;
+ lang = g_list_find_custom (dialog->priv->langs, code,
+ (GCompareFunc)find_lang_code);
- code = (const gchar *) list->data;
- lang = g_list_find_custom (dialog->priv->langs, code,
- (GCompareFunc)find_lang_code);
+ if (lang)
+ {
+ i = g_list_position (dialog->priv->langs, lang);
+ }
- if (lang)
- {
- i = g_list_position (dialog->priv->langs, lang);
+ g_slist_foreach (list, (GFunc) g_free, NULL);
+ g_slist_free (list);
}
gtk_option_menu_set_history (GTK_OPTION_MENU(optionmenu), i);
- g_slist_foreach (list, (GFunc) g_free, NULL);
- g_slist_free (list);
-
g_signal_connect (optionmenu, "changed",
G_CALLBACK (language_menu_changed_cb),
dialog);