diff options
author | Saturneric <[email protected]> | 2021-12-07 06:59:55 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-07 07:03:30 +0000 |
commit | 71fe17c0d2f4a2105c622763be7e3b2979574ab4 (patch) | |
tree | 1d041d47971af43d2e803f6537bfe2d5d06e1d23 | |
parent | Support Windows Build (diff) | |
download | GpgFrontend-71fe17c0d2f4a2105c622763be7e3b2979574ab4.tar.gz GpgFrontend-71fe17c0d2f4a2105c622763be7e3b2979574ab4.zip |
Fix bugs in macOS.
-rw-r--r-- | src/main.cpp | 3 | ||||
-rw-r--r-- | src/ui/help/AboutDialog.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index faa19218..f4739767 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -149,8 +149,9 @@ void init_locale() { auto* locale_name = setlocale(LC_ALL, lc.c_str()); if (locale_name == nullptr) LOG(WARNING) << "set LC_ALL failed" << lc; #ifndef WINDOWS + auto language = getenv("LANGUAGE"); // set LANGUAGE - std::string language_env = getenv("LANGUAGE"); + std::string language_env = language == nullptr ? "en" : language; language_env.insert(0, lang + ":"); LOG(INFO) << "language env" << language_env; if (setenv("LANGUAGE", language_env.c_str(), 1)) { diff --git a/src/ui/help/AboutDialog.cpp b/src/ui/help/AboutDialog.cpp index 1dd06933..93e7ccb3 100644 --- a/src/ui/help/AboutDialog.cpp +++ b/src/ui/help/AboutDialog.cpp @@ -218,7 +218,7 @@ void UpdateTab::slotShowVersionStatus(const QString& current, QString(_("Latest Version From Github")) + ": " + server + "</b></center>"); - if (true || current < server) { + if (current < server) { upgradeLabel->show(); } } |