mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* cmd.c (guess_message_value): Remove the argument. Adjust all
callers.
This commit is contained in:
parent
e94ec737ad
commit
7fe30fff07
@ -1,5 +1,8 @@
|
||||
2001-09-15 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* 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.
|
||||
|
22
src/cmd.c
22
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 */
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user