summaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-12-06 17:48:38 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-06 11:58:29 -0800
commit9b7b477d7cc868212045a78b30089363cbebcf91 (patch)
tree2d8a00b88f4a7637cb1920c0c629ff581e679ff1 /qt-gui.cpp
parent7436178fe0817a4c5defac28f1a395d84cf539b5 (diff)
downloadsubsurface-9b7b477d7cc868212045a78b30089363cbebcf91.tar.gz
Added 'English' and 'Use System Default' options.
These complete the ability to select languages from the preferences panel. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index a65621314..04c5bc17a 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -89,7 +89,12 @@ void init_ui(int *argcp, char ***argvp)
QSettings s;
s.beginGroup("Language");
- QLocale loc(s.value("UiLanguage", QLocale().uiLanguages().first()).toString());
+ QLocale loc;
+
+ if (!s.value("UseSystemLanguage", true).toBool()){
+ loc = QLocale(s.value("UiLanguage", QLocale().uiLanguages().first()).toString());
+ }
+
QString uiLang = loc.uiLanguages().first();
s.endGroup();