summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfmMenu.cpp
Unidiff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmMenu.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp8
1 files changed, 5 insertions, 3 deletions
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
@@ -325,25 +325,24 @@ void AdvancedFm::copy() {
325 if( !copyFile( curFile, destFile) ) { 325 if( !copyFile( curFile, destFile) ) {
326 QMessageBox::message("AdvancedFm", 326 QMessageBox::message("AdvancedFm",
327 tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) ); 327 tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) );
328 return; 328 return;
329 } 329 }
330 } 330 }
331 setOtherTabCurrent(); 331 setOtherTabCurrent();
332 rePopulate(); 332 rePopulate();
333 } 333 }
334} 334}
335 335
336void AdvancedFm::copyAs() { 336void AdvancedFm::copyAs() {
337 qApp->processEvents();
338 337
339 QStringList curFileList = getPath(); 338 QStringList curFileList = getPath();
340 QString curFile, item; 339 QString curFile, item;
341 InputDialog *fileDlg; 340 InputDialog *fileDlg;
342 341
343 QDir *thisDir = CurrentDir(); 342 QDir *thisDir = CurrentDir();
344 QDir *thatDir = OtherDir(); 343 QDir *thatDir = OtherDir();
345 344
346 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 345 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
347 QString destFile; 346 QString destFile;
348 item=(*it); 347 item=(*it);
349 curFile = thisDir->canonicalPath()+"/"+(*it); 348 curFile = thisDir->canonicalPath()+"/"+(*it);
@@ -371,24 +370,26 @@ void AdvancedFm::copyAs() {
371 } 370 }
372 if( !copyFile( curFile, destFile) ) { 371 if( !copyFile( curFile, destFile) ) {
373 QMessageBox::message("AdvancedFm",tr("Could not copy\n") 372 QMessageBox::message("AdvancedFm",tr("Could not copy\n")
374 +curFile +tr("to\n")+destFile); 373 +curFile +tr("to\n")+destFile);
375 return; 374 return;
376 } 375 }
377 } 376 }
378 delete fileDlg; 377 delete fileDlg;
379 378
380 } 379 }
381 rePopulate(); 380 rePopulate();
382 setOtherTabCurrent(); 381 setOtherTabCurrent();
382 qApp->processEvents();
383
383} 384}
384 385
385void AdvancedFm::copySameDir() { 386void AdvancedFm::copySameDir() {
386 qApp->processEvents(); 387 qApp->processEvents();
387 QStringList curFileList = getPath(); 388 QStringList curFileList = getPath();
388 QString curFile, item, destFile; 389 QString curFile, item, destFile;
389 InputDialog *fileDlg; 390 InputDialog *fileDlg;
390 391
391 QDir *thisDir = CurrentDir(); 392 QDir *thisDir = CurrentDir();
392 393
393 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 394 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
394 item=(*it); 395 item=(*it);
@@ -745,28 +746,29 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
745 cancelRename(); 746 cancelRename();
746 return true; 747 return true;
747 } 748 }
748 } 749 }
749 else if ( e->type() == QEvent::FocusOut ) { 750 else if ( e->type() == QEvent::FocusOut ) {
750 cancelRename(); 751 cancelRename();
751 return true; 752 return true;
752 } 753 }
753 } 754 }
754 if ( o->inherits( "QListView" ) ) { 755 if ( o->inherits( "QListView" ) ) {
755 if ( e->type() == QEvent::FocusIn ) { 756 if ( e->type() == QEvent::FocusIn ) {
756 if( o == Local_View) { //keep track of which view 757 if( o == Local_View) { //keep track of which view
758 qDebug("local view");
757 whichTab=1; 759 whichTab=1;
758 } 760 } else {
759 else {
760 whichTab=2; 761 whichTab=2;
762 qDebug("remote view");
761 } 763 }
762 } 764 }
763 OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection 765 OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection
764 } 766 }
765 767
766 return QWidget::eventFilter( o, e ); 768 return QWidget::eventFilter( o, e );
767} 769}
768 770
769 771
770void AdvancedFm::cancelRename() { 772void AdvancedFm::cancelRename() {
771// odebug << "cancel rename" << oendl; 773// odebug << "cancel rename" << oendl;
772 QListView * view; 774 QListView * view;