Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 79 |
1 files changed, 36 insertions, 43 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 4de7d38..02898de 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -52,4 +52,3 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) channel = new QCopChannel( "QPE/Application/advancedfm", this ); - connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), - this, SLOT( qcopReceive(const QCString&,const QByteArray&)) ); + connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); @@ -78,12 +77,15 @@ void AdvancedFm::cleanUp() { void AdvancedFm::tabChanged(QWidget *wd) { - if(wd == tab) - odebug << "LOCAL VIEW SHOWN"<< oendl; - else if(wd == tab_2) - odebug<< "REMOTE VIEW SHOWN"<< oendl; - +// qDebug("tabChanged"); + if(wd == tab) { + whichTab = 1; +// qDebug("tabchanged: LOCAL VIEW SHOWN"); + } + else if(wd == tab_2) { + whichTab = 2; +// qDebug("tabchanged: REMOTE VIEW SHOWN"); + } + qApp->processEvents(); QString path = CurrentDir()->canonicalPath(); - currentPathCombo->lineEdit()->setText( path ); - +// qDebug(path); if ( TabWidget->currentWidget() == tab) { -// if(whichTab == 1) { viewMenu->setItemChecked(viewMenu->idAt(0), true); @@ -100,8 +102,3 @@ void AdvancedFm::tabChanged(QWidget *wd) { chdir( path.latin1()); - if( wd == Local_View) { - Remote_View->clearFocus(); - } else { - Local_View->clearFocus(); - } - + currentPathCombo->lineEdit()->setText(path); } @@ -220,2 +217,3 @@ void AdvancedFm::populateView() { void AdvancedFm::rePopulate() { +// qDebug("repopulate views"); populateView(); @@ -235,6 +233,6 @@ void AdvancedFm::rePopulate() { void AdvancedFm::ListClicked(QListViewItem *selectedItem) { - if ( TabWidget->currentWidget() == tab) - qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local"); - else - qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote"); +// if ( TabWidget->currentWidget() == tab) +// qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked local"); +// else +// qDebug("XXXXXXXXXXXXXXXXXXXXXXXX ListClicked remote"); @@ -294,4 +292,6 @@ void AdvancedFm::refreshCurrentTab() { void AdvancedFm::switchToLocalTab() { + qDebug("switchToLocal "); TabWidget->setCurrentWidget(0); Local_View->setFocus(); + whichTab = 1; @@ -300,4 +300,6 @@ void AdvancedFm::switchToLocalTab() { void AdvancedFm::switchToRemoteTab() { + qDebug("switchToRemoteTab() "); TabWidget->setCurrentWidget(1); Remote_View->setFocus(); + whichTab = 2; } @@ -400,6 +402,3 @@ void AdvancedFm::CFButtonPushed() { void AdvancedFm::doAbout() { - QMessageBox::message("AdvancedFm",tr("Advanced FileManager\n" - "is copyright 2002-2003 by\n" - "L.J.Potter<llornkcor@handhelds.org>\n" - "and is licensed by the GPL")); + QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>")); } @@ -584,4 +583,3 @@ void AdvancedFm::showFileMenu() { if ( app ) - m->insertItem( app->pixmap(), tr( "Open in " - + app->name() ), this, SLOT( runThis() ) ); + m->insertItem(app->pixmap(),tr("Open in " + app->name()),this,SLOT(runThis())); else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this @@ -599,6 +597,6 @@ void AdvancedFm::showFileMenu() { - n->insertItem( tr( "Copy" ), this, SLOT( copy() )); - n->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); - n->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); - n->insertItem( tr( "Move" ), this, SLOT( move() )); + n->insertItem(tr("Copy"),this,SLOT(copyTimer())); + n->insertItem(tr("Copy As"),this,SLOT(copyAsTimer())); + n->insertItem(tr("Copy Same Dir"),this,SLOT(copySameDirTimer())); + n->insertItem(tr("Move"),this,SLOT(moveTimer())); @@ -790,11 +788,7 @@ void AdvancedFm::gotoCustomDir(const QString &dir) { QDir *AdvancedFm::CurrentDir() { - - if ( TabWidget->currentWidget() == tab) - qDebug("CurrentTab is Local"); - else - qDebug("CurrentTab is Remote"); - if ( whichTab == 1) { +// qDebug("CurrentTab is Local"); return ¤tDir; } else { +// qDebug("CurrentTab is Remote"); return ¤tRemoteDir; @@ -813,7 +807,5 @@ QDir *AdvancedFm::OtherDir() { QListView * AdvancedFm::CurrentView() { - if ( TabWidget->currentWidget() == tab) - odebug << "CurrentView local" << oendl; - // if ( TabWidget->currentWidget() == tab) { if ( whichTab == 1) { +// qDebug("CurrentView: local"); return Local_View; @@ -821,2 +813,3 @@ QListView * AdvancedFm::CurrentView() { // owarn << "CurrentView Tab 2" << oendl; +// qDebug("CurrentView: remote"); return Remote_View; @@ -833,3 +826,3 @@ QListView * AdvancedFm::OtherView() { void AdvancedFm::setOtherTabCurrent() { - qDebug("setOtherTabCurrent() %d",whichTab); +// qDebug("setOtherTabCurrent() %d",whichTab); if ( whichTab == 1) { @@ -860,3 +853,3 @@ void AdvancedFm::setDocument(const QString &file) { void AdvancedFm::gotoDirectory(const QString &file) { - qDebug("goto dir "+file); +// qDebug("goto dir "+file); QString curDir = file; @@ -895,4 +888,4 @@ void AdvancedFm::findFile(const QString &fileName) { -void AdvancedFm::slotSwitchMenu(int ) { -// odebug << "Switch " << item << "" << oendl; +void AdvancedFm::slotSwitchMenu(int item) { +// qDebug( "Switch %d",item); // viewMenu->setItemChecked(item, true); |