summaryrefslogtreecommitdiff
Unidiff
Diffstat (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
@@ -12,6 +12,7 @@
12#define DEVELOPERS_VERSION 12#define DEVELOPERS_VERSION
13#include "advancedfm.h" 13#include "advancedfm.h"
14 14
15 #include <opie/otabwidget.h>
15// #include <opie/ofileselector.h> 16// #include <opie/ofileselector.h>
16// #include <opie/ofiledialog.h> 17// #include <opie/ofiledialog.h>
17 18
@@ -87,7 +88,8 @@ void AdvancedFm::cleanUp() {
87} 88}
88 89
89void AdvancedFm::tabChanged(QWidget *) { 90void AdvancedFm::tabChanged(QWidget *) {
90 if (TabWidget->currentPageIndex() == 0) { 91 if (TabWidget->getCurrentTab() == 0) {
92// if (TabWidget->currentPageIndex() == 0) {
91 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 93 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
92 viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); 94 viewMenu->setItemChecked(viewMenu->idAt(0),TRUE);
93 viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); 95 viewMenu->setItemChecked(viewMenu->idAt(1),FALSE);
@@ -96,7 +98,9 @@ void AdvancedFm::tabChanged(QWidget *) {
96 +checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); 98 +checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" );
97 99
98 } 100 }
99 if (TabWidget->currentPageIndex() == 1) { 101 if (TabWidget->getCurrentTab() == 1) {
102
103// if (TabWidget->currentPageIndex() == 1) {
100 currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); 104 currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath());
101 viewMenu->setItemChecked(viewMenu->idAt(1),TRUE); 105 viewMenu->setItemChecked(viewMenu->idAt(1),TRUE);
102 viewMenu->setItemChecked(viewMenu->idAt(0),FALSE); 106 viewMenu->setItemChecked(viewMenu->idAt(0),FALSE);
@@ -414,12 +418,12 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, in
414 418
415 419
416void AdvancedFm::switchToLocalTab() { 420void AdvancedFm::switchToLocalTab() {
417 TabWidget->setCurrentPage(0); 421 TabWidget->setCurrentTab(0);
418 Local_View->setFocus(); 422 Local_View->setFocus();
419} 423}
420 424
421void AdvancedFm::switchToRemoteTab() { 425void AdvancedFm::switchToRemoteTab() {
422 TabWidget->setCurrentPage(1); 426 TabWidget->setCurrentTab(1);
423 Remote_View->setFocus(); 427 Remote_View->setFocus();
424} 428}
425 429
@@ -432,7 +436,8 @@ void AdvancedFm::writeConfig() {
432} 436}
433 437
434void AdvancedFm::currentPathComboChanged() { 438void AdvancedFm::currentPathComboChanged() {
435 if (TabWidget->currentPageIndex() == 0) { 439 if (TabWidget->getCurrentTab() == 0) {
440// if (TabWidget->currentPageIndex() == 0) {
436 if(QDir( currentPathCombo->lineEdit()->text()).exists()) { 441 if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
437 currentDir.setPath( currentPathCombo->lineEdit()->text() ); 442 currentDir.setPath( currentPathCombo->lineEdit()->text() );
438 populateLocalView(); 443 populateLocalView();
@@ -440,7 +445,8 @@ void AdvancedFm::currentPathComboChanged() {
440 QMessageBox::message(tr("Note"),tr("That directory does not exist")); 445 QMessageBox::message(tr("Note"),tr("That directory does not exist"));
441 } 446 }
442 } 447 }
443 if (TabWidget->currentPageIndex() == 0) { 448 if (TabWidget->getCurrentTab() == 0) {
449// if (TabWidget->currentPageIndex() == 0) {
444 if(QDir( currentPathCombo->lineEdit()->text()).exists()) { 450 if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
445 currentRemoteDir.setPath( currentPathCombo->lineEdit()->text() ); 451 currentRemoteDir.setPath( currentPathCombo->lineEdit()->text() );
446 populateRemoteView(); 452 populateRemoteView();
@@ -452,7 +458,8 @@ void AdvancedFm::currentPathComboChanged() {
452 458
453void AdvancedFm::fillCombo(const QString &currentPath) { 459void AdvancedFm::fillCombo(const QString &currentPath) {
454 460
455 if (TabWidget->currentPageIndex() == 0) { 461 if (TabWidget->getCurrentTab() == 0) {
462// if (TabWidget->currentPageIndex() == 0) {
456 currentPathCombo->lineEdit()->setText( currentPath); 463 currentPathCombo->lineEdit()->setText( currentPath);
457 if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { 464 if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) {
458 currentPathCombo->clear(); 465 currentPathCombo->clear();
@@ -470,7 +477,8 @@ void AdvancedFm::fillCombo(const QString &currentPath) {
470} 477}
471 478
472void AdvancedFm::currentPathComboActivated(const QString & currentPath) { 479void AdvancedFm::currentPathComboActivated(const QString & currentPath) {
473 if (TabWidget->currentPageIndex() == 0) { 480 if (TabWidget->getCurrentTab() == 0) {
481// if (TabWidget->currentPageIndex() == 0) {
474 chdir( currentPath.latin1() ); 482 chdir( currentPath.latin1() );
475 currentDir.cd( currentPath, TRUE); 483 currentDir.cd( currentPath, TRUE);
476 populateLocalView(); 484 populateLocalView();
@@ -485,7 +493,8 @@ void AdvancedFm::currentPathComboActivated(const QString & currentPath) {
485 493
486QStringList AdvancedFm::getPath() { 494QStringList AdvancedFm::getPath() {
487 QStringList strList; 495 QStringList strList;
488 if (TabWidget->currentPageIndex() == 0) { 496 if (TabWidget->getCurrentTab() == 0) {
497// if (TabWidget->currentPageIndex() == 0) {
489 QList<QListViewItem> * getSelectedItems( QListView * Local_View ); 498 QList<QListViewItem> * getSelectedItems( QListView * Local_View );
490 QListViewItemIterator it( Local_View ); 499 QListViewItemIterator it( Local_View );
491 for ( ; it.current(); ++it ) { 500 for ( ; it.current(); ++it ) {
@@ -512,7 +521,8 @@ QStringList AdvancedFm::getPath() {
512void AdvancedFm::homeButtonPushed() { 521void AdvancedFm::homeButtonPushed() {
513 QString current = QDir::homeDirPath(); 522 QString current = QDir::homeDirPath();
514 chdir( current.latin1() ); 523 chdir( current.latin1() );
515 if (TabWidget->currentPageIndex() == 0) { 524 if (TabWidget->getCurrentTab() == 0) {
525// if (TabWidget->currentPageIndex() == 0) {
516 currentDir.cd( current, TRUE); 526 currentDir.cd( current, TRUE);
517 populateLocalView(); 527 populateLocalView();
518 } else { 528 } else {
@@ -525,7 +535,9 @@ void AdvancedFm::homeButtonPushed() {
525void AdvancedFm::docButtonPushed() { 535void AdvancedFm::docButtonPushed() {
526 QString current = QPEApplication::documentDir(); 536 QString current = QPEApplication::documentDir();
527 chdir( current.latin1() ); 537 chdir( current.latin1() );
528 if (TabWidget->currentPageIndex() == 0) { 538
539 if (TabWidget->getCurrentTab() == 0) {
540//if (TabWidget->currentPageIndex() == 0) {
529 currentDir.cd( current, TRUE); 541 currentDir.cd( current, TRUE);
530 populateLocalView(); 542 populateLocalView();
531 } else { 543 } else {
@@ -538,7 +550,8 @@ void AdvancedFm::docButtonPushed() {
538void AdvancedFm::SDButtonPushed() { 550void AdvancedFm::SDButtonPushed() {
539 QString current = "/mnt/card";// this can change so fix 551 QString current = "/mnt/card";// this can change so fix
540 chdir( current.latin1() ); 552 chdir( current.latin1() );
541 if (TabWidget->currentPageIndex() == 0) { 553 if (TabWidget->getCurrentTab() == 0) {
554// if (TabWidget->currentPageIndex() == 0) {
542 currentDir.cd( current, TRUE); 555 currentDir.cd( current, TRUE);
543 populateLocalView(); 556 populateLocalView();
544 } else { 557 } else {
@@ -557,7 +570,8 @@ void AdvancedFm::CFButtonPushed() {
557 current = "/mnt/hda"; //ipaq 570 current = "/mnt/hda"; //ipaq
558 571
559 chdir( current.latin1() ); 572 chdir( current.latin1() );
560 if (TabWidget->currentPageIndex() == 0) { 573 if (TabWidget->getCurrentTab() == 0) {
574// if (TabWidget->currentPageIndex() == 0) {
561 currentDir.cd( current, TRUE); 575 currentDir.cd( current, TRUE);
562 populateLocalView(); 576 populateLocalView();
563 } else { 577 } else {
@@ -645,7 +659,8 @@ void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
645void AdvancedFm::QPEButtonPushed() { 659void AdvancedFm::QPEButtonPushed() {
646 QString current = QPEApplication::qpeDir(); 660 QString current = QPEApplication::qpeDir();
647 chdir( current.latin1() ); 661 chdir( current.latin1() );
648 if (TabWidget->currentPageIndex() == 0) { 662 if (TabWidget->getCurrentTab() == 0) {
663// if (TabWidget->currentPageIndex() == 0) {
649 currentDir.cd( current, TRUE); 664 currentDir.cd( current, TRUE);
650 populateLocalView(); 665 populateLocalView();
651 } else { 666 } else {
@@ -717,7 +732,8 @@ void AdvancedFm::showFileMenu() {
717 732
718 QString curApp; 733 QString curApp;
719 bool isLocalView = false; 734 bool isLocalView = false;
720 if (TabWidget->currentPageIndex() == 0) { 735 if (TabWidget->getCurrentTab() == 0) {
736// if (TabWidget->currentPageIndex() == 0) {
721 isLocalView = TRUE; 737 isLocalView = TRUE;
722 curApp = Local_View->currentItem()->text(0); 738 curApp = Local_View->currentItem()->text(0);
723 } else { 739 } else {
@@ -730,8 +746,11 @@ void AdvancedFm::showFileMenu() {
730 QPopupMenu *m = new QPopupMenu(0); 746 QPopupMenu *m = new QPopupMenu(0);
731 QPopupMenu *n = new QPopupMenu(0); 747 QPopupMenu *n = new QPopupMenu(0);
732 // QPopupMenu *o = new QPopupMenu(0); 748 // QPopupMenu *o = new QPopupMenu(0);
733 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); 749 if (TabWidget->getCurrentTab() == 0)
734 750 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
751 else
752 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showRemoteHidden() ));
753
735 if ( QFileInfo(fi).isDir() ) { 754 if ( QFileInfo(fi).isDir() ) {
736 m->insertSeparator(); 755 m->insertSeparator();
737 m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); 756 m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
@@ -829,7 +848,8 @@ void AdvancedFm::addToDocs() {
829 QStringList strListPaths = getPath(); 848 QStringList strListPaths = getPath();
830 if( strListPaths.count() > 0) { 849 if( strListPaths.count() > 0) {
831 QString curFile; 850 QString curFile;
832 if (TabWidget->currentPageIndex() == 0) { 851 if (TabWidget->getCurrentTab() == 0) {
852// if (TabWidget->currentPageIndex() == 0) {
833 for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { 853 for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) {
834 curFile = currentDir.canonicalPath()+"/"+(*it); 854 curFile = currentDir.canonicalPath()+"/"+(*it);
835 qDebug(curFile); 855 qDebug(curFile);
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
@@ -14,6 +14,7 @@
14#define QTOPIA_INTERNAL_FSLP // to get access to fileproperties 14#define QTOPIA_INTERNAL_FSLP // to get access to fileproperties
15#define QT_QWS_OPIE 15#define QT_QWS_OPIE
16 16
17//#include <opie/otabwidget.h>
17#include <qpe/ir.h> 18#include <qpe/ir.h>
18 19
19#include <qvariant.h> 20#include <qvariant.h>
@@ -25,6 +26,7 @@
25#include <qpoint.h> 26#include <qpoint.h>
26#include <qtimer.h> 27#include <qtimer.h>
27 28
29class OTabWidget;
28class QVBoxLayout; 30class QVBoxLayout;
29class QHBoxLayout; 31class QHBoxLayout;
30class QGridLayout; 32class QGridLayout;
@@ -53,7 +55,8 @@ public:
53 AdvancedFm(); 55 AdvancedFm();
54 ~AdvancedFm(); 56 ~AdvancedFm();
55 57
56 QTabWidget *TabWidget; 58 OTabWidget *TabWidget;
59// QTabWidget *TabWidget;
57 QWidget *tab, *tab_2, *tab_3; 60 QWidget *tab, *tab_2, *tab_3;
58 QListView *Local_View, *Remote_View; 61 QListView *Local_View, *Remote_View;
59 62
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
@@ -7,7 +7,7 @@ REQUIRES=medium-config
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9DESTDIR = $(OPIEDIR)/bin 9DESTDIR = $(OPIEDIR)/bin
10LIBS += -lqpe 10LIBS += -lqpe -lopie
11 11
12TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ 12TRANSLATIONS = ../../../i18n/de/advancedfm.ts \
13 ../../../i18n/en/advancedfm.ts \ 13 ../../../i18n/en/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
@@ -11,6 +11,7 @@
11 ***************************************************************************/ 11 ***************************************************************************/
12#include "advancedfm.h" 12#include "advancedfm.h"
13 13
14#include <opie/otabwidget.h>
14#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
15#include <qpe/qpemenubar.h> 16#include <qpe/qpemenubar.h>
16#include <qpe/qpetoolbar.h> 17#include <qpe/qpetoolbar.h>
@@ -22,7 +23,6 @@
22#include <qpopupmenu.h> 23#include <qpopupmenu.h>
23#include <qtabwidget.h> 24#include <qtabwidget.h>
24#include <qtoolbutton.h> 25#include <qtoolbutton.h>
25#include <qtabwidget.h>
26#include <qlineedit.h> 26#include <qlineedit.h>
27#include <qlistview.h> 27#include <qlistview.h>
28 28
@@ -108,7 +108,8 @@ void AdvancedFm::init() {
108 layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); 108 layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7);
109 109
110 110
111 TabWidget = new QTabWidget( this, "TabWidget" ); 111 TabWidget = new OTabWidget( this, "TabWidget",/* OTabWidget::Global | */OTabWidget::IconTab);
112// TabWidget = new QTabWidget( this, "TabWidget" );
112 layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7); 113 layout->addMultiCellWidget( TabWidget, 2, 2, 0, 7);
113 114
114 tab = new QWidget( TabWidget, "tab" ); 115 tab = new QWidget( TabWidget, "tab" );
@@ -130,7 +131,8 @@ void AdvancedFm::init() {
130 131
131 tabLayout->addWidget( Local_View, 0, 0 ); 132 tabLayout->addWidget( Local_View, 0, 0 );
132 133
133 TabWidget->insertTab( tab, tr("1")); 134 TabWidget->addTab( tab,"advancedfm/smFileBrowser.png", tr("1"));
135// TabWidget->insertTab( tab, tr("1"));
134 136
135 tab_2 = new QWidget( TabWidget, "tab_2" ); 137 tab_2 = new QWidget( TabWidget, "tab_2" );
136 tabLayout_2 = new QGridLayout( tab_2 ); 138 tabLayout_2 = new QGridLayout( tab_2 );
@@ -152,8 +154,8 @@ void AdvancedFm::init() {
152 154
153 tabLayout_2->addWidget( Remote_View, 0, 0 ); 155 tabLayout_2->addWidget( Remote_View, 0, 0 );
154 156
155 157 TabWidget->addTab( tab_2, "advancedfm/smFileBrowser.png",tr( "2"));
156 TabWidget->insertTab( tab_2, tr( "2")); 158// TabWidget->insertTab( tab_2, tr( "2"));
157 159
158 /* tab_3 = new QWidget( TabWidget, "tab_3" ); 160 /* tab_3 = new QWidget( TabWidget, "tab_3" );
159 tabLayout_3 = new QGridLayout( tab_3 ); 161 tabLayout_3 = new QGridLayout( tab_3 );
@@ -199,7 +201,7 @@ void AdvancedFm::init() {
199 201
200 filterStr="*"; 202 filterStr="*";
201 b=FALSE; 203 b=FALSE;
202 204 TabWidget->setCurrentTab(0);
203 205
204} 206}
205 207
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
@@ -14,6 +14,8 @@
14#include "output.h" 14#include "output.h"
15#include "filePermissions.h" 15#include "filePermissions.h"
16 16
17#include <opie/otabwidget.h>
18
17#include <qpe/lnkproperties.h> 19#include <qpe/lnkproperties.h>
18#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
19#include <qpe/qpemenubar.h> 21#include <qpe/qpemenubar.h>
@@ -53,10 +55,24 @@ void AdvancedFm::doRemoteCd() {
53} 55}
54 56
55void AdvancedFm::showMenuHidden() { 57void AdvancedFm::showMenuHidden() {
56 if(TabWidget->currentPageIndex() == 0) 58 if (b) {
57 showHidden(); 59 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
58 else 60 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
59 showRemoteHidden(); 61 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
62// b=FALSE;
63
64 } else {
65 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
66 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
67 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
68// b=TRUE;
69 }
70 populateLocalView();
71 populateRemoteView();
72// if(TabWidget->getCurrentTab() == 0)
73// showHidden();
74// else
75// showRemoteHidden();
60// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true"); 76// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true");
61 if(b) b = false; else b = true; 77 if(b) b = false; else b = true;
62} 78}
@@ -64,12 +80,12 @@ void AdvancedFm::showMenuHidden() {
64void AdvancedFm::showHidden() { 80void AdvancedFm::showHidden() {
65 if (b) { 81 if (b) {
66 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 82 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
67 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); 83// fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
68// b=FALSE; 84// b=FALSE;
69 85
70 } else { 86 } else {
71 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 87 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
72 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); 88// fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
73// b=TRUE; 89// b=TRUE;
74 } 90 }
75 populateLocalView(); 91 populateLocalView();
@@ -89,7 +105,7 @@ void AdvancedFm::showRemoteHidden() {
89 105
90void AdvancedFm::runThis() { 106void AdvancedFm::runThis() {
91 QString fs; 107 QString fs;
92 if (TabWidget->currentPageIndex() == 0) { 108 if (TabWidget->getCurrentTab() == 0) {
93 QString curFile = Local_View->currentItem()->text(0); 109 QString curFile = Local_View->currentItem()->text(0);
94 if(curFile != "../") { 110 if(curFile != "../") {
95 111
@@ -141,7 +157,7 @@ void AdvancedFm::runThis() {
141} 157}
142 158
143void AdvancedFm::runText() { 159void AdvancedFm::runText() {
144 if (TabWidget->currentPageIndex() == 0) { 160 if (TabWidget->getCurrentTab() == 0) {
145 QString curFile = Local_View->currentItem()->text(0); 161 QString curFile = Local_View->currentItem()->text(0);
146 if(curFile != "../") { 162 if(curFile != "../") {
147 curFile = currentDir.canonicalPath()+"/"+curFile; 163 curFile = currentDir.canonicalPath()+"/"+curFile;
@@ -323,7 +339,7 @@ void AdvancedFm::filePerms() {
323 QStringList curFileList = getPath(); 339 QStringList curFileList = getPath();
324 QString filePath; 340 QString filePath;
325 341
326 if (TabWidget->currentPageIndex() == 0) { 342 if (TabWidget->getCurrentTab() == 0) {
327 filePath = currentDir.canonicalPath()+"/"; 343 filePath = currentDir.canonicalPath()+"/";
328 } else { 344 } else {
329 filePath= currentRemoteDir.canonicalPath()+"/"; 345 filePath= currentRemoteDir.canonicalPath()+"/";
@@ -337,7 +353,7 @@ void AdvancedFm::filePerms() {
337 if( filePerm) 353 if( filePerm)
338 delete filePerm; 354 delete filePerm;
339 } 355 }
340 if (TabWidget->currentPageIndex() == 0) { 356 if (TabWidget->getCurrentTab() == 0) {
341 populateLocalView(); 357 populateLocalView();
342 } else { 358 } else {
343 populateRemoteView(); 359 populateRemoteView();
@@ -350,7 +366,7 @@ void AdvancedFm::doProperties() {
350 QStringList curFileList = getPath(); 366 QStringList curFileList = getPath();
351 367
352 QString filePath; 368 QString filePath;
353 if (TabWidget->currentPageIndex() == 0) { 369 if (TabWidget->getCurrentTab() == 0) {
354 filePath = currentDir.canonicalPath()+"/"; 370 filePath = currentDir.canonicalPath()+"/";
355 } else { 371 } else {
356 filePath= currentRemoteDir.canonicalPath()+"/"; 372 filePath= currentRemoteDir.canonicalPath()+"/";
@@ -369,7 +385,7 @@ void AdvancedFm::doProperties() {
369} 385}
370 386
371void AdvancedFm::upDir() { 387void AdvancedFm::upDir() {
372 if (TabWidget->currentPageIndex() == 0) { 388 if (TabWidget->getCurrentTab() == 0) {
373 QString current = currentDir.canonicalPath(); 389 QString current = currentDir.canonicalPath();
374 QDir dir(current); 390 QDir dir(current);
375 dir.cdUp(); 391 dir.cdUp();
@@ -395,7 +411,7 @@ void AdvancedFm::copy() {
395 QStringList curFileList = getPath(); 411 QStringList curFileList = getPath();
396 if( curFileList.count() > 0) { 412 if( curFileList.count() > 0) {
397 QString curFile, item, destFile; 413 QString curFile, item, destFile;
398 if (TabWidget->currentPageIndex() == 0) { 414 if (TabWidget->getCurrentTab() == 0) {
399 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 415 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
400 item=(*it); 416 item=(*it);
401 417
@@ -427,7 +443,7 @@ void AdvancedFm::copy() {
427 } 443 }
428 } 444 }
429 populateRemoteView(); 445 populateRemoteView();
430 TabWidget->setCurrentPage(1); 446 TabWidget->setCurrentTab(1);
431 447
432 } else { 448 } else {
433 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 449 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
@@ -463,7 +479,7 @@ void AdvancedFm::copy() {
463 } 479 }
464 } 480 }
465 populateLocalView(); 481 populateLocalView();
466 TabWidget->setCurrentPage(0); 482 TabWidget->setCurrentTab(0);
467 } 483 }
468 484
469 } 485 }
@@ -475,7 +491,7 @@ void AdvancedFm::copyAs() {
475 QStringList curFileList = getPath(); 491 QStringList curFileList = getPath();
476 QString curFile; 492 QString curFile;
477 InputDialog *fileDlg; 493 InputDialog *fileDlg;
478 if (TabWidget->currentPageIndex() == 0) { 494 if (TabWidget->getCurrentTab() == 0) {
479 qDebug("tab 1"); 495 qDebug("tab 1");
480 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 496 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
481 QString destFile; 497 QString destFile;
@@ -512,7 +528,7 @@ void AdvancedFm::copyAs() {
512 528
513 } 529 }
514 populateRemoteView(); 530 populateRemoteView();
515 TabWidget->setCurrentPage(1); 531 TabWidget->setCurrentTab(1);
516 532
517 } else { 533 } else {
518 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 534 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
@@ -552,7 +568,7 @@ void AdvancedFm::copyAs() {
552 568
553 } 569 }
554 populateLocalView(); 570 populateLocalView();
555 TabWidget->setCurrentPage(0); 571 TabWidget->setCurrentTab(0);
556 } 572 }
557} 573}
558 574
@@ -562,7 +578,7 @@ void AdvancedFm::copySameDir() {
562 QString curFile, item, destFile; 578 QString curFile, item, destFile;
563 InputDialog *fileDlg; 579 InputDialog *fileDlg;
564 580
565 if (TabWidget->currentPageIndex() == 0) { 581 if (TabWidget->getCurrentTab() == 0) {
566 582
567 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 583 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
568 item=(*it); 584 item=(*it);
@@ -649,7 +665,7 @@ void AdvancedFm::move() {
649 if( curFileList.count() > 0) { 665 if( curFileList.count() > 0) {
650 QString curFile, destFile, item; 666 QString curFile, destFile, item;
651 667
652 if (TabWidget->currentPageIndex() == 0) { 668 if (TabWidget->getCurrentTab() == 0) {
653 669
654 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 670 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
655 item=(*it); 671 item=(*it);
@@ -678,7 +694,7 @@ void AdvancedFm::move() {
678 } 694 }
679 } 695 }
680 696
681 TabWidget->setCurrentPage(1); 697 TabWidget->setCurrentTab(1);
682 698
683 } else { //view 2 699 } else { //view 2
684 700
@@ -708,7 +724,7 @@ void AdvancedFm::move() {
708 } else 724 } else
709 QFile::remove( curFile); 725 QFile::remove( curFile);
710 } 726 }
711 TabWidget->setCurrentPage(0); 727 TabWidget->setCurrentTab(0);
712 } 728 }
713 } 729 }
714 populateRemoteView(); 730 populateRemoteView();
@@ -749,7 +765,7 @@ bool AdvancedFm::copyFile( const QString & dest, const QString & src ) {
749 765
750void AdvancedFm::runCommand() { 766void AdvancedFm::runCommand() {
751 QString curFile; 767 QString curFile;
752 if (TabWidget->currentPageIndex() == 0) { 768 if (TabWidget->getCurrentTab() == 0) {
753 if( Local_View->currentItem()) 769 if( Local_View->currentItem())
754 curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0); 770 curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0);
755 } else { 771 } else {
@@ -795,7 +811,7 @@ void AdvancedFm::runCommand() {
795 811
796void AdvancedFm::runCommandStd() { 812void AdvancedFm::runCommandStd() {
797 QString curFile; 813 QString curFile;
798 if (TabWidget->currentPageIndex() == 0) { 814 if (TabWidget->getCurrentTab() == 0) {
799 if( Local_View->currentItem()) 815 if( Local_View->currentItem())
800 curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0); 816 curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0);
801 } else { 817 } else {
@@ -818,7 +834,7 @@ void AdvancedFm::runCommandStd() {
818 834
819void AdvancedFm::fileStatus() { 835void AdvancedFm::fileStatus() {
820 QString curFile; 836 QString curFile;
821 if (TabWidget->currentPageIndex() == 0) { 837 if (TabWidget->getCurrentTab() == 0) {
822 curFile = Local_View->currentItem()->text(0); 838 curFile = Local_View->currentItem()->text(0);
823 } else { 839 } else {
824 curFile = Remote_View->currentItem()->text(0); 840 curFile = Remote_View->currentItem()->text(0);
@@ -850,7 +866,7 @@ void AdvancedFm::fileStatus() {
850} 866}
851 867
852void AdvancedFm::mkDir() { 868void AdvancedFm::mkDir() {
853 if (TabWidget->currentPageIndex() == 0) 869 if (TabWidget->getCurrentTab() == 0)
854 localMakDir(); 870 localMakDir();
855 else 871 else
856 remoteMakDir(); 872 remoteMakDir();
@@ -858,7 +874,7 @@ void AdvancedFm::mkDir() {
858} 874}
859 875
860void AdvancedFm::rn() { 876void AdvancedFm::rn() {
861 if (TabWidget->currentPageIndex() == 0) 877 if (TabWidget->getCurrentTab() == 0)
862 localRename(); 878 localRename();
863 else 879 else
864 remoteRename(); 880 remoteRename();
@@ -866,7 +882,7 @@ void AdvancedFm::rn() {
866} 882}
867 883
868void AdvancedFm::del() { 884void AdvancedFm::del() {
869 if (TabWidget->currentPageIndex() == 0) 885 if (TabWidget->getCurrentTab() == 0)
870 localDelete(); 886 localDelete();
871 else 887 else
872 remoteDelete(); 888 remoteDelete();
@@ -877,7 +893,7 @@ void AdvancedFm::mkSym() {
877 QStringList curFileList = getPath(); 893 QStringList curFileList = getPath();
878 if( curFileList.count() > 0) { 894 if( curFileList.count() > 0) {
879 895
880 if (TabWidget->currentPageIndex() == 0) { 896 if (TabWidget->getCurrentTab() == 0) {
881 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 897 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
882 898
883 QString destName = currentRemoteDir.canonicalPath()+"/"+(*it); 899 QString destName = currentRemoteDir.canonicalPath()+"/"+(*it);
@@ -889,7 +905,7 @@ void AdvancedFm::mkSym() {
889 system(cmd.latin1() ); 905 system(cmd.latin1() );
890 } 906 }
891 populateRemoteView(); 907 populateRemoteView();
892 TabWidget->setCurrentPage(1); 908 TabWidget->setCurrentTab(1);
893 } else { 909 } else {
894 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 910 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
895 911
@@ -903,7 +919,7 @@ void AdvancedFm::mkSym() {
903 system(cmd.latin1() ); 919 system(cmd.latin1() );
904 } 920 }
905 populateLocalView(); 921 populateLocalView();
906 TabWidget->setCurrentPage(0); 922 TabWidget->setCurrentTab(0);
907 } 923 }
908 } 924 }
909} 925}
@@ -916,7 +932,7 @@ void AdvancedFm::doBeam() {
916 QStringList curFileList = getPath(); 932 QStringList curFileList = getPath();
917 if( curFileList.count() > 0) { 933 if( curFileList.count() > 0) {
918 934
919 if (TabWidget->currentPageIndex() == 0) { 935 if (TabWidget->getCurrentTab() == 0) {
920 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 936 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
921 937
922 QString curFile = currentDir.canonicalPath()+"/"+(*it); 938 QString curFile = currentDir.canonicalPath()+"/"+(*it);