mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Handle no selected themes properly.
When installing themes without any themes selected show a notice in the log and continue instead of stopping. Change-Id: Ieeb03e4656b041ce1dda25b2c44b6b6f0aa0ca80
This commit is contained in:
parent
d0f7a8181b
commit
b7931594f9
2 changed files with 3 additions and 2 deletions
|
|
@ -465,10 +465,10 @@ void SelectiveInstallWidget::installThemes(void)
|
||||||
if(m_themesinstaller == NULL)
|
if(m_themesinstaller == NULL)
|
||||||
m_themesinstaller = new ThemesInstallWindow(this);
|
m_themesinstaller = new ThemesInstallWindow(this);
|
||||||
|
|
||||||
|
connect(m_themesinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
|
||||||
m_themesinstaller->setLogger(m_logger);
|
m_themesinstaller->setLogger(m_logger);
|
||||||
m_themesinstaller->setModal(true);
|
m_themesinstaller->setModal(true);
|
||||||
m_themesinstaller->install();
|
m_themesinstaller->install();
|
||||||
connect(m_themesinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "[SelectiveInstallWidget] Themes install disabled.";
|
qDebug() << "[SelectiveInstallWidget] Themes install disabled.";
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,8 @@ void ThemesInstallWindow::accept(void)
|
||||||
void ThemesInstallWindow::install()
|
void ThemesInstallWindow::install()
|
||||||
{
|
{
|
||||||
if(ui.listThemes->selectedItems().size() == 0) {
|
if(ui.listThemes->selectedItems().size() == 0) {
|
||||||
this->close();
|
logger->addItem(tr("No themes selected, skipping"), LOGINFO);
|
||||||
|
emit done(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QStringList themes;
|
QStringList themes;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue