summaryrefslogtreecommitdiff
path: root/rbutil/rbutilCtrls.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-06-24 20:32:28 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-06-24 20:32:28 +0000
commita92fc620f0677950d0f5d3e05db914024a015150 (patch)
tree3a91dbd1b1687a8c974fa14b4d0358d57832a4f4 /rbutil/rbutilCtrls.cpp
parent9d0e4e102b082448e140e95a40c8f1b12714be48 (diff)
downloadrockbox-a92fc620f0677950d0f5d3e05db914024a015150.tar.gz
rockbox-a92fc620f0677950d0f5d3e05db914024a015150.zip
rbutil: make autodetection silent on startup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13703 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilCtrls.cpp')
-rw-r--r--rbutil/rbutilCtrls.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/rbutil/rbutilCtrls.cpp b/rbutil/rbutilCtrls.cpp
index baa8bc8361..2a262d49e3 100644
--- a/rbutil/rbutilCtrls.cpp
+++ b/rbutil/rbutilCtrls.cpp
@@ -433,11 +433,15 @@ void DeviceSelectorCtrl::OnComboBox(wxCommandEvent& event)
433 433
434void DeviceSelectorCtrl::OnAutoDetect(wxCommandEvent& event) 434void DeviceSelectorCtrl::OnAutoDetect(wxCommandEvent& event)
435{ 435{
436 AutoDetect(); 436 if(!AutoDetect())
437 {
438 WARN_DIALOG(wxT("No Device detected. If you have a Device connected, select the correct one manually."),
439 wxT("Detecting a Device"));
440 }
437} 441}
438 442
439 443
440void DeviceSelectorCtrl::AutoDetect() 444bool DeviceSelectorCtrl::AutoDetect()
441{ 445{
442 UsbDeviceInfo device; 446 UsbDeviceInfo device;
443 447
@@ -453,19 +457,19 @@ void DeviceSelectorCtrl::AutoDetect()
453 { 457 {
454 gv->curdestdir = device.path; 458 gv->curdestdir = device.path;
455 } 459 }
460 return true;
456 } 461 }
457 else if(device.status == TOMANYDEVICES) 462 else if(device.status == TOMANYDEVICES)
458 { 463 {
459 WARN_DIALOG(wxT("More then one device detected, please connect only One"), 464 WARN_DIALOG(wxT("More then one device detected, please connect only One"),
460 wxT("Detecting a Device")); 465 wxT("Detecting a Device"));
461 return; 466 return true;
462 } 467 }
463 } 468 }
464 else 469 else
465 { 470 {
466 WARN_DIALOG(wxT("No Device detected. If you have a Device connected, select the correct one manually."), 471
467 wxT("Detecting a Device")); 472 return false;
468 return;
469 } 473 }
470 474
471} 475}