summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2013-09-16 16:59:09 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-09-18 23:37:38 +0200
commit935c7fbff741349b4ecebda212a870a31c8cb97d (patch)
tree79cc13082636119533d54224e6efa589f93f2290
parent3dcf833edd559509c3258f75958cc39d0d074f83 (diff)
downloadrockbox-935c7fbff741349b4ecebda212a870a31c8cb97d.tar.gz
rockbox-935c7fbff741349b4ecebda212a870a31c8cb97d.tar.bz2
rockbox-935c7fbff741349b4ecebda212a870a31c8cb97d.zip
List detected devices if multiple are found.
In preparation of giving the user a list to choose from add displaying a list of all devices connected. Since devices might be ambiguous (multiple devices share the same USB ID but detecting by other means failed) the listed devices might exceed the number of actually attached ones. Change-Id: Ice52da15523e5f3493a6fb687392301c4d5b8a36
-rw-r--r--rbutil/rbutilqt/configure.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index acd68aa52d..7416a55ccb 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -734,9 +734,23 @@ void Config::autodetect()
this->unsetCursor();
if(detected.size() > 1) {
// FIXME: handle multiple found players.
- QMessageBox::information(this, tr("Device Detection"),
- tr("Multiple devices have been detected. Please disconnect "
- "all players but one and try again."));
+ QString msg;
+ msg = tr("Multiple devices have been detected. Please disconnect "
+ "all players but one and try again.");
+ msg += "<br/>";
+ msg += tr("Detected devices:");
+ msg += "<ul>";
+ for(int i = 0; i < detected.size(); ++i) {
+ msg += QString("<li>%1</li>").arg(
+ SystemInfo::platformValue(detected.at(i).device,
+ SystemInfo::CurPlatformName).toString());
+ }
+ msg += "</ul>";
+ msg += tr("Note: detecting connected devices might be ambiguous. "
+ "You might have less devices connected than listed. "
+ "In this case it might not be possible to detect your "
+ "player unambiguously.");
+ QMessageBox::information(this, tr("Device Detection"), msg);
ui.treeDevices->setEnabled(true);
}
else if(detected.size() == 0) {