summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2002-10-20 15:51:08 (UTC)
committer llornkcor <llornkcor>2002-10-20 15:51:08 (UTC)
commit0535df00106c4e4c78e6ae8dde8f4f41f8487dae (patch) (side-by-side diff)
treea00836456d62b54a2959c76276879d12efc5501e /noncore
parent1a583682e8a49e65d5c478ab72dffb78d120c850 (diff)
downloadopie-0535df00106c4e4c78e6ae8dde8f4f41f8487dae.zip
opie-0535df00106c4e4c78e6ae8dde8f4f41f8487dae.tar.gz
opie-0535df00106c4e4c78e6ae8dde8f4f41f8487dae.tar.bz2
converted to otab, and updated show hidden dir functions
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp56
-rw-r--r--noncore/apps/advancedfm/advancedfm.h5
-rw-r--r--noncore/apps/advancedfm/advancedfm.pro2
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp14
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp80
5 files changed, 99 insertions, 58 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
@@ -11,8 +11,9 @@
***************************************************************************/
#define DEVELOPERS_VERSION
#include "advancedfm.h"
+ #include <opie/otabwidget.h>
// #include <opie/ofileselector.h>
// #include <opie/ofiledialog.h>
#include <qpe/filemanager.h>
@@ -86,18 +87,21 @@ void AdvancedFm::cleanUp() {
file.remove();
}
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);
viewMenu->setItemChecked(viewMenu->idAt(1),FALSE);
QString fs= getFileSystemType((const QString &) currentDir.canonicalPath());
setCaption("AdvancedFm :: "+fs+" :: "
+checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" );
}
- if (TabWidget->currentPageIndex() == 1) {
+ if (TabWidget->getCurrentTab() == 1) {
+
+// if (TabWidget->currentPageIndex() == 1) {
currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath());
viewMenu->setItemChecked(viewMenu->idAt(1),TRUE);
viewMenu->setItemChecked(viewMenu->idAt(0),FALSE);
QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath());
@@ -413,14 +417,14 @@ 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();
}
void AdvancedFm::readConfig() {
@@ -431,17 +435,19 @@ void AdvancedFm::writeConfig() {
Config cfg("AdvancedFm");
}
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() );
populateLocalView();
} else {
QMessageBox::message(tr("Note"),tr("That directory does not exist"));
}
}
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
currentRemoteDir.setPath( currentPathCombo->lineEdit()->text() );
populateRemoteView();
} else {
@@ -451,9 +457,10 @@ void AdvancedFm::currentPathComboChanged() {
}
void AdvancedFm::fillCombo(const QString &currentPath) {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentPathCombo->lineEdit()->setText( currentPath);
if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) {
currentPathCombo->clear();
localDirPathStringList.prepend( currentPath );
@@ -469,9 +476,10 @@ void AdvancedFm::fillCombo(const QString &currentPath) {
}
}
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);
populateLocalView();
update();
@@ -484,9 +492,10 @@ 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 );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
@@ -511,9 +520,10 @@ QStringList AdvancedFm::getPath() {
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();
} else {
currentRemoteDir.cd( current, TRUE);
@@ -524,9 +534,11 @@ void AdvancedFm::homeButtonPushed() {
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();
} else {
currentRemoteDir.cd( current, TRUE);
@@ -537,9 +549,10 @@ void AdvancedFm::docButtonPushed() {
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();
} else {
currentRemoteDir.cd( current, TRUE);
@@ -556,9 +569,10 @@ void AdvancedFm::CFButtonPushed() {
else
current = "/mnt/hda"; //ipaq
chdir( current.latin1() );
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentDir.cd( current, TRUE);
populateLocalView();
} else {
currentRemoteDir.cd( current, TRUE);
@@ -644,9 +658,10 @@ void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
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();
} else {
currentRemoteDir.cd( current, TRUE);
@@ -716,9 +731,10 @@ QString AdvancedFm::getDiskSpace( const QString &path) {
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);
} else {
curApp = Remote_View->currentItem()->text(0);
@@ -729,10 +745,13 @@ void AdvancedFm::showFileMenu() {
QFile fi(curApp);
QPopupMenu *m = new QPopupMenu(0);
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();
m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
} else {
@@ -828,9 +847,10 @@ QString AdvancedFm::checkDiskSpace(const QString &path) {
void AdvancedFm::addToDocs() {
QStringList strListPaths = getPath();
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);
qDebug(curFile);
DocLnk f;
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index f846c66..12ebbf2 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -13,8 +13,9 @@
#define ADVANCEDFM_H
#define QTOPIA_INTERNAL_FSLP // to get access to fileproperties
#define QT_QWS_OPIE
+//#include <opie/otabwidget.h>
#include <qpe/ir.h>
#include <qvariant.h>
#include <qdialog.h>
@@ -24,8 +25,9 @@
#include <qstring.h>
#include <qpoint.h>
#include <qtimer.h>
+class OTabWidget;
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QComboBox;
@@ -52,9 +54,10 @@ class AdvancedFm : public QMainWindow
public:
AdvancedFm();
~AdvancedFm();
- QTabWidget *TabWidget;
+ OTabWidget *TabWidget;
+// QTabWidget *TabWidget;
QWidget *tab, *tab_2, *tab_3;
QListView *Local_View, *Remote_View;
QLineEdit *currentPathEdit;
diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro
index eb4f122..3896f50 100644
--- a/noncore/apps/advancedfm/advancedfm.pro
+++ b/noncore/apps/advancedfm/advancedfm.pro
@@ -6,9 +6,9 @@ TARGET = advancedfm
REQUIRES=medium-config
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
DESTDIR = $(OPIEDIR)/bin
-LIBS += -lqpe
+LIBS += -lqpe -lopie
TRANSLATIONS = ../../../i18n/de/advancedfm.ts \
../../../i18n/en/advancedfm.ts \
../../../i18n/es/advancedfm.ts \
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index 619a7a9..7188640 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -10,8 +10,9 @@
* (at your option) any later version. *
***************************************************************************/
#include "advancedfm.h"
+#include <opie/otabwidget.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
@@ -21,9 +22,8 @@
#include <qcombobox.h>
#include <qpopupmenu.h>
#include <qtabwidget.h>
#include <qtoolbutton.h>
-#include <qtabwidget.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <sys/utsname.h>
@@ -107,9 +107,10 @@ void AdvancedFm::init() {
layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7);
- TabWidget = new QTabWidget( this, "TabWidget" );
+ TabWidget = new OTabWidget( this, "TabWidget",/* OTabWidget::Global | */OTabWidget::IconTab);
+// TabWidget = new QTabWidget( this, "TabWidget" );
layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7);
tab = new QWidget( TabWidget, "tab" );
tabLayout = new QGridLayout( tab );
@@ -129,9 +130,10 @@ void AdvancedFm::init() {
QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
tabLayout->addWidget( Local_View, 0, 0 );
- TabWidget->insertTab( tab, tr("1"));
+ TabWidget->addTab( tab,"advancedfm/smFileBrowser.png", tr("1"));
+// TabWidget->insertTab( tab, tr("1"));
tab_2 = new QWidget( TabWidget, "tab_2" );
tabLayout_2 = new QGridLayout( tab_2 );
tabLayout_2->setSpacing( 2);
@@ -151,10 +153,10 @@ void AdvancedFm::init() {
QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
tabLayout_2->addWidget( Remote_View, 0, 0 );
-
- TabWidget->insertTab( tab_2, tr( "2"));
+ TabWidget->addTab( tab_2, "advancedfm/smFileBrowser.png",tr( "2"));
+// TabWidget->insertTab( tab_2, tr( "2"));
/* tab_3 = new QWidget( TabWidget, "tab_3" );
tabLayout_3 = new QGridLayout( tab_3 );
tabLayout_3->setSpacing( 2);
@@ -198,9 +200,9 @@ void AdvancedFm::init() {
b = TRUE;
filterStr="*";
b=FALSE;
-
+ TabWidget->setCurrentTab(0);
}
void AdvancedFm::initConnections() {
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 5fa8d0c..27a119f 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -13,8 +13,10 @@
#include "inputDialog.h"
#include "output.h"
#include "filePermissions.h"
+#include <opie/otabwidget.h>
+
#include <qpe/lnkproperties.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
@@ -52,25 +54,39 @@ void AdvancedFm::doRemoteCd() {
localListClicked( Remote_View->currentItem());
}
void AdvancedFm::showMenuHidden() {
- if(TabWidget->currentPageIndex() == 0)
- showHidden();
- else
- showRemoteHidden();
+ if (b) {
+ currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
+ fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
+// b=FALSE;
+
+ } else {
+ currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
+// b=TRUE;
+ }
+ populateLocalView();
+ populateRemoteView();
+// if(TabWidget->getCurrentTab() == 0)
+// showHidden();
+// else
+// showRemoteHidden();
// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true");
if(b) b = false; else b = true;
}
void AdvancedFm::showHidden() {
if (b) {
currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
+// fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
// b=FALSE;
} else {
currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
+// fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
// b=TRUE;
}
populateLocalView();
}
@@ -88,9 +104,9 @@ void AdvancedFm::showRemoteHidden() {
}
void AdvancedFm::runThis() {
QString fs;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
QString curFile = Local_View->currentItem()->text(0);
if(curFile != "../") {
fs= getFileSystemType((const QString &) currentDir.canonicalPath());
@@ -140,9 +156,9 @@ void AdvancedFm::runThis() {
}
}
void AdvancedFm::runText() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
QString curFile = Local_View->currentItem()->text(0);
if(curFile != "../") {
curFile = currentDir.canonicalPath()+"/"+curFile;
QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" );
@@ -322,9 +338,9 @@ void AdvancedFm::filePerms() {
QStringList curFileList = getPath();
QString filePath;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
filePath = currentDir.canonicalPath()+"/";
} else {
filePath= currentRemoteDir.canonicalPath()+"/";
}
@@ -336,9 +352,9 @@ void AdvancedFm::filePerms() {
filePerm->exec();
if( filePerm)
delete filePerm;
}
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
populateLocalView();
} else {
populateRemoteView();
}
@@ -349,9 +365,9 @@ void AdvancedFm::doProperties() {
QStringList curFileList = getPath();
QString filePath;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
filePath = currentDir.canonicalPath()+"/";
} else {
filePath= currentRemoteDir.canonicalPath()+"/";
}
@@ -368,9 +384,9 @@ void AdvancedFm::doProperties() {
}
void AdvancedFm::upDir() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
QString current = currentDir.canonicalPath();
QDir dir(current);
dir.cdUp();
current = dir.canonicalPath();
@@ -394,9 +410,9 @@ void AdvancedFm::copy() {
qApp->processEvents();
QStringList curFileList = getPath();
if( curFileList.count() > 0) {
QString curFile, item, destFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
item=(*it);
if(item.find("->",0,TRUE)) //symlink
@@ -426,9 +442,9 @@ void AdvancedFm::copy() {
return;
}
}
populateRemoteView();
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
} else {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
item= (*it);
@@ -462,9 +478,9 @@ void AdvancedFm::copy() {
}
}
populateLocalView();
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
}
}
@@ -474,9 +490,9 @@ void AdvancedFm::copyAs() {
QStringList curFileList = getPath();
QString curFile;
InputDialog *fileDlg;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
qDebug("tab 1");
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
QString destFile;
curFile = currentDir.canonicalPath()+"/"+(*it);
@@ -511,9 +527,9 @@ void AdvancedFm::copyAs() {
delete fileDlg;
}
populateRemoteView();
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
} else {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
@@ -551,9 +567,9 @@ void AdvancedFm::copyAs() {
delete fileDlg;
}
populateLocalView();
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
}
void AdvancedFm::copySameDir() {
@@ -561,9 +577,9 @@ void AdvancedFm::copySameDir() {
QStringList curFileList = getPath();
QString curFile, item, destFile;
InputDialog *fileDlg;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
item=(*it);
curFile = currentDir.canonicalPath()+"/"+ item;
@@ -648,9 +664,9 @@ void AdvancedFm::move() {
QStringList curFileList = getPath();
if( curFileList.count() > 0) {
QString curFile, destFile, item;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
item=(*it);
QString destFile = currentRemoteDir.canonicalPath();
@@ -677,9 +693,9 @@ void AdvancedFm::move() {
QFile::remove(curFile);
}
}
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
} else { //view 2
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
@@ -707,9 +723,9 @@ void AdvancedFm::move() {
return;
} else
QFile::remove( curFile);
}
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
}
populateRemoteView();
populateLocalView();
@@ -748,9 +764,9 @@ bool AdvancedFm::copyFile( const QString & dest, const QString & src ) {
}
void AdvancedFm::runCommand() {
QString curFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
if( Local_View->currentItem())
curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0);
} else {
if(Remote_View->currentItem())
@@ -794,9 +810,9 @@ void AdvancedFm::runCommand() {
}
void AdvancedFm::runCommandStd() {
QString curFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
if( Local_View->currentItem())
curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0);
} else {
if(Remote_View->currentItem())
@@ -817,9 +833,9 @@ void AdvancedFm::runCommandStd() {
}
void AdvancedFm::fileStatus() {
QString curFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
curFile = Local_View->currentItem()->text(0);
} else {
curFile = Remote_View->currentItem()->text(0);
}
@@ -849,25 +865,25 @@ void AdvancedFm::fileStatus() {
pclose(fp);
}
void AdvancedFm::mkDir() {
- if (TabWidget->currentPageIndex() == 0)
+ if (TabWidget->getCurrentTab() == 0)
localMakDir();
else
remoteMakDir();
}
void AdvancedFm::rn() {
- if (TabWidget->currentPageIndex() == 0)
+ if (TabWidget->getCurrentTab() == 0)
localRename();
else
remoteRename();
}
void AdvancedFm::del() {
- if (TabWidget->currentPageIndex() == 0)
+ if (TabWidget->getCurrentTab() == 0)
localDelete();
else
remoteDelete();
}
@@ -876,9 +892,9 @@ void AdvancedFm::mkSym() {
QString cmd;
QStringList curFileList = getPath();
if( curFileList.count() > 0) {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
QString destName = currentRemoteDir.canonicalPath()+"/"+(*it);
if(destName.right(1) == "/") destName = destName.left( destName.length() -1);
@@ -888,9 +904,9 @@ void AdvancedFm::mkSym() {
qDebug(cmd);
system(cmd.latin1() );
}
populateRemoteView();
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
} else {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
QString destName = currentDir.canonicalPath()+"/"+(*it);
@@ -902,9 +918,9 @@ void AdvancedFm::mkSym() {
qDebug(cmd);
system(cmd.latin1() );
}
populateLocalView();
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
}
}
@@ -915,9 +931,9 @@ void AdvancedFm::doBeam() {
QStringList curFileList = getPath();
if( curFileList.count() > 0) {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
QString curFile = currentDir.canonicalPath()+"/"+(*it);
if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1);