diff options
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-shell-settings-dialog.c | 27 |
2 files changed, 10 insertions, 23 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 145111b252..670a27ac4b 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2002-03-22 Ettore Perazzoli <ettore@ximian.com> + + * e-shell-settings-dialog.c (get_language_list): Removed. + (load_pages): Use e_get_language_list() here instead. Also, free + using e_free_language_list(). + 2002-03-22 Dan Winship <danw@ximian.com> * evolution-storage.c (evolution_storage_update_folder): Fix a diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c index aeb51e8469..33a4613c91 100644 --- a/shell/e-shell-settings-dialog.c +++ b/shell/e-shell-settings-dialog.c @@ -29,10 +29,11 @@ #include "e-corba-config-page.h" +#include "e-util/e-lang-utils.h" + #include <gal/util/e-util.h> #include <bonobo/bonobo-widget.h> - #include <liboaf/liboaf.h> #include <string.h> @@ -42,26 +43,6 @@ static EMultiConfigDialogClass *parent_class = NULL; -static GSList * -get_language_list (void) -{ - const char *env; - const char *p; - - env = g_getenv ("LANGUAGE"); - if (env == NULL) { - env = g_getenv ("LANG"); - if (env == NULL) - return NULL; - } - - p = strchr (env, '='); - if (p != NULL) - return g_slist_prepend (NULL, (void *) (p + 1)); - else - return g_slist_prepend (NULL, (void *) env); -} - static void load_pages (EShellSettingsDialog *dialog) { @@ -79,7 +60,7 @@ load_pages (EShellSettingsDialog *dialog) return; } - language_list = get_language_list (); + language_list = e_get_language_list (); for (i = 0; i < control_list->_length; i ++) { CORBA_Object corba_object; @@ -121,7 +102,7 @@ load_pages (EShellSettingsDialog *dialog) CORBA_free (control_list); - g_slist_free (language_list); + e_free_language_list (language_list); CORBA_exception_free (&ev); } |