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
@@ -14,2 +14,3 @@
+ #include <opie/otabwidget.h>
// #include <opie/ofileselector.h>
@@ -89,3 +90,4 @@ void AdvancedFm::cleanUp() {
void AdvancedFm::tabChanged(QWidget *) {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
@@ -98,3 +100,5 @@ void AdvancedFm::tabChanged(QWidget *) {
}
- if (TabWidget->currentPageIndex() == 1) {
+ if (TabWidget->getCurrentTab() == 1) {
+
+// if (TabWidget->currentPageIndex() == 1) {
currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath());
@@ -416,3 +420,3 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, in
void AdvancedFm::switchToLocalTab() {
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
Local_View->setFocus();
@@ -421,3 +425,3 @@ void AdvancedFm::switchToLocalTab() {
void AdvancedFm::switchToRemoteTab() {
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
Remote_View->setFocus();
@@ -434,3 +438,4 @@ void AdvancedFm::writeConfig() {
void AdvancedFm::currentPathComboChanged() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
@@ -442,3 +447,4 @@ void AdvancedFm::currentPathComboChanged() {
}
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
@@ -454,3 +460,4 @@ void AdvancedFm::fillCombo(const QString &currentPath) {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentPathCombo->lineEdit()->setText( currentPath);
@@ -472,3 +479,4 @@ 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() );
@@ -487,3 +495,4 @@ QStringList AdvancedFm::getPath() {
QStringList strList;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
QList<QListViewItem> * getSelectedItems( QListView * Local_View );
@@ -514,3 +523,4 @@ void AdvancedFm::homeButtonPushed() {
chdir( current.latin1() );
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentDir.cd( current, TRUE);
@@ -527,3 +537,5 @@ void AdvancedFm::docButtonPushed() {
chdir( current.latin1() );
- if (TabWidget->currentPageIndex() == 0) {
+
+ if (TabWidget->getCurrentTab() == 0) {
+//if (TabWidget->currentPageIndex() == 0) {
currentDir.cd( current, TRUE);
@@ -540,3 +552,4 @@ void AdvancedFm::SDButtonPushed() {
chdir( current.latin1() );
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentDir.cd( current, TRUE);
@@ -559,3 +572,4 @@ void AdvancedFm::CFButtonPushed() {
chdir( current.latin1() );
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentDir.cd( current, TRUE);
@@ -647,3 +661,4 @@ void AdvancedFm::QPEButtonPushed() {
chdir( current.latin1() );
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
currentDir.cd( current, TRUE);
@@ -719,3 +734,4 @@ void AdvancedFm::showFileMenu() {
bool isLocalView = false;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
isLocalView = TRUE;
@@ -732,4 +748,7 @@ void AdvancedFm::showFileMenu() {
// 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() ) {
@@ -831,3 +850,4 @@ void AdvancedFm::addToDocs() {
QString curFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
+// if (TabWidget->currentPageIndex() == 0) {
for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++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
@@ -16,2 +16,3 @@
+//#include <opie/otabwidget.h>
#include <qpe/ir.h>
@@ -27,2 +28,3 @@
+class OTabWidget;
class QVBoxLayout;
@@ -55,3 +57,4 @@ public:
- QTabWidget *TabWidget;
+ OTabWidget *TabWidget;
+// QTabWidget *TabWidget;
QWidget *tab, *tab_2, *tab_3;
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
@@ -9,3 +9,3 @@ DEPENDPATH += $(OPIEDIR)/include
DESTDIR = $(OPIEDIR)/bin
-LIBS += -lqpe
+LIBS += -lqpe -lopie
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
@@ -13,2 +13,3 @@
+#include <opie/otabwidget.h>
#include <qpe/qpeapplication.h>
@@ -24,3 +25,2 @@
#include <qtoolbutton.h>
-#include <qtabwidget.h>
#include <qlineedit.h>
@@ -110,3 +110,4 @@ void AdvancedFm::init() {
- 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);
@@ -132,3 +133,4 @@ void AdvancedFm::init() {
- TabWidget->insertTab( tab, tr("1"));
+ TabWidget->addTab( tab,"advancedfm/smFileBrowser.png", tr("1"));
+// TabWidget->insertTab( tab, tr("1"));
@@ -154,4 +156,4 @@ void AdvancedFm::init() {
-
- TabWidget->insertTab( tab_2, tr( "2"));
+ TabWidget->addTab( tab_2, "advancedfm/smFileBrowser.png",tr( "2"));
+// TabWidget->insertTab( tab_2, tr( "2"));
@@ -201,3 +203,3 @@ void AdvancedFm::init() {
b=FALSE;
-
+ TabWidget->setCurrentTab(0);
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
@@ -16,2 +16,4 @@
+#include <opie/otabwidget.h>
+
#include <qpe/lnkproperties.h>
@@ -55,6 +57,20 @@ void AdvancedFm::doRemoteCd() {
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");
@@ -66,3 +82,3 @@ void AdvancedFm::showHidden() {
currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
+// fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
// b=FALSE;
@@ -71,3 +87,3 @@ void AdvancedFm::showHidden() {
currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
- fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
+// fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
// b=TRUE;
@@ -91,3 +107,3 @@ void AdvancedFm::runThis() {
QString fs;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
QString curFile = Local_View->currentItem()->text(0);
@@ -143,3 +159,3 @@ void AdvancedFm::runThis() {
void AdvancedFm::runText() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
QString curFile = Local_View->currentItem()->text(0);
@@ -325,3 +341,3 @@ void AdvancedFm::filePerms() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
filePath = currentDir.canonicalPath()+"/";
@@ -339,3 +355,3 @@ void AdvancedFm::filePerms() {
}
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
populateLocalView();
@@ -352,3 +368,3 @@ void AdvancedFm::doProperties() {
QString filePath;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
filePath = currentDir.canonicalPath()+"/";
@@ -371,3 +387,3 @@ void AdvancedFm::doProperties() {
void AdvancedFm::upDir() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
QString current = currentDir.canonicalPath();
@@ -397,3 +413,3 @@ void AdvancedFm::copy() {
QString curFile, item, destFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
@@ -429,3 +445,3 @@ void AdvancedFm::copy() {
populateRemoteView();
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
@@ -465,3 +481,3 @@ void AdvancedFm::copy() {
populateLocalView();
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
@@ -477,3 +493,3 @@ void AdvancedFm::copyAs() {
InputDialog *fileDlg;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
qDebug("tab 1");
@@ -514,3 +530,3 @@ void AdvancedFm::copyAs() {
populateRemoteView();
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
@@ -554,3 +570,3 @@ void AdvancedFm::copyAs() {
populateLocalView();
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
@@ -564,3 +580,3 @@ void AdvancedFm::copySameDir() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
@@ -651,3 +667,3 @@ void AdvancedFm::move() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
@@ -680,3 +696,3 @@ void AdvancedFm::move() {
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
@@ -710,3 +726,3 @@ void AdvancedFm::move() {
}
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
@@ -751,3 +767,3 @@ void AdvancedFm::runCommand() {
QString curFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
if( Local_View->currentItem())
@@ -797,3 +813,3 @@ void AdvancedFm::runCommandStd() {
QString curFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
if( Local_View->currentItem())
@@ -820,3 +836,3 @@ void AdvancedFm::fileStatus() {
QString curFile;
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
curFile = Local_View->currentItem()->text(0);
@@ -852,3 +868,3 @@ void AdvancedFm::fileStatus() {
void AdvancedFm::mkDir() {
- if (TabWidget->currentPageIndex() == 0)
+ if (TabWidget->getCurrentTab() == 0)
localMakDir();
@@ -860,3 +876,3 @@ void AdvancedFm::mkDir() {
void AdvancedFm::rn() {
- if (TabWidget->currentPageIndex() == 0)
+ if (TabWidget->getCurrentTab() == 0)
localRename();
@@ -868,3 +884,3 @@ void AdvancedFm::rn() {
void AdvancedFm::del() {
- if (TabWidget->currentPageIndex() == 0)
+ if (TabWidget->getCurrentTab() == 0)
localDelete();
@@ -879,3 +895,3 @@ void AdvancedFm::mkSym() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
@@ -891,3 +907,3 @@ void AdvancedFm::mkSym() {
populateRemoteView();
- TabWidget->setCurrentPage(1);
+ TabWidget->setCurrentTab(1);
} else {
@@ -905,3 +921,3 @@ void AdvancedFm::mkSym() {
populateLocalView();
- TabWidget->setCurrentPage(0);
+ TabWidget->setCurrentTab(0);
}
@@ -918,3 +934,3 @@ void AdvancedFm::doBeam() {
- if (TabWidget->currentPageIndex() == 0) {
+ if (TabWidget->getCurrentTab() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {