-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 | |||
@@ -312,50 +312,55 @@ QStringList AdvancedFm::getPath() { | |||
312 | if ( it.current()->isSelected() ) { | 312 | if ( it.current()->isSelected() ) { |
313 | strList << it.current()->text(0); | 313 | strList << it.current()->text(0); |
314 | // odebug << it.current()->text(0) << oendl; | 314 | // odebug << it.current()->text(0) << oendl; |
315 | } | 315 | } |
316 | } | 316 | } |
317 | return strList; | 317 | return strList; |
318 | } | 318 | } |
319 | 319 | ||
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) { |
354 | Q_UNUSED(e); | 359 | Q_UNUSED(e); |
355 | } | 360 | } |
356 | 361 | ||
357 | void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { | 362 | void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { |
358 | // if( CurrentView()->hasFocus() ) | 363 | // if( CurrentView()->hasFocus() ) |
359 | // e->ignore(); | 364 | // e->ignore(); |
360 | 365 | ||
361 | if( currentPathCombo->lineEdit()->hasFocus()) { | 366 | if( currentPathCombo->lineEdit()->hasFocus()) { |