aboutsummaryrefslogtreecommitdiffstats
path: root/src/prefs-dialog.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-01 00:35:41 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-01 00:35:41 +0800
commit763b4e07e1444c08c4a393ac562621a3d6bbb373 (patch)
treec5670ee539785e5e3c12a5aabd7d6d21f634b70a /src/prefs-dialog.c
parentc6247087ebcbe7b06c3082c3ceb6378e9557ba37 (diff)
downloadgsoc2013-epiphany-763b4e07e1444c08c4a393ac562621a3d6bbb373.tar.gz
gsoc2013-epiphany-763b4e07e1444c08c4a393ac562621a3d6bbb373.tar.zst
gsoc2013-epiphany-763b4e07e1444c08c4a393ac562621a3d6bbb373.zip
Remove gtkoptionmenu.h include.
2003-11-30 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-dialog.c: Remove gtkoptionmenu.h include. * src/language-editor.c: (language_editor_add): * src/prefs-dialog.c: (create_language_menu): Make languages list unique; don't allow to add an entry already in the list.
Diffstat (limited to 'src/prefs-dialog.c')
-rw-r--r--src/prefs-dialog.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index e9e2a207f..d276753ac 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -594,11 +594,27 @@ create_language_menu (EphyDialog *dialog)
GtkTreeIter iter;
GtkCellRenderer *renderer;
int i;
- GSList *list, *l;
+ GSList *list, *l, *ulist = NULL;
/* init value from first element of the list */
list = eel_gconf_get_string_list (CONF_RENDERING_LANGUAGE);
+ /* uniquify list */
+ for (l = list; l != NULL; l = l->next)
+ {
+ if (g_slist_find_custom (ulist, l->data, (GCompareFunc) strcmp) == NULL)
+ {
+ ulist = g_slist_prepend (ulist, l->data);
+ }
+ else
+ {
+ g_free (l->data);
+ }
+ }
+ g_slist_free (list);
+ list = g_slist_reverse (ulist);
+ eel_gconf_set_string_list (CONF_RENDERING_LANGUAGE, list);
+
combo = GTK_COMBO_BOX (ephy_dialog_get_control
(dialog, properties[LANGUAGE_PROP].id));