author | llornkcor <llornkcor> | 2004-09-25 08:22:22 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-09-25 08:22:22 (UTC) |
commit | ff6c55833c0cba33469f668ca158e96b409b4967 (patch) (side-by-side diff) | |
tree | 63299a67e6f9bf1a06c8668775f95f96366efce0 | |
parent | 946445e87ce74b8b28817ea63854054dbf165003 (diff) | |
download | opie-ff6c55833c0cba33469f668ca158e96b409b4967.zip opie-ff6c55833c0cba33469f668ca158e96b409b4967.tar.gz opie-ff6c55833c0cba33469f668ca158e96b409b4967.tar.bz2 |
fix
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 20 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.pro | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 5 |
4 files changed, 13 insertions, 16 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index f1be471..0dc822d 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -38,17 +38,17 @@ #include <mntent.h> using namespace Opie::Ui; AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) : QMainWindow( ) { init(); renameBox = 0; - + whichTab = 1; unknownXpm = Resource::loadImage("UnknownDocument").smoothScale(AppLnk::smallIconSize(),AppLnk::smallIconSize() ); initConnections(); rePopulate(); channel = new QCopChannel( "QPE/Application/advancedfm", this ); connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); switchToLocalTab(); } @@ -84,20 +84,16 @@ void AdvancedFm::tabChanged(QWidget *wd) { if ( TabWidget->currentWidget() == tab) { viewMenu->setItemChecked(viewMenu->idAt(0), true); viewMenu->setItemChecked(viewMenu->idAt(1), false); } else { viewMenu->setItemChecked(viewMenu->idAt(0), false); viewMenu->setItemChecked(viewMenu->idAt(1), true); } - QString fs= getFileSystemType( (const QString &) path); - - setCaption(tr("AdvancedFm :: ")+fs+" :: " - +checkDiskSpace( (const QString &) path )+ tr(" kB free") ); chdir( path.latin1()); currentPathCombo->lineEdit()->setText(path); } void AdvancedFm::populateView() { QPixmap pm; @@ -105,26 +101,28 @@ void AdvancedFm::populateView() { QDir *thisDir = CurrentDir(); QString path = thisDir->canonicalPath(); thisView->clear(); thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); thisDir->setMatchAllDirs(TRUE); thisDir->setNameFilter(filterStr); QString fileL, fileS, fileDate; - QString fs= getFileSystemType((const QString &) path); + + QString fs = getFileSystemType((const QString &) path); setCaption(tr("AdvancedFm :: ")+fs+" :: " +checkDiskSpace((const QString &) path)+ tr(" kB free") ); - bool isDir=FALSE; + bool isDir = FALSE; + const QFileInfoList *list = thisDir->entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); QFileInfoListIterator it(*list); QFileInfo *fi; while ( (fi=it.current()) ) { if (fi->isSymLink() ) { - QString symLink=fi->readLink(); + QString symLink = fi->readLink(); QFileInfo sym( symLink); fileS.sprintf( "%10i", sym.size() ); fileL = fi->fileName() +" -> " + sym.filePath().data(); fileDate = sym.lastModified().toString(); } else { fileS.sprintf( "%10i", fi->size() ); fileL = fi->fileName(); fileDate= fi->lastModified().toString(); @@ -318,39 +316,39 @@ QStringList AdvancedFm::getPath() { if ( it.current()->isSelected() ) { strList << it.current()->text(0); // odebug << it.current()->text(0) << oendl; } } return strList; } -void AdvancedFm::changeTo(const QString dir) { +void AdvancedFm::changeTo(const QString &dir) { chdir( dir.latin1()); CurrentDir()->cd(dir, TRUE); populateView(); update(); } void AdvancedFm::homeButtonPushed() { changeTo(QDir::homeDirPath()); } void AdvancedFm::docButtonPushed() { changeTo(QPEApplication::documentDir()); } void AdvancedFm::SDButtonPushed() { Opie::Core::OStorageInfo info; - changeTo(info.sdPath()); + changeTo(info.sdPath()); } void AdvancedFm::CFButtonPushed() { Opie::Core::OStorageInfo info; - changeTo(info.cfPath()); + changeTo(info.cfPath()); } void AdvancedFm::QPEButtonPushed() { changeTo(QPEApplication::qpeDir()); } void AdvancedFm::doAbout() { 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>")); diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index c25bce2..a4f2510 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h @@ -91,22 +91,22 @@ protected: void parsetab(const QString &fileName); QString checkDiskSpace(const QString &); QString dealWithSymName(const QString &); QDir *CurrentDir(); QDir *OtherDir(); QListView *CurrentView(); QListView *OtherView(); void setOtherTabCurrent(); - void changeTo(const QString dir); //protected signals: // void newPath(QString); protected slots: + void changeTo(const QString &); void slotSwitchMenu(int); void selectAll(); void addToDocs(); void doDirChange(); void mkDir(); void del(); void rn(); void populateView(); diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro index 713f61c..01ea8f4 100644 --- a/noncore/apps/advancedfm/advancedfm.pro +++ b/noncore/apps/advancedfm/advancedfm.pro @@ -1,10 +1,10 @@ TEMPLATE = app -CONFIG += qte warn_on quick-app +CONFIG += qte warn_on quick-app debug HEADERS = advancedfm.h filePermissions.h output.h SOURCES = advancedfm.cpp advancedfmData.cpp advancedfmMenu.cpp filePermissions.cpp output.cpp main.cpp TARGET = advancedfm INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lqte -lopiecore2 -lopieui2 !contains(CONFIG,quick-app) { diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 7b3dcf6..171e7c4 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -711,19 +711,18 @@ void AdvancedFm::selectAll() { thisView->selectAll(true); thisView->setSelected( thisView->firstChild(),false); } void AdvancedFm::startProcess(const QString & cmd) { QStringList command; OProcess *process; process = new OProcess(); - connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(Opie::Core::OProcess*))); - - connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); + connect(process,SIGNAL(processExited(Opie::Core::OProcess*)),this,SLOT(processEnded(Opie::Core::OProcess*))); + connect(process,SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),this,SLOT(oprocessStderr(Opie::Core::OProcess*,char*,int))); command << "/bin/sh"; command << "-c"; command << cmd.latin1(); *process << command; if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) odebug << "could not start process" << oendl; } |