diff options
| author | Dominik Wenger <domonoky@googlemail.com> | 2007-06-24 20:32:28 +0000 |
|---|---|---|
| committer | Dominik Wenger <domonoky@googlemail.com> | 2007-06-24 20:32:28 +0000 |
| commit | a92fc620f0677950d0f5d3e05db914024a015150 (patch) | |
| tree | 3a91dbd1b1687a8c974fa14b4d0358d57832a4f4 | |
| parent | 9d0e4e102b082448e140e95a40c8f1b12714be48 (diff) | |
| download | rockbox-a92fc620f0677950d0f5d3e05db914024a015150.zip rockbox-a92fc620f0677950d0f5d3e05db914024a015150.tar.gz rockbox-a92fc620f0677950d0f5d3e05db914024a015150.tar.bz2 rockbox-a92fc620f0677950d0f5d3e05db914024a015150.tar.xz | |
rbutil: make autodetection silent on startup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13703 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | rbutil/rbutil.cbp | 4 | ||||
| -rw-r--r-- | rbutil/rbutilCtrls.cpp | 16 | ||||
| -rw-r--r-- | rbutil/rbutilCtrls.h | 2 |
3 files changed, 12 insertions, 10 deletions
diff --git a/rbutil/rbutil.cbp b/rbutil/rbutil.cbp index 8c35bc2..b1cadf4 100644 --- a/rbutil/rbutil.cbp +++ b/rbutil/rbutil.cbp @@ -18,6 +18,7 @@ <Option compiler="gcc" /> <Option projectResourceIncludeDirsRelation="0" /> <ExtraCommands> + <Add before="cmd /c cd icons && bin2c.exe *.png" /> <Add after="upx --best --compress-icons=0 rbutil.exe" /> </ExtraCommands> <MakeCommands> @@ -91,9 +92,6 @@ <Add directory="$(#WX.lib)" /> <Add directory=".\" /> </Linker> - <ExtraCommands> - <Add before="cmd /c cd icons && bin2c.exe *.png" /> - </ExtraCommands> <Unit filename="Makefile" /> <Unit filename="archos.ico" /> <Unit filename="autodetection.cpp" /> diff --git a/rbutil/rbutilCtrls.cpp b/rbutil/rbutilCtrls.cpp index baa8bc8..2a262d4 100644 --- a/rbutil/rbutilCtrls.cpp +++ b/rbutil/rbutilCtrls.cpp @@ -433,11 +433,15 @@ void DeviceSelectorCtrl::OnComboBox(wxCommandEvent& event) void DeviceSelectorCtrl::OnAutoDetect(wxCommandEvent& event) { - AutoDetect(); + if(!AutoDetect()) + { + WARN_DIALOG(wxT("No Device detected. If you have a Device connected, select the correct one manually."), + wxT("Detecting a Device")); + } } -void DeviceSelectorCtrl::AutoDetect() +bool DeviceSelectorCtrl::AutoDetect() { UsbDeviceInfo device; @@ -453,19 +457,19 @@ void DeviceSelectorCtrl::AutoDetect() { gv->curdestdir = device.path; } + return true; } else if(device.status == TOMANYDEVICES) { WARN_DIALOG(wxT("More then one device detected, please connect only One"), wxT("Detecting a Device")); - return; + return true; } } else { - WARN_DIALOG(wxT("No Device detected. If you have a Device connected, select the correct one manually."), - wxT("Detecting a Device")); - return; + + return false; } } diff --git a/rbutil/rbutilCtrls.h b/rbutil/rbutilCtrls.h index f31429f..7998dc6 100644 --- a/rbutil/rbutilCtrls.h +++ b/rbutil/rbutilCtrls.h @@ -177,7 +177,7 @@ public: wxString getDevice(); void setDefault(); - void AutoDetect(); + bool AutoDetect(); protected: wxString m_currentDevice; |