author | llornkcor <llornkcor> | 2004-09-25 01:51:26 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-09-25 01:51:26 (UTC) |
commit | 40e681bf20db4f1e02212ae6e42a349ee000cf14 (patch) (side-by-side diff) | |
tree | 86eea5377011775ff87ca50e1fd125ff8f30622f /noncore/apps/advancedfm/advancedfmMenu.cpp | |
parent | 0fe000754035c737ff0de97e5b2bd2cf03c16337 (diff) | |
download | opie-40e681bf20db4f1e02212ae6e42a349ee000cf14.zip opie-40e681bf20db4f1e02212ae6e42a349ee000cf14.tar.gz opie-40e681bf20db4f1e02212ae6e42a349ee000cf14.tar.bz2 |
fix stuff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmMenu.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 73 |
1 files changed, 36 insertions, 37 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 8d04c68..5a46579 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -272,6 +272,9 @@ void AdvancedFm::upDir() { } +void AdvancedFm::copyTimer() { + QTimer::singleShot(125,this,SLOT(copy())); +} + void AdvancedFm::copy() { - qApp->processEvents(); QStringList curFileList = getPath(); @@ -313,5 +316,5 @@ void AdvancedFm::copy() { if(doMsg) { switch ( QMessageBox::warning(this,tr("File Exists!"), - tr("%1 exists. Ok to overwrite?").arg( item ), + tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item), tr("Yes"),tr("No"),0,0,1) ) { case 1: @@ -325,13 +328,16 @@ void AdvancedFm::copy() { if( !copyFile( curFile, destFile) ) { QMessageBox::message("AdvancedFm", - tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) ); + tr( "<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); return; } } - setOtherTabCurrent(); rePopulate(); } } +void AdvancedFm::copyAsTimer() { + QTimer::singleShot(125,this,SLOT(copyAs())); +} + void AdvancedFm::copyAs() { @@ -347,5 +353,5 @@ void AdvancedFm::copyAs() { item=(*it); curFile = thisDir->canonicalPath()+"/"+(*it); - fileDlg = new InputDialog( this, tr("Copy "+curFile+" As"), TRUE, 0); + fileDlg = new InputDialog( this, tr("Copy %1 As").arg(curFile), TRUE, 0); fileDlg->setInputText((const QString &) destFile ); @@ -359,5 +365,5 @@ void AdvancedFm::copyAs() { if( f.exists()) { switch (QMessageBox::warning(this,tr("File Exists!"), - item+tr("\nexists. Ok to overwrite?"), + tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item), tr("Yes"),tr("No"),0,0,1) ) { case 0: @@ -370,6 +376,5 @@ void AdvancedFm::copyAs() { } if( !copyFile( curFile, destFile) ) { - QMessageBox::message("AdvancedFm",tr("Could not copy\n") - +curFile +tr("to\n")+destFile); + QMessageBox::message("AdvancedFm",tr("<p>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); return; } @@ -379,9 +384,13 @@ void AdvancedFm::copyAs() { } rePopulate(); - setOtherTabCurrent(); +// setOtherTabCurrent(); qApp->processEvents(); } +void AdvancedFm::copySameDirTimer() { + QTimer::singleShot(125,this,SLOT(copySameDir())); +} + void AdvancedFm::copySameDir() { qApp->processEvents(); @@ -408,5 +417,5 @@ void AdvancedFm::copySameDir() { if( f.exists()) { switch (QMessageBox::warning(this,tr("Delete"), - destFile+tr(" already exists.\nDo you really want to delete it?"), + tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile), tr("Yes"),tr("No"),0,0,1) ) { case 0: @@ -420,6 +429,5 @@ void AdvancedFm::copySameDir() { } if(!copyFile( curFile,destFile) ) { - QMessageBox::message("AdvancedFm",tr("Could not copy\n") - +curFile +tr("to\n")+destFile); + QMessageBox::message("AdvancedFm",tr("<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); return; } @@ -432,6 +440,9 @@ void AdvancedFm::copySameDir() { } +void AdvancedFm::moveTimer() { + QTimer::singleShot(125,this,SLOT(move())); +} + void AdvancedFm::move() { - qApp->processEvents(); QStringList curFileList = getPath(); @@ -461,5 +472,4 @@ void AdvancedFm::move() { return; } - QFile f( curFile); if( f.exists()) { @@ -474,5 +484,5 @@ void AdvancedFm::move() { } rePopulate(); - setOtherTabCurrent(); +// setOtherTabCurrent(); } @@ -507,10 +517,8 @@ bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) { bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { - - if(QFileInfo(src).isDir()) { if( copyDirectory( src, dest )) { - setOtherTabCurrent(); - populateView(); +// setOtherTabCurrent(); + rePopulate(); return true; } @@ -709,9 +717,7 @@ void AdvancedFm::startProcess(const QString & cmd) { OProcess *process; process = new OProcess(); - connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), - this, SLOT( processEnded(Opie::Core::OProcess*))); + connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(Opie::Core::OProcess*))); - connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); + connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); command << "/bin/sh"; @@ -755,11 +761,11 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { if ( o->inherits( "QListView" ) ) { if ( e->type() == QEvent::FocusIn ) { - if( o == Local_View) { //keep track of which view - qDebug("local view"); - whichTab = 1; - } else { - whichTab = 2; - qDebug("remote view"); - } +// if( o == Local_View) { //keep track of which view +// qDebug("local view"); +// whichTab = 1; +// } else { +// whichTab = 2; +// qDebug("remote view"); +// } } OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection @@ -790,5 +796,4 @@ void AdvancedFm::doRename(QListView * view) { r = QRect( view->viewportToContents( r.topLeft() ), r.size() ); r.setX( view->contentsX() ); - if ( r.width() > view->visibleWidth() ) r.setWidth( view->visibleWidth() ); @@ -796,16 +801,10 @@ void AdvancedFm::doRename(QListView * view) { renameBox = new QLineEdit( view->viewport(), "qt_renamebox" ); renameBox->setFrame(true); - renameBox->setText( view->currentItem()->text(0) ); - renameBox->selectAll(); renameBox->installEventFilter( this ); - view->addChild( renameBox, r.x(), r.y() ); - renameBox->resize( r.size() ); - view->viewport()->setFocusProxy( renameBox ); - renameBox->setFocus(); renameBox->show(); |