author | llornkcor <llornkcor> | 2002-08-06 14:42:54 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-08-06 14:42:54 (UTC) |
commit | e6a512dc2e0602298f8a745036d25eb171ced977 (patch) (unidiff) | |
tree | 38a1df282028ac69fba494dba2ca41d04e565a54 | |
parent | 64888e9cd2f4c8f40f08a6712e2fd27220ff14ad (diff) | |
download | opie-e6a512dc2e0602298f8a745036d25eb171ced977.zip opie-e6a512dc2e0602298f8a745036d25eb171ced977.tar.gz opie-e6a512dc2e0602298f8a745036d25eb171ced977.tar.bz2 |
fixed proper path for familiar cf, and hide sd for non zaurus
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 39 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 1 |
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 | |||
@@ -74,2 +74,3 @@ | |||
74 | #include <mntent.h> | 74 | #include <mntent.h> |
75 | #include <sys/utsname.h> | ||
75 | 76 | ||
@@ -249,3 +250,14 @@ AdvancedFm::AdvancedFm( ) | |||
249 | /////////////// | 250 | /////////////// |
250 | 251 | ||
252 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | ||
253 | if (uname(&name) != -1) { | ||
254 | QString release=name.release; | ||
255 | if(release.find("embedix",0,TRUE) !=-1) { | ||
256 | zaurusDevice=TRUE; | ||
257 | } else { | ||
258 | zaurusDevice=FALSE; | ||
259 | sdButton->hide(); | ||
260 | } | ||
261 | } | ||
262 | |||
251 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 263 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
@@ -1064,12 +1076,17 @@ void AdvancedFm::SDButtonPushed() { | |||
1064 | void AdvancedFm::CFButtonPushed() { | 1076 | void AdvancedFm::CFButtonPushed() { |
1065 | QString current = "/mnt/cf"; | 1077 | QString current; |
1066 | chdir( current.latin1() ); | 1078 | if(zaurusDevice) |
1067 | if (TabWidget->currentPageIndex() == 0) { | 1079 | current= "/mnt/cf"; |
1068 | currentDir.cd( current, TRUE); | 1080 | else |
1069 | populateLocalView(); | 1081 | current = "/mnt/hda"; |
1070 | } else { | 1082 | |
1071 | currentRemoteDir.cd( current, TRUE); | 1083 | chdir( current.latin1() ); |
1072 | populateRemoteView(); | 1084 | if (TabWidget->currentPageIndex() == 0) { |
1073 | } | 1085 | currentDir.cd( current, TRUE); |
1074 | update(); | 1086 | populateLocalView(); |
1087 | } else { | ||
1088 | currentRemoteDir.cd( current, TRUE); | ||
1089 | populateRemoteView(); | ||
1090 | } | ||
1091 | update(); | ||
1075 | 1092 | ||
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 | |||
@@ -107,2 +107,3 @@ protected slots: | |||
107 | protected: | 107 | protected: |
108 | bool zaurusDevice; | ||
108 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; | 109 | QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; |