-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 31 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 1 |
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 | |||
@@ -344,3 +344,3 @@ QStringList AdvancedFm::getPath() { | |||
344 | 344 | ||
345 | void AdvancedFm::changeTo(QString dir) { | 345 | void AdvancedFm::changeTo(const QString dir) { |
346 | chdir( dir.latin1()); | 346 | chdir( dir.latin1()); |
@@ -701,3 +701,3 @@ void AdvancedFm::gotoCustomDir(const QString &dir) { | |||
701 | } else { | 701 | } else { |
702 | gotoDirectory( dir); | 702 | changeTo( dir); |
703 | // if(QDir( curDir).exists() ) | 703 | // if(QDir( curDir).exists() ) |
@@ -768,3 +768,3 @@ void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { | |||
768 | stream >> file; | 768 | stream >> file; |
769 | gotoDirectory( (const QString &) file); | 769 | changeTo( (const QString &) file); |
770 | } | 770 | } |
@@ -773,3 +773,3 @@ void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { | |||
773 | void AdvancedFm::setDocument(const QString &file) { | 773 | void AdvancedFm::setDocument(const QString &file) { |
774 | gotoDirectory( file); | 774 | changeTo( file); |
775 | 775 | ||
@@ -777,25 +777,2 @@ void AdvancedFm::setDocument(const QString &file) { | |||
777 | 777 | ||
778 | void 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 | ||
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 | |||
@@ -179,3 +179,2 @@ private: | |||
179 | void removeCustomDir(); | 179 | void removeCustomDir(); |
180 | void gotoDirectory(const QString &); | ||
181 | void navigateToSelected(); | 180 | void navigateToSelected(); |