summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-12-27 10:59:15 (UTC)
committer cniehaus <cniehaus>2002-12-27 10:59:15 (UTC)
commit6ca8a429b121dbbdbbfbde453cd2cd1412315aa8 (patch) (unidiff)
treea3b824d3c9b574fb43a554a43f1d21de3eb7bb83
parent3565b57b9346db47693287162c5794a4d4d8b568 (diff)
downloadopie-6ca8a429b121dbbdbbfbde453cd2cd1412315aa8.zip
opie-6ca8a429b121dbbdbbfbde453cd2cd1412315aa8.tar.gz
opie-6ca8a429b121dbbdbbfbde453cd2cd1412315aa8.tar.bz2
i18n fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index a6b59c7..98d024d 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -361,268 +361,266 @@ void AdvancedFm::localRename() {
361void AdvancedFm::remoteRename() 361void AdvancedFm::remoteRename()
362{ 362{
363 QString curFile = Remote_View->currentItem()->text(0); 363 QString curFile = Remote_View->currentItem()->text(0);
364 if( curFile !="../") { 364 if( curFile !="../") {
365 InputDialog *fileDlg; 365 InputDialog *fileDlg;
366 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); 366 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
367 fileDlg->setInputText((const QString &)curFile); 367 fileDlg->setInputText((const QString &)curFile);
368 fileDlg->exec(); 368 fileDlg->exec();
369 if( fileDlg->result() == 1 ) { 369 if( fileDlg->result() == 1 ) {
370 QString oldname = currentRemoteDir.canonicalPath() + "/" + curFile; 370 QString oldname = currentRemoteDir.canonicalPath() + "/" + curFile;
371 QString newName = currentRemoteDir.canonicalPath() + "/" + fileDlg->LineEdit1->text(); 371 QString newName = currentRemoteDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();
372//+".playlist"; 372//+".playlist";
373 if( rename(oldname.latin1(), newName.latin1())== -1) 373 if( rename(oldname.latin1(), newName.latin1())== -1)
374 QMessageBox::message(tr("Note"),tr("Could not rename")); 374 QMessageBox::message(tr("Note"),tr("Could not rename"));
375 } 375 }
376 populateRemoteView(); 376 populateRemoteView();
377 } 377 }
378} 378}
379 379
380 380
381void AdvancedFm::filePerms() { 381void AdvancedFm::filePerms() {
382 382
383 QStringList curFileList = getPath(); 383 QStringList curFileList = getPath();
384 QString filePath; 384 QString filePath;
385 385
386 if (TabWidget->getCurrentTab() == 0) { 386 if (TabWidget->getCurrentTab() == 0) {
387 filePath = currentDir.canonicalPath()+"/"; 387 filePath = currentDir.canonicalPath()+"/";
388 } else { 388 } else {
389 filePath= currentRemoteDir.canonicalPath()+"/"; 389 filePath= currentRemoteDir.canonicalPath()+"/";
390 } 390 }
391 391
392 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 392 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
393 filePermissions *filePerm; 393 filePermissions *filePerm;
394 filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it)); 394 filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it));
395 filePerm->showMaximized(); 395 filePerm->showMaximized();
396 filePerm->exec(); 396 filePerm->exec();
397 if( filePerm) 397 if( filePerm)
398 delete filePerm; 398 delete filePerm;
399 } 399 }
400 if (TabWidget->getCurrentTab() == 0) { 400 if (TabWidget->getCurrentTab() == 0) {
401 populateLocalView(); 401 populateLocalView();
402 } else { 402 } else {
403 populateRemoteView(); 403 populateRemoteView();
404 } 404 }
405} 405}
406 406
407void AdvancedFm::doProperties() { 407void AdvancedFm::doProperties() {
408#if defined(QT_QWS_OPIE) 408#if defined(QT_QWS_OPIE)
409 409
410 QStringList curFileList = getPath(); 410 QStringList curFileList = getPath();
411 411
412 QString filePath; 412 QString filePath;
413 if (TabWidget->getCurrentTab() == 0) { 413 if (TabWidget->getCurrentTab() == 0) {
414 filePath = currentDir.canonicalPath()+"/"; 414 filePath = currentDir.canonicalPath()+"/";
415 } else { 415 } else {
416 filePath= currentRemoteDir.canonicalPath()+"/"; 416 filePath= currentRemoteDir.canonicalPath()+"/";
417 } 417 }
418 qDebug("%d",curFileList.count()); 418 qDebug("%d",curFileList.count());
419 419
420 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 420 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
421 qDebug((filePath+*it)); 421 qDebug((filePath+*it));
422 DocLnk lnk( (filePath+*it)); 422 DocLnk lnk( (filePath+*it));
423 LnkProperties prop( &lnk ); 423 LnkProperties prop( &lnk );
424 prop.showMaximized(); 424 prop.showMaximized();
425 prop.exec(); 425 prop.exec();
426 } 426 }
427#endif 427#endif
428 428
429} 429}
430 430
431void AdvancedFm::upDir() { 431void AdvancedFm::upDir() {
432 if (TabWidget->getCurrentTab() == 0) { 432 if (TabWidget->getCurrentTab() == 0) {
433 QString current = currentDir.canonicalPath(); 433 QString current = currentDir.canonicalPath();
434 QDir dir(current); 434 QDir dir(current);
435 dir.cdUp(); 435 dir.cdUp();
436 current = dir.canonicalPath(); 436 current = dir.canonicalPath();
437 chdir( current.latin1() ); 437 chdir( current.latin1() );
438 currentDir.cd( current, TRUE); 438 currentDir.cd( current, TRUE);
439 populateLocalView(); 439 populateLocalView();
440 update(); 440 update();
441 } else { 441 } else {
442 QString current = currentRemoteDir.canonicalPath(); 442 QString current = currentRemoteDir.canonicalPath();
443 QDir dir(current); 443 QDir dir(current);
444 dir.cdUp(); 444 dir.cdUp();
445 current = dir.canonicalPath(); 445 current = dir.canonicalPath();
446 chdir( current.latin1() ); 446 chdir( current.latin1() );
447 currentRemoteDir.cd( current, TRUE); 447 currentRemoteDir.cd( current, TRUE);
448 populateRemoteView(); 448 populateRemoteView();
449 update(); 449 update();
450 } 450 }
451} 451}
452 452
453void AdvancedFm::copy() { 453void AdvancedFm::copy() {
454 qApp->processEvents(); 454 qApp->processEvents();
455 QStringList curFileList = getPath(); 455 QStringList curFileList = getPath();
456 bool doMsg=true; 456 bool doMsg=true;
457 int count=curFileList.count(); 457 int count=curFileList.count();
458 if( count > 0) { 458 if( count > 0) {
459 if(count > 1 ){ 459 if(count > 1 ){
460 QString msg; 460 QString msg;
461 msg=tr("Really copy\n%1 files?").arg(count); 461 msg=tr("Really copy\n%1 files?").arg(count);
462 switch ( QMessageBox::warning(this,tr("Delete"),msg 462 switch ( QMessageBox::warning(this,tr("Delete"),msg
463 ,tr("Yes"),tr("No"),0,0,1) ) { 463 ,tr("Yes"),tr("No"),0,0,1) ) {
464 case 0: 464 case 0:
465 doMsg=false; 465 doMsg=false;
466 break; 466 break;
467 case 1: 467 case 1:
468 return; 468 return;
469 break; 469 break;
470 }; 470 };
471 } 471 }
472 472
473 QString curFile, item, destFile; 473 QString curFile, item, destFile;
474 if (TabWidget->getCurrentTab() == 0) { 474 if (TabWidget->getCurrentTab() == 0) {
475 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 475 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
476 item=(*it); 476 item=(*it);
477 if(item.find("->",0,TRUE)) //symlink 477 if(item.find("->",0,TRUE)) //symlink
478 item = item.left(item.find("->",0,TRUE)); 478 item = item.left(item.find("->",0,TRUE));
479 479
480 destFile = currentRemoteDir.canonicalPath()+"/"+ item; 480 destFile = currentRemoteDir.canonicalPath()+"/"+ item;
481 qDebug("Destination file is "+destFile); 481 qDebug("Destination file is "+destFile);
482 482
483 curFile = currentDir.canonicalPath()+"/"+ item; 483 curFile = currentDir.canonicalPath()+"/"+ item;
484 qDebug("CurrentFile file is " + curFile); 484 qDebug("CurrentFile file is " + curFile);
485 485
486 QFile f(destFile); 486 QFile f(destFile);
487 if( f.exists()) { 487 if( f.exists()) {
488 if(doMsg) { 488 if(doMsg) {
489 switch ( QMessageBox::warning(this,tr("File Exists!"), 489 switch ( QMessageBox::warning(this,tr("File Exists!"), tr("%1 exists. Ok to overwrite?").arg( item ), tr("Yes"),tr("No"),0,0,1) ) {
490 item+tr("\nexists. Ok to overwrite?"),
491 tr("Yes"),tr("No"),0,0,1) ) {
492 case 1: 490 case 1:
493 return; 491 return;
494 break; 492 break;
495 }; 493 };
496 } 494 }
497 f.remove(); 495 f.remove();
498 } 496 }
499 if(!copyFile( curFile, destFile) ) { 497 if(!copyFile( curFile, destFile) ) {
500 QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); 498 QMessageBox::message("AdvancedFm",tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) );
501 return; 499 return;
502 } 500 }
503 } 501 }
504 populateRemoteView(); 502 populateRemoteView();
505 TabWidget->setCurrentTab(1); 503 TabWidget->setCurrentTab(1);
506 504
507 } else { 505 } else {
508 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 506 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
509 item= (*it); 507 item= (*it);
510 if(item.find("->",0,TRUE)) //symlink 508 if(item.find("->",0,TRUE)) //symlink
511 item = item.left(item.find("->",0,TRUE)); 509 item = item.left(item.find("->",0,TRUE));
512 510
513 destFile = currentDir.canonicalPath()+"/"+ item; 511 destFile = currentDir.canonicalPath()+"/"+ item;
514 qDebug("Destination file is "+destFile); 512 qDebug("Destination file is "+destFile);
515 513
516 curFile = currentRemoteDir.canonicalPath()+"/"+ item;; 514 curFile = currentRemoteDir.canonicalPath()+"/"+ item;;
517 qDebug("CurrentFile file is " + curFile); 515 qDebug("CurrentFile file is " + curFile);
518 516
519 QFile f(destFile); 517 QFile f(destFile);
520 if( f.exists()) { 518 if( f.exists()) {
521 switch ( QMessageBox::warning(this,tr("File Exists!"), 519 switch ( QMessageBox::warning(this,tr("File Exists!"),
522 item+tr("\nexists. Ok to overwrite?"), 520 item+tr("\nexists. Ok to overwrite?"),
523 tr("Yes"),tr("No"),0,0,1) ) { 521 tr("Yes"),tr("No"),0,0,1) ) {
524 case 1: 522 case 1:
525 return; 523 return;
526 break; 524 break;
527 }; 525 };
528 f.remove(); 526 f.remove();
529 } 527 }
530 if(!copyFile( curFile, destFile) ) { 528 if(!copyFile( curFile, destFile) ) {
531 QMessageBox::message("AdvancedFm",tr("Could not copy\n") 529 QMessageBox::message("AdvancedFm",tr("Could not copy\n")
532 +curFile +tr("to\n")+destFile); 530 +curFile +tr("to\n")+destFile);
533 return; 531 return;
534 532
535 } 533 }
536 } 534 }
537 populateLocalView(); 535 populateLocalView();
538 TabWidget->setCurrentTab(0); 536 TabWidget->setCurrentTab(0);
539 } 537 }
540 538
541 } 539 }
542} 540}
543 541
544void AdvancedFm::copyAs() { 542void AdvancedFm::copyAs() {
545 qApp->processEvents(); 543 qApp->processEvents();
546 544
547 QStringList curFileList = getPath(); 545 QStringList curFileList = getPath();
548 QString curFile, item; 546 QString curFile, item;
549 InputDialog *fileDlg; 547 InputDialog *fileDlg;
550 if (TabWidget->getCurrentTab() == 0) { 548 if (TabWidget->getCurrentTab() == 0) {
551 qDebug("tab 1"); 549 qDebug("tab 1");
552 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 550 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
553 QString destFile; 551 QString destFile;
554 item=(*it); 552 item=(*it);
555 curFile = currentDir.canonicalPath()+"/"+(*it); 553 curFile = currentDir.canonicalPath()+"/"+(*it);
556 fileDlg = new InputDialog( this,tr("Copy "+curFile+" As"), TRUE, 0); 554 fileDlg = new InputDialog( this,tr("Copy "+curFile+" As"), TRUE, 0);
557 555
558 fileDlg->setInputText((const QString &) destFile ); 556 fileDlg->setInputText((const QString &) destFile );
559 fileDlg->exec(); 557 fileDlg->exec();
560 558
561 if( fileDlg->result() == 1 ) { 559 if( fileDlg->result() == 1 ) {
562 QString filename = fileDlg->LineEdit1->text(); 560 QString filename = fileDlg->LineEdit1->text();
563 destFile = currentRemoteDir.canonicalPath()+"/"+filename; 561 destFile = currentRemoteDir.canonicalPath()+"/"+filename;
564 562
565 QFile f(destFile); 563 QFile f(destFile);
566 if( f.exists()) { 564 if( f.exists()) {
567 switch (QMessageBox::warning(this,tr("File Exists!"), 565 switch (QMessageBox::warning(this,tr("File Exists!"),
568 item+tr("\nexists. Ok to overwrite?"), 566 item+tr("\nexists. Ok to overwrite?"),
569 tr("Yes"),tr("No"),0,0,1) ) { 567 tr("Yes"),tr("No"),0,0,1) ) {
570 case 0: 568 case 0:
571 f.remove(); 569 f.remove();
572 break; 570 break;
573 case 1: 571 case 1:
574 return; 572 return;
575 break; 573 break;
576 }; 574 };
577 } 575 }
578 if(!copyFile( curFile,destFile) ) { 576 if(!copyFile( curFile,destFile) ) {
579 QMessageBox::message("AdvancedFm",tr("Could not copy\n") 577 QMessageBox::message("AdvancedFm",tr("Could not copy\n")
580 +curFile +tr("to\n")+destFile); 578 +curFile +tr("to\n")+destFile);
581 return; 579 return;
582 } 580 }
583 } 581 }
584 delete fileDlg; 582 delete fileDlg;
585 583
586 } 584 }
587 populateRemoteView(); 585 populateRemoteView();
588 TabWidget->setCurrentTab(1); 586 TabWidget->setCurrentTab(1);
589 587
590 } else { 588 } else {
591 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 589 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
592 590
593 item=(*it); 591 item=(*it);
594 curFile = currentRemoteDir.canonicalPath()+"/"+(*it); 592 curFile = currentRemoteDir.canonicalPath()+"/"+(*it);
595 fileDlg = new InputDialog( this,tr("Copy "+curFile+" As"), TRUE, 0); 593 fileDlg = new InputDialog( this,tr("Copy "+curFile+" As"), TRUE, 0);
596 594
597 QString destFile; 595 QString destFile;
598 fileDlg->setInputText((const QString &) destFile); 596 fileDlg->setInputText((const QString &) destFile);
599 fileDlg->exec(); 597 fileDlg->exec();
600 598
601 if( fileDlg->result() == 1 ) { 599 if( fileDlg->result() == 1 ) {
602 QString filename = fileDlg->LineEdit1->text(); 600 QString filename = fileDlg->LineEdit1->text();
603 destFile = currentDir.canonicalPath()+"/"+filename; 601 destFile = currentDir.canonicalPath()+"/"+filename;
604 602
605 QFile f( destFile); 603 QFile f( destFile);
606 if( f.exists()) { 604 if( f.exists()) {
607 switch ( QMessageBox::warning(this,tr("File Exists!"), 605 switch ( QMessageBox::warning(this,tr("File Exists!"),
608 item+tr("\nexists. Ok to overwrite?"), 606 item+tr("\nexists. Ok to overwrite?"),
609 tr("Yes"),tr("No"),0,0,1) ) { 607 tr("Yes"),tr("No"),0,0,1) ) {
610 case 0: 608 case 0:
611 f.remove(); 609 f.remove();
612 break; 610 break;
613 case 1: 611 case 1:
614 return; 612 return;
615 break; 613 break;
616 }; 614 };
617 } 615 }
618 if(!copyFile( curFile,destFile) ) { 616 if(!copyFile( curFile,destFile) ) {
619 QMessageBox::message("AdvancedFm",tr("Could not copy\n") 617 QMessageBox::message("AdvancedFm",tr("Could not copy\n")
620 +curFile +tr("to\n")+destFile); 618 +curFile +tr("to\n")+destFile);
621 return; 619 return;
622 } 620 }
623 621
624 } 622 }
625 delete fileDlg; 623 delete fileDlg;
626 624
627 } 625 }
628 populateLocalView(); 626 populateLocalView();