diff --git a/src/ChangeLog b/src/ChangeLog index d5c712c44..85f831b53 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-09-15 Pavel Roskin + * cmd.c (guess_message_value): Remove the argument. Adjust all + callers. + * textconf.c (features): Remove "edition", minor fixes. (version): Don't report the current locale - it's meaningless, especially if ENABLE_NLS is not defined. diff --git a/src/cmd.c b/src/cmd.c index a2696ae49..9bae043e8 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1191,7 +1191,7 @@ void mkdir_panel_cmd (void) /* partly taken from dcigettext.c, returns "" for default locale */ /* value should be freed by calling function g_free() */ -char *guess_message_value (unsigned want_info) +char *guess_message_value (void) { const char *var[] = { /* The highest priority value is the `LANGUAGE' environment @@ -1206,9 +1206,9 @@ char *guess_message_value (unsigned want_info) /* NULL exit loops */ NULL }; - + gchar *retval; - + unsigned i = 0; char *locale = NULL; @@ -1217,20 +1217,12 @@ char *guess_message_value (unsigned want_info) if (locale != NULL && locale[0] != '\0') break; i++; - } + } - if (var[i] == NULL) + if (locale == NULL) locale = ""; - - if (want_info == 0) - retval = g_strdup (locale); - else - if (var[i] == NULL) - retval = g_strdup (_("Using default locale")); - else - retval = g_strdup_printf (_("Using locale \"%s\" (from environment variable %s)"), locale, var[i]); - - return retval; + + return g_strdup (locale); } /* Returns a random hint */ diff --git a/src/cmd.h b/src/cmd.h index 9bc97ed3e..737f28e3c 100644 --- a/src/cmd.h +++ b/src/cmd.h @@ -63,7 +63,7 @@ void save_setup_cmd (void); char *get_random_hint (void); void source_routing (void); void user_file_menu_cmd (void); -char *guess_message_value (unsigned want_info); +char *guess_message_value (void); int check_for_default(char *default_file, char *file); /* Display mode code */ diff --git a/src/util.c b/src/util.c index 46050f4bb..a5fce3e55 100644 --- a/src/util.c +++ b/src/util.c @@ -628,7 +628,7 @@ char *load_mc_home_file (const char *filename, char ** allocated_filename) char *data; hintfile_base = concat_dir_and_file (mc_home, filename); - lang = guess_message_value (0); + lang = guess_message_value (); hintfile = g_strdup_printf ("%s.%s", hintfile_base, lang); data = load_file (hintfile);