-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 52 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 3 |
2 files changed, 12 insertions, 43 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 02898de..fec320d 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -46,14 +46,5 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) initConnections(); - - whichTab = 1; populateView(); -// rePopulate(); -// currentPathCombo->setFocus(); channel = new QCopChannel( "QPE/Application/advancedfm", this ); connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); - -// if( CurrentView() == Local_View) -// qDebug("LOCAL VIEW"); -// else -// qDebug("REMOTE VIEW"); switchToLocalTab(); @@ -292,3 +283,2 @@ void AdvancedFm::refreshCurrentTab() { void AdvancedFm::switchToLocalTab() { - qDebug("switchToLocal "); TabWidget->setCurrentWidget(0); @@ -296,3 +286,2 @@ void AdvancedFm::switchToLocalTab() { whichTab = 1; - } @@ -300,3 +289,2 @@ void AdvancedFm::switchToLocalTab() { void AdvancedFm::switchToRemoteTab() { - qDebug("switchToRemoteTab() "); TabWidget->setCurrentWidget(1); @@ -306,10 +294,2 @@ void AdvancedFm::switchToRemoteTab() { -void AdvancedFm::readConfig() { - Config cfg("AdvancedFm"); -} - -void AdvancedFm::writeConfig() { - Config cfg("AdvancedFm"); -} - void AdvancedFm::currentPathComboChanged() { @@ -364,6 +344,5 @@ QStringList AdvancedFm::getPath() { -void AdvancedFm::homeButtonPushed() { - QString current = QDir::homeDirPath(); - chdir( current.latin1() ); - CurrentDir()->cd( current, TRUE); +void AdvancedFm::changeTo(QString dir) { + chdir( dir.latin1()); + CurrentDir()->cd(dir, TRUE); populateView(); @@ -372,8 +351,8 @@ void AdvancedFm::homeButtonPushed() { +void AdvancedFm::homeButtonPushed() { + changeTo(QDir::homeDirPath()); +} + void AdvancedFm::docButtonPushed() { - QString current = QPEApplication::documentDir(); - chdir( current.latin1() ); - CurrentDir()->cd( current, TRUE); - populateView(); - update(); + changeTo(QPEApplication::documentDir()); } @@ -381,7 +360,3 @@ void AdvancedFm::docButtonPushed() { void AdvancedFm::SDButtonPushed() { - QString current = "/mnt/card";// this can change so fix - chdir( current.latin1() ); - CurrentDir()->cd( current, TRUE); - populateView(); - update(); + changeTo("/mnt/card");// this can change so fix } @@ -389,11 +364,6 @@ void AdvancedFm::SDButtonPushed() { void AdvancedFm::CFButtonPushed() { - QString current; if(zaurusDevice) - current= "/mnt/cf"; //zaurus + changeTo("/mnt/cf"); //zaurus else - current = "/mnt/hda"; //ipaq - chdir( current.latin1() ); - CurrentDir()->cd( current, TRUE); - populateView(); - update(); + changeTo("/mnt/hda"); //ipaq } diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 2234b3c..c52b853 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h @@ -99,2 +99,3 @@ protected: void setOtherTabCurrent(); + void changeTo(QString & dir); @@ -115,4 +116,2 @@ protected slots: void showMenuHidden(); - void writeConfig(); - void readConfig(); void ListClicked(QListViewItem *); |