author | llornkcor <llornkcor> | 2005-03-24 20:14:38 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-03-24 20:14:38 (UTC) |
commit | 1e6c3181dcc7ec4edbe99db0d886ce7a9c483056 (patch) (unidiff) | |
tree | 38e98006c0bb49bb6b1008dddb840e961bb2b775 | |
parent | 38ace7e9b3c9665336c0e6d2350895b147858f1f (diff) | |
download | opie-1e6c3181dcc7ec4edbe99db0d886ce7a9c483056.zip opie-1e6c3181dcc7ec4edbe99db0d886ce7a9c483056.tar.gz opie-1e6c3181dcc7ec4edbe99db0d886ce7a9c483056.tar.bz2 |
cd to sd or mmc
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index fd81313..979549d 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -320,34 +320,39 @@ QStringList AdvancedFm::getPath() { | |||
320 | void AdvancedFm::changeTo(const QString &dir) { | 320 | void AdvancedFm::changeTo(const QString &dir) { |
321 | chdir( dir.latin1()); | 321 | chdir( dir.latin1()); |
322 | CurrentDir()->cd(dir, TRUE); | 322 | CurrentDir()->cd(dir, TRUE); |
323 | populateView(); | 323 | populateView(); |
324 | update(); | 324 | update(); |
325 | } | 325 | } |
326 | 326 | ||
327 | void AdvancedFm::homeButtonPushed() { | 327 | void AdvancedFm::homeButtonPushed() { |
328 | changeTo(QDir::homeDirPath()); | 328 | changeTo(QDir::homeDirPath()); |
329 | } | 329 | } |
330 | 330 | ||
331 | void AdvancedFm::docButtonPushed() { | 331 | void AdvancedFm::docButtonPushed() { |
332 | changeTo(QPEApplication::documentDir()); | 332 | changeTo(QPEApplication::documentDir()); |
333 | } | 333 | } |
334 | 334 | ||
335 | void AdvancedFm::SDButtonPushed() { | 335 | void AdvancedFm::SDButtonPushed() { |
336 | Opie::Core::OStorageInfo info; | 336 | Opie::Core::OStorageInfo info; |
337 | changeTo(info.sdPath()); | 337 | if(StorageInfo::hasSd() ) { |
338 | changeTo(info.sdPath()); | ||
339 | } | ||
340 | else if(StorageInfo::hasMmc()) { | ||
341 | changeTo(info.mmcPath()); | ||
342 | } | ||
338 | } | 343 | } |
339 | 344 | ||
340 | void AdvancedFm::CFButtonPushed() { | 345 | void AdvancedFm::CFButtonPushed() { |
341 | Opie::Core::OStorageInfo info; | 346 | Opie::Core::OStorageInfo info; |
342 | changeTo(info.cfPath()); | 347 | changeTo(info.cfPath()); |
343 | } | 348 | } |
344 | 349 | ||
345 | void AdvancedFm::QPEButtonPushed() { | 350 | void AdvancedFm::QPEButtonPushed() { |
346 | changeTo(QPEApplication::qpeDir()); | 351 | changeTo(QPEApplication::qpeDir()); |
347 | } | 352 | } |
348 | 353 | ||
349 | void AdvancedFm::doAbout() { | 354 | void AdvancedFm::doAbout() { |
350 | QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>")); | 355 | QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>")); |
351 | } | 356 | } |
352 | 357 | ||
353 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { | 358 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { |