diff options
-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 8c35bc246d..b1cadf4165 100644 --- a/rbutil/rbutil.cbp +++ b/rbutil/rbutil.cbp | |||
@@ -18,6 +18,7 @@ | |||
18 | <Option compiler="gcc" /> | 18 | <Option compiler="gcc" /> |
19 | <Option projectResourceIncludeDirsRelation="0" /> | 19 | <Option projectResourceIncludeDirsRelation="0" /> |
20 | <ExtraCommands> | 20 | <ExtraCommands> |
21 | <Add before="cmd /c cd icons && bin2c.exe *.png" /> | ||
21 | <Add after="upx --best --compress-icons=0 rbutil.exe" /> | 22 | <Add after="upx --best --compress-icons=0 rbutil.exe" /> |
22 | </ExtraCommands> | 23 | </ExtraCommands> |
23 | <MakeCommands> | 24 | <MakeCommands> |
@@ -91,9 +92,6 @@ | |||
91 | <Add directory="$(#WX.lib)" /> | 92 | <Add directory="$(#WX.lib)" /> |
92 | <Add directory=".\" /> | 93 | <Add directory=".\" /> |
93 | </Linker> | 94 | </Linker> |
94 | <ExtraCommands> | ||
95 | <Add before="cmd /c cd icons && bin2c.exe *.png" /> | ||
96 | </ExtraCommands> | ||
97 | <Unit filename="Makefile" /> | 95 | <Unit filename="Makefile" /> |
98 | <Unit filename="archos.ico" /> | 96 | <Unit filename="archos.ico" /> |
99 | <Unit filename="autodetection.cpp" /> | 97 | <Unit filename="autodetection.cpp" /> |
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 | ||
434 | void DeviceSelectorCtrl::OnAutoDetect(wxCommandEvent& event) | 434 | void 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 | ||
440 | void DeviceSelectorCtrl::AutoDetect() | 444 | bool 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 | } |
diff --git a/rbutil/rbutilCtrls.h b/rbutil/rbutilCtrls.h index f31429fa16..7998dc69a4 100644 --- a/rbutil/rbutilCtrls.h +++ b/rbutil/rbutilCtrls.h | |||
@@ -177,7 +177,7 @@ public: | |||
177 | wxString getDevice(); | 177 | wxString getDevice(); |
178 | void setDefault(); | 178 | void setDefault(); |
179 | 179 | ||
180 | void AutoDetect(); | 180 | bool AutoDetect(); |
181 | 181 | ||
182 | protected: | 182 | protected: |
183 | wxString m_currentDevice; | 183 | wxString m_currentDevice; |