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 @@ -273,4 +273,7 @@ void AdvancedFm::upDir() { +void AdvancedFm::copyTimer() { + QTimer::singleShot(125,this,SLOT(copy())); +} + void AdvancedFm::copy() { - qApp->processEvents(); QStringList curFileList = getPath(); @@ -314,3 +317,3 @@ void AdvancedFm::copy() { 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) ) { @@ -326,3 +329,3 @@ void AdvancedFm::copy() { 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; @@ -330,3 +333,2 @@ void AdvancedFm::copy() { } - setOtherTabCurrent(); rePopulate(); @@ -335,2 +337,6 @@ void AdvancedFm::copy() { +void AdvancedFm::copyAsTimer() { + QTimer::singleShot(125,this,SLOT(copyAs())); +} + void AdvancedFm::copyAs() { @@ -348,3 +354,3 @@ void AdvancedFm::copyAs() { 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); @@ -360,3 +366,3 @@ void AdvancedFm::copyAs() { 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) ) { @@ -371,4 +377,3 @@ 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; @@ -380,3 +385,3 @@ void AdvancedFm::copyAs() { rePopulate(); - setOtherTabCurrent(); +// setOtherTabCurrent(); qApp->processEvents(); @@ -385,2 +390,6 @@ void AdvancedFm::copyAs() { +void AdvancedFm::copySameDirTimer() { + QTimer::singleShot(125,this,SLOT(copySameDir())); +} + void AdvancedFm::copySameDir() { @@ -409,3 +418,3 @@ void AdvancedFm::copySameDir() { 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) ) { @@ -421,4 +430,3 @@ 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; @@ -433,4 +441,7 @@ void AdvancedFm::copySameDir() { +void AdvancedFm::moveTimer() { + QTimer::singleShot(125,this,SLOT(move())); +} + void AdvancedFm::move() { - qApp->processEvents(); @@ -462,3 +473,2 @@ void AdvancedFm::move() { } - QFile f( curFile); @@ -475,3 +485,3 @@ void AdvancedFm::move() { rePopulate(); - setOtherTabCurrent(); +// setOtherTabCurrent(); } @@ -508,8 +518,6 @@ 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; @@ -710,7 +718,5 @@ void AdvancedFm::startProcess(const QString & cmd) { 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))); @@ -756,9 +762,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { 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"); +// } } @@ -791,3 +797,2 @@ void AdvancedFm::doRename(QListView * view) { r.setX( view->contentsX() ); - if ( r.width() > view->visibleWidth() ) @@ -797,14 +802,8 @@ void AdvancedFm::doRename(QListView * view) { 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(); |