Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index f23fd86..08dc24e 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -13,4 +13,5 @@ #include "advancedfm.h" + #include <opie/otabwidget.h> // #include <opie/ofileselector.h> // #include <opie/ofiledialog.h> @@ -88,5 +89,6 @@ void AdvancedFm::cleanUp() { void AdvancedFm::tabChanged(QWidget *) { - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); @@ -97,5 +99,7 @@ void AdvancedFm::tabChanged(QWidget *) { } - if (TabWidget->currentPageIndex() == 1) { + if (TabWidget->getCurrentTab() == 1) { + +// if (TabWidget->currentPageIndex() == 1) { currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); viewMenu->setItemChecked(viewMenu->idAt(1),TRUE); @@ -415,10 +419,10 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, in void AdvancedFm::switchToLocalTab() { - TabWidget->setCurrentPage(0); + TabWidget->setCurrentTab(0); Local_View->setFocus(); } void AdvancedFm::switchToRemoteTab() { - TabWidget->setCurrentPage(1); + TabWidget->setCurrentTab(1); Remote_View->setFocus(); } @@ -433,5 +437,6 @@ void AdvancedFm::writeConfig() { void AdvancedFm::currentPathComboChanged() { - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { if(QDir( currentPathCombo->lineEdit()->text()).exists()) { currentDir.setPath( currentPathCombo->lineEdit()->text() ); @@ -441,5 +446,6 @@ void AdvancedFm::currentPathComboChanged() { } } - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { if(QDir( currentPathCombo->lineEdit()->text()).exists()) { currentRemoteDir.setPath( currentPathCombo->lineEdit()->text() ); @@ -453,5 +459,6 @@ void AdvancedFm::currentPathComboChanged() { void AdvancedFm::fillCombo(const QString ¤tPath) { - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { currentPathCombo->lineEdit()->setText( currentPath); if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { @@ -471,5 +478,6 @@ void AdvancedFm::fillCombo(const QString ¤tPath) { void AdvancedFm::currentPathComboActivated(const QString & currentPath) { - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { chdir( currentPath.latin1() ); currentDir.cd( currentPath, TRUE); @@ -486,5 +494,6 @@ void AdvancedFm::currentPathComboActivated(const QString & currentPath) { QStringList AdvancedFm::getPath() { QStringList strList; - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { QList<QListViewItem> * getSelectedItems( QListView * Local_View ); QListViewItemIterator it( Local_View ); @@ -513,5 +522,6 @@ void AdvancedFm::homeButtonPushed() { QString current = QDir::homeDirPath(); chdir( current.latin1() ); - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { currentDir.cd( current, TRUE); populateLocalView(); @@ -526,5 +536,7 @@ void AdvancedFm::docButtonPushed() { QString current = QPEApplication::documentDir(); chdir( current.latin1() ); - if (TabWidget->currentPageIndex() == 0) { + + if (TabWidget->getCurrentTab() == 0) { +//if (TabWidget->currentPageIndex() == 0) { currentDir.cd( current, TRUE); populateLocalView(); @@ -539,5 +551,6 @@ void AdvancedFm::SDButtonPushed() { QString current = "/mnt/card";// this can change so fix chdir( current.latin1() ); - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { currentDir.cd( current, TRUE); populateLocalView(); @@ -558,5 +571,6 @@ void AdvancedFm::CFButtonPushed() { chdir( current.latin1() ); - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { currentDir.cd( current, TRUE); populateLocalView(); @@ -646,5 +660,6 @@ void AdvancedFm::QPEButtonPushed() { QString current = QPEApplication::qpeDir(); chdir( current.latin1() ); - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { currentDir.cd( current, TRUE); populateLocalView(); @@ -718,5 +733,6 @@ void AdvancedFm::showFileMenu() { QString curApp; bool isLocalView = false; - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { isLocalView = TRUE; curApp = Local_View->currentItem()->text(0); @@ -731,6 +747,9 @@ void AdvancedFm::showFileMenu() { QPopupMenu *n = new QPopupMenu(0); // QPopupMenu *o = new QPopupMenu(0); - m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); - + if (TabWidget->getCurrentTab() == 0) + m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); + else + m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showRemoteHidden() )); + if ( QFileInfo(fi).isDir() ) { m->insertSeparator(); @@ -830,5 +849,6 @@ void AdvancedFm::addToDocs() { if( strListPaths.count() > 0) { QString curFile; - if (TabWidget->currentPageIndex() == 0) { + if (TabWidget->getCurrentTab() == 0) { +// if (TabWidget->currentPageIndex() == 0) { for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { curFile = currentDir.canonicalPath()+"/"+(*it); |