diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp index ff221db..d5de5ff 100644 --- a/rbutil/rbutilqt/base/systeminfo.cpp +++ b/rbutil/rbutilqt/base/systeminfo.cpp @@ -119,7 +119,8 @@ QStringList SystemInfo::platforms(enum SystemInfo::PlatformType type, QString va { QString target = systemInfos->value("platforms/"+a.at(i), "null").toString(); // only add target if its not disabled - if(systemInfos->value(target+"/status").toString() == "disabled") + if(type != PlatformAllDisabled + && systemInfos->value(target+"/status").toString() == "disabled") continue; // report only base targets when PlatformBase is requested if(type == PlatformBase && target.contains('.')) diff --git a/rbutil/rbutilqt/base/systeminfo.h b/rbutil/rbutilqt/base/systeminfo.h index 45984d4..bab4815 100644 --- a/rbutil/rbutilqt/base/systeminfo.h +++ b/rbutil/rbutilqt/base/systeminfo.h @@ -65,6 +65,7 @@ class SystemInfo : public QObject enum PlatformType { PlatformAll, + PlatformAllDisabled, PlatformBase, PlatformVariant }; diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp index dafa999..b6bbec0 100644 --- a/rbutil/rbutilqt/configure.cpp +++ b/rbutil/rbutilqt/configure.cpp @@ -99,6 +99,7 @@ Config::Config(QWidget *parent,int index) : QDialog(parent) connect(ui.comboTts, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTtsState(int))); connect(ui.treeDevices, SIGNAL(itemSelectionChanged()), this, SLOT(updateEncState())); connect(ui.testTTS,SIGNAL(clicked()),this,SLOT(testTts())); + connect(ui.showDisabled, SIGNAL(toggled(bool)), this, SLOT(showDisabled(bool))); setUserSettings(); setDevices(); } @@ -282,20 +283,38 @@ void Config::updateCacheInfo(QString path) } +void Config::showDisabled(bool show) +{ + qDebug() << "[Config] disabled targets shown:" << show; + if(show) + QMessageBox::warning(this, tr("Showing disabled targets"), + tr("You just enabled showing targets that are marked disabled. " + "Disabled targets are not to be used by end users. Please " + "use this option only if you know what you are doing.")); + setDevices(); + +} + + void Config::setDevices() { // setup devices table qDebug() << "[Config] setting up devices list"; - QStringList platformList = SystemInfo::platforms(); + QStringList platformList; + if(ui.showDisabled->isChecked()) + platformList = SystemInfo::platforms(SystemInfo::PlatformAllDisabled); + else + platformList = SystemInfo::platforms(SystemInfo::PlatformAll); QMap manuf; QMap devcs; for(int it = 0; it < platformList.size(); it++) { QString curname = SystemInfo::name(platformList.at(it)) + - " (" +ServerInfo::platformValue(platformList.at(it),ServerInfo::CurStatus).toString() + ")"; + " (" +ServerInfo::platformValue(platformList.at(it), + ServerInfo::CurStatus).toString() + ")"; QString curbrand = SystemInfo::brand(platformList.at(it)); manuf.insertMulti(curbrand, platformList.at(it)); devcs.insert(platformList.at(it), curname); @@ -341,6 +360,14 @@ void Config::setDevices() items.append(w2); } } + // remove any old items in list + QTreeWidgetItem* widgetitem; + do { + widgetitem = ui.treeDevices->takeTopLevelItem(0); + delete widgetitem; + } + while(widgetitem); + // add new items ui.treeDevices->insertTopLevelItems(0, items); if(w3 != 0) ui.treeDevices->setCurrentItem(w3); // hilight old selection diff --git a/rbutil/rbutilqt/configure.h b/rbutil/rbutilqt/configure.h index 2ca54af..d265490 100644 --- a/rbutil/rbutilqt/configure.h +++ b/rbutil/rbutilqt/configure.h @@ -71,6 +71,7 @@ class Config : public QDialog void updateTtsState(int); void updateEncState(); void testTts(); + void showDisabled(bool); }; #endif diff --git a/rbutil/rbutilqt/configurefrm.ui b/rbutil/rbutilqt/configurefrm.ui index bfd87cb..cd5fbb1 100644 --- a/rbutil/rbutilqt/configurefrm.ui +++ b/rbutil/rbutilqt/configurefrm.ui @@ -1,7 +1,8 @@ - + + ConfigForm - - + + 0 0 @@ -9,195 +10,215 @@ 465 - + Configuration - - - - + + + + Configure Rockbox Utility - - - + + + 0 - - - &Device - - - + + + :/icons/rbutil.png:/icons/rbutil.png - - - - + + &Device + + + + + Select your device in the &filesystem - + mountPoint - - + + - + - - + + &Browse - - + + :/icons/system-search.png:/icons/system-search.png - + false - - - + + + &Select your audio player - + treeDevices - - + + + + Qt::Horizontal + + + + 118 + 20 + + + + + + + + Show disabled targets + + + + + - + 1 - - - + + + &Autodetect - - + + :/icons/edit-find.png:/icons/edit-find.png - + true - + false - - - &Proxy - - - + + + :/icons/network-idle.png:/icons/network-idle.png - - - - + + &Proxy + + + + + &No Proxy - + true - - - + + + Use S&ystem values - - - + + + &Manual Proxy settings - - - + + + Proxy Values - - - - + + + + &Host: - + proxyHost - - - + + + true - - - + + + &Port: - + proxyPort - - + + - - + + - - - + + + QLineEdit::Password - - - + + + &Username - + proxyUser - - - + + + Pass&word - + proxyPass @@ -205,12 +226,12 @@ - + - + Qt::Vertical - + 20 40 @@ -220,108 +241,108 @@ - - - &Language - - - + + + :/icons/preferences-desktop-locale.png:/icons/preferences-desktop-locale.png - - - + + &Language + + + + - - - Cac&he - - - + + + :/icons/package-x-generic.png:/icons/package-x-generic.png - + + Cac&he + + Download cache settings - - - - + + + + Rockbox Utility uses a local download cache to save network traffic. You can change the path to the cache and use it as local repository by enabling Offline mode. - + true - - - + + + Current cache size is %1 - - + + - - + + P&ath - + cachePath - - + + Entering an invalid folder will reset the path to the systems temporary path. - - + + &Browse - - + + :/icons/edit-find.png:/icons/edit-find.png - - + + - - + + Disable local &download cache - - + + This will try to use all information from the cache, even information about updates. Only use this option if you want to install without network connection. Note: you need to do the same install you want to perform later with network access first to download all required files to the cache. - + O&ffline mode - + - + Qt::Vertical - + 20 61 @@ -329,12 +350,12 @@ - + - + Qt::Horizontal - + 40 20 @@ -342,78 +363,78 @@ - - - + + + Clean cache &now - - + + :/icons/user-trash-full.png:/icons/user-trash-full.png - - - &TTS && Encoder - - - + + + :/icons/audio-input-microphone.png:/icons/audio-input-microphone.png - + + &TTS && Encoder + + - - + + TTS Engine - - - - + + + + &Select TTS Engine - + comboTts - - + + - - - + + + Configure TTS Engine - - - + + + Configuration invalid! - - - + + + - - :/icons/dialog-error.png + + :/icons/dialog-error.png - - - + + + Configure &TTS - - + + :/icons/edit-find.png:/icons/edit-find.png @@ -429,42 +450,42 @@ - - + + Encoder Engine - - - - + + + + Configuration invalid! - - - + + + - - :/icons/dialog-error.png + + :/icons/dialog-error.png - - - + + + Configure &Enc - - + + :/icons/edit-find.png:/icons/edit-find.png - - - + + + encoder name @@ -474,10 +495,10 @@ - + Qt::Vertical - + 458 131 @@ -489,12 +510,12 @@ - + - + Qt::Horizontal - + 40 20 @@ -502,24 +523,24 @@ - - - + + + &Ok - - + + :/icons/go-next.png:/icons/go-next.png - - - + + + &Cancel - - + + :/icons/process-stop.png:/icons/process-stop.png @@ -527,7 +548,7 @@ - +