[easytag: 8/9] Only show a locale log message if it is useful



commit d58e1e2f86589616ad4ce6a218f53ca25e97f079
Author: David King <amigadave amigadave com>
Date:   Mon Jan 25 19:17:03 2016 +0000

    Only show a locale log message if it is useful
    
    On Windows, check that the LANG environment variable is set before
    displaying its value in a log message.

 src/application.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/application.c b/src/application.c
index a6d506b..da8cbda 100644
--- a/src/application.c
+++ b/src/application.c
@@ -169,7 +169,10 @@ common_init (EtApplication *self)
     /* Starting messages */
     Log_Print (LOG_OK, _("Starting EasyTAG version %s…"), PACKAGE_VERSION);
 #ifdef G_OS_WIN32
-    Log_Print (LOG_OK, _("Setting locale: ‘%s’"), g_getenv ("LANG"));
+    if (g_getenv ("LANG"))
+    {
+        Log_Print (LOG_OK, _("Setting locale: ‘%s’"), g_getenv ("LANG"));
+    }
 #endif /* G_OS_WIN32 */
 
     if (get_locale ())


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]