# HG changeset patch # User Teemu Piippo # Date 1656414627 -10800 # Node ID 04478da357d06101388c5fedc285b32fb773ece6 # Parent 99af8bf63d10054cf46c3150a2f4d87c361322f3 Disable language changing for now (translations won't go into 1.0) diff -r 99af8bf63d10 -r 04478da357d0 src/main.cpp --- a/src/main.cpp Tue Jun 28 13:03:21 2022 +0300 +++ b/src/main.cpp Tue Jun 28 14:10:27 2022 +0300 @@ -144,6 +144,7 @@ QObject::tr("LDraw models (*.ldr *.dat)")); } +#if 0 static const QString localeCode(const QString& locale) { if (locale == "system") { @@ -171,6 +172,7 @@ } } } +#endif static ModelData* findModelData(const DocumentManager* documents, ModelId modelId) { @@ -465,7 +467,7 @@ const auto restoreSettings = [&]{ recentlyOpenedFiles = setting(); renderPreferences = loadRenderPreferences(); - changeLanguage(setting(), &translator); + //changeLanguage(setting(), &translator); libraries.restoreFromSettings(); updateRecentlyOpenedDocumentsMenu(); colorTable = loadColors(&libraries); diff -r 99af8bf63d10 -r 04478da357d0 src/settings.h --- a/src/settings.h Tue Jun 28 13:03:21 2022 +0300 +++ b/src/settings.h Tue Jun 28 14:10:27 2022 +0300 @@ -27,7 +27,7 @@ Q_DECLARE_METATYPE(QMdiArea::ViewMode) // Rendering options -SETTING(Locale, QString{"system"}) +//SETTING(Locale, QString{"system"}) SETTING(BackgroundColor, (QColor{48, 48, 48})) SETTING(MainColor, (QColor{255, 255, 64})) SETTING(SelectedColor, (QColor{32, 32, 224})) diff -r 99af8bf63d10 -r 04478da357d0 src/settingseditor/settingseditor.cpp --- a/src/settingseditor/settingseditor.cpp Tue Jun 28 13:03:21 2022 +0300 +++ b/src/settingseditor/settingseditor.cpp Tue Jun 28 14:10:27 2022 +0300 @@ -46,7 +46,7 @@ void SettingsEditor::saveSettings() { - setSetting(this->ui.language->currentData().toString()); + //setSetting(this->ui.language->currentData().toString()); setSetting(this->ui.mainColorButton->color()); setSetting(this->ui.backgroundColorButton->color()); setSetting(this->ui.selectedColorButton->color()); @@ -63,6 +63,7 @@ void SettingsEditor::loadLocales() { + /* this->ui.language->clear(); QDir dir{":/locale"}; // Collect translation files in built-in resources @@ -81,12 +82,13 @@ this->ui.language->addItem(languageName, localeCode); this->ui.language->setItemIcon(this->ui.language->count() - 1, flag); } + */ } void SettingsEditor::loadSettings() { this->libraries.restoreFromSettings(); - this->setCurrentLanguage(setting()); + //this->setCurrentLanguage(setting()); this->ui.mainColorButton->setColor(setting()); this->ui.backgroundColorButton->setColor(setting()); this->ui.selectedColorButton->setColor(setting()); @@ -101,6 +103,7 @@ void SettingsEditor::setCurrentLanguage(const QString& localeCode) { + /* for (int i = 0; i < this->ui.language->count(); i += 1) { if (this->ui.language->itemData(i) == localeCode) @@ -109,4 +112,5 @@ break; } } + */ } diff -r 99af8bf63d10 -r 04478da357d0 src/settingseditor/settingseditor.ui --- a/src/settingseditor/settingseditor.ui Tue Jun 28 13:03:21 2022 +0300 +++ b/src/settingseditor/settingseditor.ui Tue Jun 28 14:10:27 2022 +0300 @@ -31,7 +31,7 @@ 0 0 694 - 561 + 563 @@ -54,40 +54,28 @@ - - - Language: - - - - - - - - - - System language - - - - - English - - - - - - - View mode: - + + + + Arrange opened documents using resizable and movable subwindows + + + Subwindows + + + viewModeButtonGroup + + + + Arrange opened documents using tabs @@ -100,19 +88,6 @@ - - - - Arrange opened documents using resizable and movable subwindows - - - Subwindows - - - viewModeButtonGroup - - -