summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2004-09-18 09:05:57 (UTC)
committer llornkcor <llornkcor>2004-09-18 09:05:57 (UTC)
commiteaf09b9b6e1abbe36e814a8e4da315ac8d96bd63 (patch) (side-by-side diff)
treeee914747ae2494d50716ab3cda866613d4eb134c /noncore
parent5096f9bd9f1a06e5238e2206eee195c43a2bdb6b (diff)
downloadopie-eaf09b9b6e1abbe36e814a8e4da315ac8d96bd63.zip
opie-eaf09b9b6e1abbe36e814a8e4da315ac8d96bd63.tar.gz
opie-eaf09b9b6e1abbe36e814a8e4da315ac8d96bd63.tar.bz2
fix stuff, including #1404
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp88
-rw-r--r--noncore/apps/advancedfm/advancedfm.h3
-rw-r--r--noncore/apps/advancedfm/advancedfm.pro2
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp20
4 files changed, 71 insertions, 42 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index afb44f5..b4461cb 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -14,2 +14,3 @@
+#include <opie2/odebug.h>
#include <qpe/qpeapplication.h>
@@ -44,9 +45,17 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
- initConnections();
- whichTab=1;
- rePopulate();
- currentPathCombo->setFocus();
- channel = new QCopChannel( "QPE/Application/advancedfm", this );
- connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
- this, SLOT( qcopReceive(const QCString&,const QByteArray&)) );
+ initConnections();
+
+ whichTab = 1;
+ populateView();
+// rePopulate();
+// currentPathCombo->setFocus();
+ channel = new QCopChannel( "QPE/Application/advancedfm", this );
+ connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT( qcopReceive(const QCString&,const QByteArray&)) );
+
+// if( CurrentView() == Local_View)
+// qDebug("LOCAL VIEW");
+// else
+// qDebug("REMOTE VIEW");
+ switchToLocalTab();
}
@@ -68,8 +77,13 @@ void AdvancedFm::cleanUp() {
-void AdvancedFm::tabChanged(QWidget *) {
-// owarn << "tab changed" << oendl;
- QString path = CurrentDir()->canonicalPath();
+void AdvancedFm::tabChanged(QWidget *wd) {
+ if(wd == tab)
+ odebug << "LOCAL VIEW SHOWN"<< oendl;
+ else if(wd == tab_2)
+ odebug<< "REMOTE VIEW SHOWN"<< oendl;
+
+ QString path = CurrentDir()->canonicalPath();
currentPathCombo->lineEdit()->setText( path );
- if(whichTab == 1) {
+ if ( TabWidget->currentWidget() == tab) {
+// if(whichTab == 1) {
viewMenu->setItemChecked(viewMenu->idAt(0), true);
@@ -86,2 +100,8 @@ void AdvancedFm::tabChanged(QWidget *) {
chdir( path.latin1());
+ if( wd == Local_View) {
+ Remote_View->clearFocus();
+ } else {
+ Local_View->clearFocus();
+ }
+
}
@@ -91,3 +111,2 @@ void AdvancedFm::populateView() {
-// owarn << "PopulateView" << oendl;
QPixmap pm;
@@ -97,3 +116,2 @@ void AdvancedFm::populateView() {
-//owarn << "path is "+path << oendl;
thisView->clear();
@@ -217,4 +235,9 @@ void AdvancedFm::rePopulate() {
void AdvancedFm::ListClicked(QListViewItem *selectedItem) {
-//owarn << "listclicked" << oendl;
- if(selectedItem) {
+ if ( TabWidget->currentWidget() == tab)
+ qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local");
+ else
+ qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote");
+
+
+ if(selectedItem) {
QString strItem=selectedItem->text(0);
@@ -248,3 +271,3 @@ void AdvancedFm::ListClicked(QListViewItem *selectedItem) {
void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) {
- dealWithSchmooSchmaa( item->listView());
+ Q_UNUSED(item);
switch (mouse) {
@@ -257,2 +280,5 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in
break;
+// case 2:
+// menuTimer.start( 50, TRUE );
+// break;
};
@@ -262,5 +288,5 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in
void AdvancedFm::switchToLocalTab() {
-//owarn << "switch to local view" << oendl;
TabWidget->setCurrentWidget(0);
Local_View->setFocus();
+
}
@@ -268,3 +294,2 @@ void AdvancedFm::switchToLocalTab() {
void AdvancedFm::switchToRemoteTab() {
-//owarn << "switch to local view" << oendl;
TabWidget->setCurrentWidget(1);
@@ -292,3 +317,4 @@ void AdvancedFm::fillCombo(const QString &currentPath) {
- if ( whichTab == 1) {
+ if ( TabWidget->currentWidget() == tab) {
+// if ( whichTab == 1) {
currentPathCombo->lineEdit()->setText( currentPath);
@@ -759,2 +785,7 @@ QDir *AdvancedFm::CurrentDir() {
+ if ( TabWidget->currentWidget() == tab)
+ qDebug("CurrentTab is Local");
+ else
+ qDebug("CurrentTab is Remote");
+
if ( whichTab == 1) {
@@ -767,2 +798,3 @@ QDir *AdvancedFm::CurrentDir() {
QDir *AdvancedFm::OtherDir() {
+// if ( TabWidget->currentWidget() == tab) {
if ( whichTab == 1) {
@@ -775,4 +807,7 @@ QDir *AdvancedFm::OtherDir() {
QListView * AdvancedFm::CurrentView() {
+ if ( TabWidget->currentWidget() == tab)
+ odebug << "CurrentView local" << oendl;
+
+// if ( TabWidget->currentWidget() == tab) {
if ( whichTab == 1) {
-// owarn << "CurrentView Tab 1" << oendl;
return Local_View;
@@ -792,3 +827,3 @@ QListView * AdvancedFm::OtherView() {
void AdvancedFm::setOtherTabCurrent() {
-// owarn << "setOtherTabCurrent() " << whichTab << "" << oendl;
+ qDebug("setOtherTabCurrent() %d",whichTab);
if ( whichTab == 1) {
@@ -819,3 +854,3 @@ void AdvancedFm::setDocument(const QString &file) {
void AdvancedFm::gotoDirectory(const QString &file) {
-// owarn << "goto dir "+file << oendl;
+ qDebug("goto dir "+file);
QString curDir = file;
@@ -859,11 +894,2 @@ void AdvancedFm::slotSwitchMenu(int ) {
-void AdvancedFm::dealWithSchmooSchmaa(QWidget *w) {
- tabChanged( w);
- if( w == Local_View) {
- Remote_View->clearFocus();
- } else {
- Local_View->clearFocus();
- }
-}
-
void AdvancedFm::navigateToSelected() {
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index effda0b..e596977 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -131,5 +131,5 @@ protected:
void setOtherTabCurrent();
- void dealWithSchmooSchmaa(QWidget *);
protected slots:
+
void openSearch();
@@ -158,2 +158,3 @@ protected slots:
bool moveDirectory( const QString & , const QString & );
+
// void slotSwitchtoLocal(int);
diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro
index f1c518e..0644edb 100644
--- a/noncore/apps/advancedfm/advancedfm.pro
+++ b/noncore/apps/advancedfm/advancedfm.pro
@@ -7,3 +7,3 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopiecore2 -lopieui2
+LIBS += -lqpe -lqte -lopiecore2 -lopieui2
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 4628170..8d04c68 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -336,3 +336,2 @@ void AdvancedFm::copy() {
void AdvancedFm::copyAs() {
- qApp->processEvents();
@@ -380,4 +379,6 @@ void AdvancedFm::copyAs() {
}
- rePopulate();
- setOtherTabCurrent();
+ rePopulate();
+ setOtherTabCurrent();
+ qApp->processEvents();
+
}
@@ -755,8 +756,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
if ( e->type() == QEvent::FocusIn ) {
- if( o == Local_View) { //keep track of which view
- whichTab=1;
- }
- else {
- whichTab=2;
- }
+ if( o == Local_View) { //keep track of which view
+ qDebug("local view");
+ whichTab = 1;
+ } else {
+ whichTab = 2;
+ qDebug("remote view");
+ }
}