summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2004-09-25 05:01:41 (UTC)
committer llornkcor <llornkcor>2004-09-25 05:01:41 (UTC)
commit45a59fcd4a35c9c0ce35162c0ac7a5c914e24a52 (patch) (unidiff)
tree99fd7480b1825b8eb956f40f163aa3fc20cfc6cf /noncore
parent06073d16f0dd3fb332af60467bb90480e21ebc28 (diff)
downloadopie-45a59fcd4a35c9c0ce35162c0ac7a5c914e24a52.zip
opie-45a59fcd4a35c9c0ce35162c0ac7a5c914e24a52.tar.gz
opie-45a59fcd4a35c9c0ce35162c0ac7a5c914e24a52.tar.bz2
redunancy
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp31
-rw-r--r--noncore/apps/advancedfm/advancedfm.h1
2 files changed, 4 insertions, 28 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 3bfec7d..3cd2067 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -342,7 +342,7 @@ QStringList AdvancedFm::getPath() {
342 return strList; 342 return strList;
343} 343}
344 344
345void AdvancedFm::changeTo(QString dir) { 345void AdvancedFm::changeTo(const QString dir) {
346 chdir( dir.latin1()); 346 chdir( dir.latin1());
347 CurrentDir()->cd(dir, TRUE); 347 CurrentDir()->cd(dir, TRUE);
348 populateView(); 348 populateView();
@@ -699,7 +699,7 @@ void AdvancedFm::gotoCustomDir(const QString &dir) {
699 if( dir == s_removeBookmark) { 699 if( dir == s_removeBookmark) {
700 removeCustomDir( ); 700 removeCustomDir( );
701 } else { 701 } else {
702 gotoDirectory( dir); 702 changeTo( dir);
703// if(QDir( curDir).exists() ) 703// if(QDir( curDir).exists() )
704// { 704// {
705// thisDir->setPath( curDir ); 705// thisDir->setPath( curDir );
@@ -766,38 +766,15 @@ void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) {
766// odebug << "received" << oendl; 766// odebug << "received" << oendl;
767 QString file; 767 QString file;
768 stream >> file; 768 stream >> file;
769 gotoDirectory( (const QString &) file); 769 changeTo( (const QString &) file);
770 } 770 }
771} 771}
772 772
773void AdvancedFm::setDocument(const QString &file) { 773void AdvancedFm::setDocument(const QString &file) {
774 gotoDirectory( file); 774 changeTo( file);
775 775
776} 776}
777 777
778void AdvancedFm::gotoDirectory(const QString &file) {
779// qDebug("goto dir "+file);
780 QString curDir = file;
781 QDir *thisDir = CurrentDir();
782 if(QDir( curDir).exists() ) {
783 thisDir->setPath( curDir );
784 chdir( curDir.latin1() );
785 thisDir->cd( curDir, TRUE);
786 populateView();
787 }
788 else if(QFileInfo(curDir).exists()) {
789 QFileInfo fileInfo(curDir);
790 curDir=fileInfo.dirPath();
791 if(QDir( curDir).exists() ) {
792 thisDir->setPath( curDir );
793 chdir( curDir.latin1() );
794 thisDir->cd( curDir, TRUE);
795 populateView();
796 }
797 findFile(file);
798 }
799
800}
801 778
802void AdvancedFm::findFile(const QString &fileName) { 779void AdvancedFm::findFile(const QString &fileName) {
803 QFileInfo fi(fileName); 780 QFileInfo fi(fileName);
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 9dbdc70..00ab909 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -177,7 +177,6 @@ private:
177 void customDirsToMenu(); 177 void customDirsToMenu();
178 void addCustomDir(); 178 void addCustomDir();
179 void removeCustomDir(); 179 void removeCustomDir();
180 void gotoDirectory(const QString &);
181 void navigateToSelected(); 180 void navigateToSelected();
182 void findFile(const QString &); 181 void findFile(const QString &);
183 182