From e6a512dc2e0602298f8a745036d25eb171ced977 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Tue, 06 Aug 2002 14:42:54 +0000 Subject: fixed proper path for familiar cf, and hide sd for non zaurus --- (limited to 'noncore/apps/advancedfm/advancedfm.cpp') diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 7ee78c0..0f2555d 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -72,6 +72,7 @@ #include #include #include +#include AdvancedFm::AdvancedFm( ) : QMainWindow( ) @@ -247,7 +248,18 @@ AdvancedFm::AdvancedFm( ) */ /////////////// - + + struct utsname name; /* check for embedix kernel running on the zaurus*/ + if (uname(&name) != -1) { + QString release=name.release; + if(release.find("embedix",0,TRUE) !=-1) { + zaurusDevice=TRUE; + } else { + zaurusDevice=FALSE; + sdButton->hide(); + } + } + currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); currentDir.setPath( QDir::currentDirPath()); @@ -1062,16 +1074,21 @@ void AdvancedFm::SDButtonPushed() { } void AdvancedFm::CFButtonPushed() { - QString current = "/mnt/cf"; - chdir( current.latin1() ); - if (TabWidget->currentPageIndex() == 0) { - currentDir.cd( current, TRUE); - populateLocalView(); - } else { - currentRemoteDir.cd( current, TRUE); - populateRemoteView(); - } - update(); + QString current; + if(zaurusDevice) + current= "/mnt/cf"; + else + current = "/mnt/hda"; + + chdir( current.latin1() ); + if (TabWidget->currentPageIndex() == 0) { + currentDir.cd( current, TRUE); + populateLocalView(); + } else { + currentRemoteDir.cd( current, TRUE); + populateRemoteView(); + } + update(); } -- cgit v0.9.0.2