forked from AuroraMiddleware/gtk
GtkApplication: Call setlocale early
If we don't call setlocale early enough, --help output may come out misformatted. Fixes: #4234
This commit is contained in:
parent
07bff74544
commit
72dc9a21f7
@ -294,6 +294,9 @@ gtk_application_local_command_line (GApplication *application,
|
||||
char ***arguments,
|
||||
int *exit_status)
|
||||
{
|
||||
/* We need to call setlocale() here so --help output works */
|
||||
setlocale_initialization ();
|
||||
|
||||
return G_APPLICATION_CLASS (gtk_application_parent_class)->local_command_line (application, arguments, exit_status);
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ enum_locale_proc (LPTSTR locale)
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
void
|
||||
setlocale_initialization (void)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
|
@ -150,6 +150,8 @@ GBytes *get_emoji_data (void);
|
||||
|
||||
char * _gtk_elide_underscores (const char *original);
|
||||
|
||||
void setlocale_initialization (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_PRIVATE_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user