summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp39
-rw-r--r--noncore/apps/advancedfm/advancedfm.h1
2 files changed, 29 insertions, 11 deletions
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
@@ -71,8 +71,9 @@
#include <string.h>
#include <errno.h>
#include <sys/vfs.h>
#include <mntent.h>
+#include <sys/utsname.h>
AdvancedFm::AdvancedFm( )
: QMainWindow( )
{
@@ -246,9 +247,20 @@ AdvancedFm::AdvancedFm( )
TabWidget->insertTab( tab_3, tr( "Remote" ) );
*/
///////////////
-
+
+ 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());
currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
@@ -1061,18 +1073,23 @@ 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();
}
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 78f0bad..5b714ae 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -104,8 +104,9 @@ protected slots:
void switchToLocalTab();
void switchToRemoteTab();
protected:
+ bool zaurusDevice;
QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3;
QStringList remoteDirPathStringList, localDirPathStringList;
void keyReleaseEvent( QKeyEvent *);