NOISSUE tweak UI geometry and remove old language selection
This commit is contained in:
@ -78,7 +78,6 @@ MultiMCPage::MultiMCPage(QWidget *parent) : QWidget(parent), ui(new Ui::MultiMCP
|
||||
}
|
||||
connect(ui->fontSizeBox, SIGNAL(valueChanged(int)), SLOT(refreshFontPreview()));
|
||||
connect(ui->consoleFont, SIGNAL(currentFontChanged(QFont)), SLOT(refreshFontPreview()));
|
||||
connect(ui->languageBox, SIGNAL(currentIndexChanged(int)), SLOT(languageIndexChanged(int)));
|
||||
}
|
||||
|
||||
MultiMCPage::~MultiMCPage()
|
||||
@ -147,19 +146,6 @@ void MultiMCPage::on_modsDirBrowseBtn_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void MultiMCPage::languageIndexChanged(int index)
|
||||
{
|
||||
auto languageCode = ui->languageBox->itemData(ui->languageBox->currentIndex()).toString();
|
||||
if(languageCode.isEmpty())
|
||||
{
|
||||
qWarning() << "Unknown language at index" << index;
|
||||
return;
|
||||
}
|
||||
auto translations = MMC->translations();
|
||||
translations->selectLanguage(languageCode);
|
||||
translations->updateLanguage(languageCode);
|
||||
}
|
||||
|
||||
void MultiMCPage::refreshUpdateChannelList()
|
||||
{
|
||||
// Stop listening for selection changes. It's going to change a lot while we update it and
|
||||
@ -236,10 +222,6 @@ void MultiMCPage::applySettings()
|
||||
{
|
||||
auto s = MMC->settings();
|
||||
|
||||
// Language
|
||||
auto langCode = ui->languageBox->itemData(ui->languageBox->currentIndex()).toString();
|
||||
s->set("Language", langCode.isEmpty() ? "en" : langCode);
|
||||
|
||||
if (ui->resetNotificationsBtn->isChecked())
|
||||
{
|
||||
s->set("ShownNotifications", QString());
|
||||
@ -332,12 +314,6 @@ void MultiMCPage::applySettings()
|
||||
void MultiMCPage::loadSettings()
|
||||
{
|
||||
auto s = MMC->settings();
|
||||
// Language
|
||||
{
|
||||
ui->languageBox->setModel(m_languageModel.get());
|
||||
ui->languageBox->setCurrentIndex(ui->languageBox->findData(s->get("Language").toString()));
|
||||
}
|
||||
|
||||
// Updates
|
||||
ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool());
|
||||
m_currentUpdateChannel = s->get("UpdateChannel").toString();
|
||||
|
Reference in New Issue
Block a user