summaryrefslogtreecommitdiff
path: root/noncore/apps
Side-by-side diff
Diffstat (limited to 'noncore/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp7
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp38
2 files changed, 32 insertions, 13 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index feda198..95e619b 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -19,12 +19,13 @@
#include <qpe/qpeapplication.h>
#include <qpe/menubutton.h>
using namespace Opie::Core;
using namespace Opie::Ui;
/* QT */
+#include <qframe.h>
#include <qlayout.h>
#include <qhbox.h>
#include <qmenubar.h>
#include <qcombobox.h>
#include <qtoolbutton.h>
#include <qlineedit.h>
@@ -34,13 +35,17 @@ using namespace Opie::Ui;
#include <sys/utsname.h>
void AdvancedFm::init() {
b = false;
setCaption( tr( "AdvancedFm" ) );
- QVBoxLayout *layout = new QVBoxLayout( this );
+// QFrame* frame = new QFrame(this);
+// setCentralWidget(frame);
+// QVBoxLayout *layout = new QVBoxLayout( frame );
+
+ QVBoxLayout *layout = new QVBoxLayout( this);
layout->setSpacing( 2);
layout->setMargin( 0); // squeeze
QMenuBar *menuBar = new QMenuBar(this);
menuBar->setMargin( 0 ); // squeeze
fileMenu = new QPopupMenu( this );
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 80324eb..ed280aa 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -650,25 +650,39 @@ void AdvancedFm::runCommandStd() {
qApp->processEvents();
startProcess( (const QString)fileDlg->LineEdit1->text().latin1());
}
}
void AdvancedFm::fileStatus() {
- if( !CurrentView()->currentItem()) return;
- QString curFile;
- curFile = CurrentView()->currentItem()->text(0);
-
- QStringList command;
- command << "/bin/sh";
- command << "-c";
- command << "stat -l "+ curFile;
+ if( !CurrentView()->currentItem()) return;
+ QString curFile;
+ curFile = CurrentView()->currentItem()->text(0);
+ if(QFileInfo("/usr/bin/stat").exists()) {
+ QStringList command;
+ command << "/bin/sh";
+ command << "-c";
+ command << "stat -l "+ curFile;
+ Output *outDlg;
+ outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
+ QPEApplication::execDialog( outDlg );
+ } else {
+/* struct stat buf;
+ stat( curFile.local8bit(), &buf);
+
+ st_dev dev;
+ st_uid uid;
+ st_gid gid;
+ st_size size;
+ st_atime atime;
+ st_mtime mtime;
+ st_ctime ctime;
+ st_mode mode;
+*/
+ }
- Output *outDlg;
- outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
- QPEApplication::execDialog( outDlg );
- qApp->processEvents();
+ qApp->processEvents();
}
void AdvancedFm::mkDir() {
makeDir();
}