-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 56 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 5 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.pro | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 14 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 80 |
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 | |||
@@ -13,4 +13,5 @@ | |||
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> |
@@ -88,5 +89,6 @@ void AdvancedFm::cleanUp() { | |||
88 | 89 | ||
89 | void AdvancedFm::tabChanged(QWidget *) { | 90 | void 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); |
@@ -97,5 +99,7 @@ void AdvancedFm::tabChanged(QWidget *) { | |||
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); |
@@ -415,10 +419,10 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, in | |||
415 | 419 | ||
416 | void AdvancedFm::switchToLocalTab() { | 420 | void AdvancedFm::switchToLocalTab() { |
417 | TabWidget->setCurrentPage(0); | 421 | TabWidget->setCurrentTab(0); |
418 | Local_View->setFocus(); | 422 | Local_View->setFocus(); |
419 | } | 423 | } |
420 | 424 | ||
421 | void AdvancedFm::switchToRemoteTab() { | 425 | void AdvancedFm::switchToRemoteTab() { |
422 | TabWidget->setCurrentPage(1); | 426 | TabWidget->setCurrentTab(1); |
423 | Remote_View->setFocus(); | 427 | Remote_View->setFocus(); |
424 | } | 428 | } |
@@ -433,5 +437,6 @@ void AdvancedFm::writeConfig() { | |||
433 | 437 | ||
434 | void AdvancedFm::currentPathComboChanged() { | 438 | void 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() ); |
@@ -441,5 +446,6 @@ void AdvancedFm::currentPathComboChanged() { | |||
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() ); |
@@ -453,5 +459,6 @@ void AdvancedFm::currentPathComboChanged() { | |||
453 | void AdvancedFm::fillCombo(const QString ¤tPath) { | 459 | void AdvancedFm::fillCombo(const QString ¤tPath) { |
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() ) { |
@@ -471,5 +478,6 @@ void AdvancedFm::fillCombo(const QString ¤tPath) { | |||
471 | 478 | ||
472 | void AdvancedFm::currentPathComboActivated(const QString & currentPath) { | 479 | void 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); |
@@ -486,5 +494,6 @@ void AdvancedFm::currentPathComboActivated(const QString & currentPath) { | |||
486 | QStringList AdvancedFm::getPath() { | 494 | QStringList 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 ); |
@@ -513,5 +522,6 @@ void 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(); |
@@ -526,5 +536,7 @@ void 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(); |
@@ -539,5 +551,6 @@ void 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(); |
@@ -558,5 +571,6 @@ void AdvancedFm::CFButtonPushed() { | |||
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(); |
@@ -646,5 +660,6 @@ void 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(); |
@@ -718,5 +733,6 @@ void AdvancedFm::showFileMenu() { | |||
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); |
@@ -731,6 +747,9 @@ void AdvancedFm::showFileMenu() { | |||
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(); |
@@ -830,5 +849,6 @@ void AdvancedFm::addToDocs() { | |||
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); |
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 | |||
@@ -15,4 +15,5 @@ | |||
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 | ||
@@ -26,4 +27,5 @@ | |||
26 | #include <qtimer.h> | 27 | #include <qtimer.h> |
27 | 28 | ||
29 | class OTabWidget; | ||
28 | class QVBoxLayout; | 30 | class QVBoxLayout; |
29 | class QHBoxLayout; | 31 | class QHBoxLayout; |
@@ -54,5 +56,6 @@ public: | |||
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; |
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 | |||
@@ -8,5 +8,5 @@ INCLUDEPATH += $(OPIEDIR)/include | |||
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | DESTDIR = $(OPIEDIR)/bin | 9 | DESTDIR = $(OPIEDIR)/bin |
10 | LIBS += -lqpe | 10 | LIBS += -lqpe -lopie |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/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 | |||
@@ -12,4 +12,5 @@ | |||
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> |
@@ -23,5 +24,4 @@ | |||
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> |
@@ -109,5 +109,6 @@ void AdvancedFm::init() { | |||
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 | ||
@@ -131,5 +132,6 @@ void AdvancedFm::init() { | |||
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" ); |
@@ -153,6 +155,6 @@ void AdvancedFm::init() { | |||
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" ); |
@@ -200,5 +202,5 @@ void AdvancedFm::init() { | |||
200 | filterStr="*"; | 202 | filterStr="*"; |
201 | b=FALSE; | 203 | b=FALSE; |
202 | 204 | TabWidget->setCurrentTab(0); | |
203 | 205 | ||
204 | } | 206 | } |
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 | |||
@@ -15,4 +15,6 @@ | |||
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> |
@@ -54,8 +56,22 @@ void AdvancedFm::doRemoteCd() { | |||
54 | 56 | ||
55 | void AdvancedFm::showMenuHidden() { | 57 | void 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; |
@@ -65,10 +81,10 @@ void 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 | } |
@@ -90,5 +106,5 @@ void AdvancedFm::showRemoteHidden() { | |||
90 | void AdvancedFm::runThis() { | 106 | void 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 != "../") { |
@@ -142,5 +158,5 @@ void AdvancedFm::runThis() { | |||
142 | 158 | ||
143 | void AdvancedFm::runText() { | 159 | void 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 != "../") { |
@@ -324,5 +340,5 @@ void AdvancedFm::filePerms() { | |||
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 { |
@@ -338,5 +354,5 @@ void AdvancedFm::filePerms() { | |||
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 { |
@@ -351,5 +367,5 @@ void AdvancedFm::doProperties() { | |||
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 { |
@@ -370,5 +386,5 @@ void AdvancedFm::doProperties() { | |||
370 | 386 | ||
371 | void AdvancedFm::upDir() { | 387 | void 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); |
@@ -396,5 +412,5 @@ void AdvancedFm::copy() { | |||
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); |
@@ -428,5 +444,5 @@ void AdvancedFm::copy() { | |||
428 | } | 444 | } |
429 | populateRemoteView(); | 445 | populateRemoteView(); |
430 | TabWidget->setCurrentPage(1); | 446 | TabWidget->setCurrentTab(1); |
431 | 447 | ||
432 | } else { | 448 | } else { |
@@ -464,5 +480,5 @@ void AdvancedFm::copy() { | |||
464 | } | 480 | } |
465 | populateLocalView(); | 481 | populateLocalView(); |
466 | TabWidget->setCurrentPage(0); | 482 | TabWidget->setCurrentTab(0); |
467 | } | 483 | } |
468 | 484 | ||
@@ -476,5 +492,5 @@ void AdvancedFm::copyAs() { | |||
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 ) { |
@@ -513,5 +529,5 @@ void AdvancedFm::copyAs() { | |||
513 | } | 529 | } |
514 | populateRemoteView(); | 530 | populateRemoteView(); |
515 | TabWidget->setCurrentPage(1); | 531 | TabWidget->setCurrentTab(1); |
516 | 532 | ||
517 | } else { | 533 | } else { |
@@ -553,5 +569,5 @@ void AdvancedFm::copyAs() { | |||
553 | } | 569 | } |
554 | populateLocalView(); | 570 | populateLocalView(); |
555 | TabWidget->setCurrentPage(0); | 571 | TabWidget->setCurrentTab(0); |
556 | } | 572 | } |
557 | } | 573 | } |
@@ -563,5 +579,5 @@ void AdvancedFm::copySameDir() { | |||
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 ) { |
@@ -650,5 +666,5 @@ void AdvancedFm::move() { | |||
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 ) { |
@@ -679,5 +695,5 @@ void AdvancedFm::move() { | |||
679 | } | 695 | } |
680 | 696 | ||
681 | TabWidget->setCurrentPage(1); | 697 | TabWidget->setCurrentTab(1); |
682 | 698 | ||
683 | } else { //view 2 | 699 | } else { //view 2 |
@@ -709,5 +725,5 @@ void AdvancedFm::move() { | |||
709 | QFile::remove( curFile); | 725 | QFile::remove( curFile); |
710 | } | 726 | } |
711 | TabWidget->setCurrentPage(0); | 727 | TabWidget->setCurrentTab(0); |
712 | } | 728 | } |
713 | } | 729 | } |
@@ -750,5 +766,5 @@ bool AdvancedFm::copyFile( const QString & dest, const QString & src ) { | |||
750 | void AdvancedFm::runCommand() { | 766 | void 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); |
@@ -796,5 +812,5 @@ void AdvancedFm::runCommand() { | |||
796 | void AdvancedFm::runCommandStd() { | 812 | void 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); |
@@ -819,5 +835,5 @@ void AdvancedFm::runCommandStd() { | |||
819 | void AdvancedFm::fileStatus() { | 835 | void 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 { |
@@ -851,5 +867,5 @@ void AdvancedFm::fileStatus() { | |||
851 | 867 | ||
852 | void AdvancedFm::mkDir() { | 868 | void AdvancedFm::mkDir() { |
853 | if (TabWidget->currentPageIndex() == 0) | 869 | if (TabWidget->getCurrentTab() == 0) |
854 | localMakDir(); | 870 | localMakDir(); |
855 | else | 871 | else |
@@ -859,5 +875,5 @@ void AdvancedFm::mkDir() { | |||
859 | 875 | ||
860 | void AdvancedFm::rn() { | 876 | void AdvancedFm::rn() { |
861 | if (TabWidget->currentPageIndex() == 0) | 877 | if (TabWidget->getCurrentTab() == 0) |
862 | localRename(); | 878 | localRename(); |
863 | else | 879 | else |
@@ -867,5 +883,5 @@ void AdvancedFm::rn() { | |||
867 | 883 | ||
868 | void AdvancedFm::del() { | 884 | void AdvancedFm::del() { |
869 | if (TabWidget->currentPageIndex() == 0) | 885 | if (TabWidget->getCurrentTab() == 0) |
870 | localDelete(); | 886 | localDelete(); |
871 | else | 887 | else |
@@ -878,5 +894,5 @@ void AdvancedFm::mkSym() { | |||
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 | ||
@@ -890,5 +906,5 @@ void AdvancedFm::mkSym() { | |||
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 ) { |
@@ -904,5 +920,5 @@ void AdvancedFm::mkSym() { | |||
904 | } | 920 | } |
905 | populateLocalView(); | 921 | populateLocalView(); |
906 | TabWidget->setCurrentPage(0); | 922 | TabWidget->setCurrentTab(0); |
907 | } | 923 | } |
908 | } | 924 | } |
@@ -917,5 +933,5 @@ void AdvancedFm::doBeam() { | |||
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 | ||