summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfmMenu.cpp
authorllornkcor <llornkcor>2004-09-25 01:51:26 (UTC)
committer llornkcor <llornkcor>2004-09-25 01:51:26 (UTC)
commit40e681bf20db4f1e02212ae6e42a349ee000cf14 (patch) (unidiff)
tree86eea5377011775ff87ca50e1fd125ff8f30622f /noncore/apps/advancedfm/advancedfmMenu.cpp
parent0fe000754035c737ff0de97e5b2bd2cf03c16337 (diff)
downloadopie-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.cpp73
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() {
273 273
274void AdvancedFm::copyTimer() {
275 QTimer::singleShot(125,this,SLOT(copy()));
276}
277
274void AdvancedFm::copy() { 278void AdvancedFm::copy() {
275 qApp->processEvents();
276 QStringList curFileList = getPath(); 279 QStringList curFileList = getPath();
@@ -314,3 +317,3 @@ void AdvancedFm::copy() {
314 switch ( QMessageBox::warning(this,tr("File Exists!"), 317 switch ( QMessageBox::warning(this,tr("File Exists!"),
315 tr("%1 exists. Ok to overwrite?").arg( item ), 318 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item),
316 tr("Yes"),tr("No"),0,0,1) ) { 319 tr("Yes"),tr("No"),0,0,1) ) {
@@ -326,3 +329,3 @@ void AdvancedFm::copy() {
326 QMessageBox::message("AdvancedFm", 329 QMessageBox::message("AdvancedFm",
327 tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) ); 330 tr( "<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
328 return; 331 return;
@@ -330,3 +333,2 @@ void AdvancedFm::copy() {
330 } 333 }
331 setOtherTabCurrent();
332 rePopulate(); 334 rePopulate();
@@ -335,2 +337,6 @@ void AdvancedFm::copy() {
335 337
338void AdvancedFm::copyAsTimer() {
339 QTimer::singleShot(125,this,SLOT(copyAs()));
340}
341
336void AdvancedFm::copyAs() { 342void AdvancedFm::copyAs() {
@@ -348,3 +354,3 @@ void AdvancedFm::copyAs() {
348 curFile = thisDir->canonicalPath()+"/"+(*it); 354 curFile = thisDir->canonicalPath()+"/"+(*it);
349 fileDlg = new InputDialog( this, tr("Copy "+curFile+" As"), TRUE, 0); 355 fileDlg = new InputDialog( this, tr("Copy %1 As").arg(curFile), TRUE, 0);
350 356
@@ -360,3 +366,3 @@ void AdvancedFm::copyAs() {
360 switch (QMessageBox::warning(this,tr("File Exists!"), 366 switch (QMessageBox::warning(this,tr("File Exists!"),
361 item+tr("\nexists. Ok to overwrite?"), 367 tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item),
362 tr("Yes"),tr("No"),0,0,1) ) { 368 tr("Yes"),tr("No"),0,0,1) ) {
@@ -371,4 +377,3 @@ void AdvancedFm::copyAs() {
371 if( !copyFile( curFile, destFile) ) { 377 if( !copyFile( curFile, destFile) ) {
372 QMessageBox::message("AdvancedFm",tr("Could not copy\n") 378 QMessageBox::message("AdvancedFm",tr("<p>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
373 +curFile +tr("to\n")+destFile);
374 return; 379 return;
@@ -380,3 +385,3 @@ void AdvancedFm::copyAs() {
380 rePopulate(); 385 rePopulate();
381 setOtherTabCurrent(); 386 // setOtherTabCurrent();
382 qApp->processEvents(); 387 qApp->processEvents();
@@ -385,2 +390,6 @@ void AdvancedFm::copyAs() {
385 390
391void AdvancedFm::copySameDirTimer() {
392 QTimer::singleShot(125,this,SLOT(copySameDir()));
393}
394
386void AdvancedFm::copySameDir() { 395void AdvancedFm::copySameDir() {
@@ -409,3 +418,3 @@ void AdvancedFm::copySameDir() {
409 switch (QMessageBox::warning(this,tr("Delete"), 418 switch (QMessageBox::warning(this,tr("Delete"),
410 destFile+tr(" already exists.\nDo you really want to delete it?"), 419 tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile),
411 tr("Yes"),tr("No"),0,0,1) ) { 420 tr("Yes"),tr("No"),0,0,1) ) {
@@ -421,4 +430,3 @@ void AdvancedFm::copySameDir() {
421 if(!copyFile( curFile,destFile) ) { 430 if(!copyFile( curFile,destFile) ) {
422 QMessageBox::message("AdvancedFm",tr("Could not copy\n") 431 QMessageBox::message("AdvancedFm",tr("<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
423 +curFile +tr("to\n")+destFile);
424 return; 432 return;
@@ -433,4 +441,7 @@ void AdvancedFm::copySameDir() {
433 441
442void AdvancedFm::moveTimer() {
443 QTimer::singleShot(125,this,SLOT(move()));
444}
445
434void AdvancedFm::move() { 446void AdvancedFm::move() {
435 qApp->processEvents();
436 447
@@ -462,3 +473,2 @@ void AdvancedFm::move() {
462 } 473 }
463
464 QFile f( curFile); 474 QFile f( curFile);
@@ -475,3 +485,3 @@ void AdvancedFm::move() {
475 rePopulate(); 485 rePopulate();
476 setOtherTabCurrent(); 486 //setOtherTabCurrent();
477} 487}
@@ -508,8 +518,6 @@ bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) {
508bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { 518bool AdvancedFm::copyFile( const QString & src, const QString & dest ) {
509
510
511 if(QFileInfo(src).isDir()) { 519 if(QFileInfo(src).isDir()) {
512 if( copyDirectory( src, dest )) { 520 if( copyDirectory( src, dest )) {
513 setOtherTabCurrent(); 521 // setOtherTabCurrent();
514 populateView(); 522 rePopulate();
515 return true; 523 return true;
@@ -710,7 +718,5 @@ void AdvancedFm::startProcess(const QString & cmd) {
710 process = new OProcess(); 718 process = new OProcess();
711 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), 719 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processEnded(Opie::Core::OProcess*)));
712 this, SLOT( processEnded(Opie::Core::OProcess*)));
713 720
714 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), 721 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
715 this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
716 722
@@ -756,9 +762,9 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
756 if ( e->type() == QEvent::FocusIn ) { 762 if ( e->type() == QEvent::FocusIn ) {
757 if( o == Local_View) { //keep track of which view 763// if( o == Local_View) { //keep track of which view
758 qDebug("local view"); 764 // qDebug("local view");
759 whichTab = 1; 765// whichTab = 1;
760 } else { 766// } else {
761 whichTab = 2; 767// whichTab = 2;
762 qDebug("remote view"); 768 // qDebug("remote view");
763 } 769// }
764 } 770 }
@@ -791,3 +797,2 @@ void AdvancedFm::doRename(QListView * view) {
791 r.setX( view->contentsX() ); 797 r.setX( view->contentsX() );
792
793 if ( r.width() > view->visibleWidth() ) 798 if ( r.width() > view->visibleWidth() )
@@ -797,14 +802,8 @@ void AdvancedFm::doRename(QListView * view) {
797 renameBox->setFrame(true); 802 renameBox->setFrame(true);
798
799 renameBox->setText( view->currentItem()->text(0) ); 803 renameBox->setText( view->currentItem()->text(0) );
800
801 renameBox->selectAll(); 804 renameBox->selectAll();
802 renameBox->installEventFilter( this ); 805 renameBox->installEventFilter( this );
803
804 view->addChild( renameBox, r.x(), r.y() ); 806 view->addChild( renameBox, r.x(), r.y() );
805
806 renameBox->resize( r.size() ); 807 renameBox->resize( r.size() );
807
808 view->viewport()->setFocusProxy( renameBox ); 808 view->viewport()->setFocusProxy( renameBox );
809
810 renameBox->setFocus(); 809 renameBox->setFocus();