author | kergoth <kergoth> | 2002-05-15 16:44:53 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-05-15 16:44:53 (UTC) |
commit | aa5d79399aa991aa84eb8b4f48d55202473990ef (patch) (unidiff) | |
tree | dda2b43b5ad001435175cce1ec943df21ef63c43 | |
parent | 7844e2aebcb289f55bf10f22ea1250773c8ad7bd (diff) | |
download | opie-aa5d79399aa991aa84eb8b4f48d55202473990ef.zip opie-aa5d79399aa991aa84eb8b4f48d55202473990ef.tar.gz opie-aa5d79399aa991aa84eb8b4f48d55202473990ef.tar.bz2 |
hmm, we dont need the same things in here twice. Compiles again.
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp index 7dabdb6..d16e771 100644 --- a/noncore/unsupported/filebrowser/filebrowser.cpp +++ b/noncore/unsupported/filebrowser/filebrowser.cpp | |||
@@ -448,211 +448,192 @@ void FileView::paste() | |||
448 | dest.sprintf( "%s/Copy (%d) of %s", (const char *) cd, i++, | 448 | dest.sprintf( "%s/Copy (%d) of %s", (const char *) cd, i++, |
449 | (const char *) basename ); | 449 | (const char *) basename ); |
450 | } | 450 | } |
451 | } | 451 | } |
452 | 452 | ||
453 | // | 453 | // |
454 | // Copy a directory recursively using the "cp" command - | 454 | // Copy a directory recursively using the "cp" command - |
455 | // may have to be changed | 455 | // may have to be changed |
456 | // | 456 | // |
457 | if( QFileInfo( (*it) ).isDir() ){ | 457 | if( QFileInfo( (*it) ).isDir() ){ |
458 | cmd = "/bin/cp -fpR \"" + (*it) +"\" " + "\"" + dest + "\""; | 458 | cmd = "/bin/cp -fpR \"" + (*it) +"\" " + "\"" + dest + "\""; |
459 | err = system( (const char *) cmd ); | 459 | err = system( (const char *) cmd ); |
460 | } else if( !copyFile( dest, (*it) ) ){ | 460 | } else if( !copyFile( dest, (*it) ) ){ |
461 | err = -1; | 461 | err = -1; |
462 | } else { | 462 | } else { |
463 | err = 0; | 463 | err = 0; |
464 | } | 464 | } |
465 | 465 | ||
466 | if ( err != 0 ) { | 466 | if ( err != 0 ) { |
467 | QMessageBox::warning( this, tr("Paste file"), tr("Paste failed!"), | 467 | QMessageBox::warning( this, tr("Paste file"), tr("Paste failed!"), |
468 | tr("Ok") ); | 468 | tr("Ok") ); |
469 | break; | 469 | break; |
470 | } else { | 470 | } else { |
471 | updateDir(); | 471 | updateDir(); |
472 | QListViewItem * i = firstChild(); | 472 | QListViewItem * i = firstChild(); |
473 | basename = dest.mid( dest.findRev("/") + 1, dest.length() ); | 473 | basename = dest.mid( dest.findRev("/") + 1, dest.length() ); |
474 | 474 | ||
475 | while( i ){ | 475 | while( i ){ |
476 | if( i->text(0) == basename ){ | 476 | if( i->text(0) == basename ){ |
477 | setCurrentItem( i ); | 477 | setCurrentItem( i ); |
478 | ensureItemVisible( i ); | 478 | ensureItemVisible( i ); |
479 | break; | 479 | break; |
480 | } | 480 | } |
481 | i = i->nextSibling(); | 481 | i = i->nextSibling(); |
482 | } | 482 | } |
483 | } | 483 | } |
484 | } | 484 | } |
485 | } | 485 | } |
486 | 486 | ||
487 | bool FileView::copyFile( const QString & dest, const QString & src ) | 487 | bool FileView::copyFile( const QString & dest, const QString & src ) |
488 | { | 488 | { |
489 | char bf[ 50000 ]; | 489 | char bf[ 50000 ]; |
490 | int bytesRead; | 490 | int bytesRead; |
491 | bool success = TRUE; | 491 | bool success = TRUE; |
492 | struct stat status; | 492 | struct stat status; |
493 | 493 | ||
494 | QFile s( src ); | 494 | QFile s( src ); |
495 | QFile d( dest ); | 495 | QFile d( dest ); |
496 | 496 | ||
497 | if( s.open( IO_ReadOnly | IO_Raw ) && | 497 | if( s.open( IO_ReadOnly | IO_Raw ) && |
498 | d.open( IO_WriteOnly | IO_Raw ) ) | 498 | d.open( IO_WriteOnly | IO_Raw ) ) |
499 | { | 499 | { |
500 | while( (bytesRead = s.readBlock( bf, sizeof( bf ) )) == | 500 | while( (bytesRead = s.readBlock( bf, sizeof( bf ) )) == |
501 | sizeof( bf ) ) | 501 | sizeof( bf ) ) |
502 | { | 502 | { |
503 | if( d.writeBlock( bf, sizeof( bf ) ) != sizeof( bf ) ){ | 503 | if( d.writeBlock( bf, sizeof( bf ) ) != sizeof( bf ) ){ |
504 | success = FALSE; | 504 | success = FALSE; |
505 | break; | 505 | break; |
506 | } | 506 | } |
507 | } | 507 | } |
508 | if( success && (bytesRead > 0) ){ | 508 | if( success && (bytesRead > 0) ){ |
509 | d.writeBlock( bf, bytesRead ); | 509 | d.writeBlock( bf, bytesRead ); |
510 | } | 510 | } |
511 | } else { | 511 | } else { |
512 | success = FALSE; | 512 | success = FALSE; |
513 | } | 513 | } |
514 | 514 | ||
515 | // Set file permissions | 515 | // Set file permissions |
516 | if( stat( (const char *) src, &status ) == 0 ){ | 516 | if( stat( (const char *) src, &status ) == 0 ){ |
517 | chmod( (const char *) dest, status.st_mode ); | 517 | chmod( (const char *) dest, status.st_mode ); |
518 | } | 518 | } |
519 | 519 | ||
520 | return success; | 520 | return success; |
521 | } | 521 | } |
522 | 522 | ||
523 | void FileView::cut() | 523 | void FileView::cut() |
524 | { | 524 | { |
525 | int err; | 525 | int err; |
526 | // ##### a better inmplementation might be to rename the CUT file | 526 | // ##### a better inmplementation might be to rename the CUT file |
527 | // ##### to ".QPE-FILEBROWSER-MOVING" rather than copying it. | 527 | // ##### to ".QPE-FILEBROWSER-MOVING" rather than copying it. |
528 | QString cmd, dest, basename, cd = "/tmp/qpemoving"; | 528 | QString cmd, dest, basename, cd = "/tmp/qpemoving"; |
529 | QStringList newflist; | 529 | QStringList newflist; |
530 | newflist.clear(); | 530 | newflist.clear(); |
531 | 531 | ||
532 | cmd = "rm -rf " + cd; | 532 | cmd = "rm -rf " + cd; |
533 | system ( (const char *) cmd ); | 533 | system ( (const char *) cmd ); |
534 | cmd = "mkdir " + cd; | 534 | cmd = "mkdir " + cd; |
535 | system( (const char *) cmd ); | 535 | system( (const char *) cmd ); |
536 | 536 | ||
537 | // get the names of the files to cut | 537 | // get the names of the files to cut |
538 | FileItem * item; | 538 | FileItem * item; |
539 | 539 | ||
540 | if((item = (FileItem *) firstChild()) == 0) return; | 540 | if((item = (FileItem *) firstChild()) == 0) return; |
541 | 541 | ||
542 | flist.clear(); | 542 | flist.clear(); |
543 | while( item ){ | 543 | while( item ){ |
544 | if( ite | ||
545 | // ##### a better inmplementation might be to rename the CUT file | ||
546 | // ##### to ".QPE-FILEBROWSER-MOVING" rather than copying it. | ||
547 | QString cmd, dest, basename, cd = "/tmp/qpemoving"; | ||
548 | QStringList newflist; | ||
549 | newflist.clear(); | ||
550 | |||
551 | cmd = "rm -rf " + cd; | ||
552 | system ( (const char *) cmd ); | ||
553 | cmd = "mkdir " + cd; | ||
554 | system( (const char *) cmd ); | ||
555 | |||
556 | // get the names of the files to cut | ||
557 | FileItem * item; | ||
558 | |||
559 | if((item = (FileItem *) firstChild()) == 0) return; | ||
560 | |||
561 | flist.clear(); | ||
562 | while( item ){ | ||
563 | if( item->isSelected() /*&& !item->isDir()*/ ){ | 544 | if( item->isSelected() /*&& !item->isDir()*/ ){ |
564 | flist += item->getFilePath(); | 545 | flist += item->getFilePath(); |
565 | } | 546 | } |
566 | item = (FileItem *) item->nextSibling(); | 547 | item = (FileItem *) item->nextSibling(); |
567 | } | 548 | } |
568 | 549 | ||
569 | // move these files into a tmp dir | 550 | // move these files into a tmp dir |
570 | for ( QStringList::Iterator it = flist.begin(); it != flist.end(); ++it ) { | 551 | for ( QStringList::Iterator it = flist.begin(); it != flist.end(); ++it ) { |
571 | basename = (*it).mid((*it).findRev("/") + 1, (*it).length()); | 552 | basename = (*it).mid((*it).findRev("/") + 1, (*it).length()); |
572 | 553 | ||
573 | dest = cd + "/" + basename; | 554 | dest = cd + "/" + basename; |
574 | 555 | ||
575 | newflist += dest; | 556 | newflist += dest; |
576 | 557 | ||
577 | cmd = "/bin/mv -f \"" + (*it) +"\" " + "\"" + dest + "\""; | 558 | cmd = "/bin/mv -f \"" + (*it) +"\" " + "\"" + dest + "\""; |
578 | err = system( (const char *) cmd ); | 559 | err = system( (const char *) cmd ); |
579 | 560 | ||
580 | if ( err != 0 ) { | 561 | if ( err != 0 ) { |
581 | QMessageBox::warning( this, tr("Cut file"), tr("Cut failed!"), | 562 | QMessageBox::warning( this, tr("Cut file"), tr("Cut failed!"), |
582 | tr("Ok") ); | 563 | tr("Ok") ); |
583 | break; | 564 | break; |
584 | } else { | 565 | } else { |
585 | updateDir(); | 566 | updateDir(); |
586 | QListViewItem * im = firstChild(); | 567 | QListViewItem * im = firstChild(); |
587 | basename = dest.mid( dest.findRev("/") + 1, dest.length() ); | 568 | basename = dest.mid( dest.findRev("/") + 1, dest.length() ); |
588 | 569 | ||
589 | while( im ){ | 570 | while( im ){ |
590 | if( im->text(0) == basename ){ | 571 | if( im->text(0) == basename ){ |
591 | setCurrentItem( im ); | 572 | setCurrentItem( im ); |
592 | ensureItemVisible( im ); | 573 | ensureItemVisible( im ); |
593 | break; | 574 | break; |
594 | } | 575 | } |
595 | im = im->nextSibling(); | 576 | im = im->nextSibling(); |
596 | } | 577 | } |
597 | } | 578 | } |
598 | } | 579 | } |
599 | 580 | ||
600 | // update the filelist to point to tmp dir so paste works nicely | 581 | // update the filelist to point to tmp dir so paste works nicely |
601 | flist = newflist; | 582 | flist = newflist; |
602 | } | 583 | } |
603 | 584 | ||
604 | void FileView::del() | 585 | void FileView::del() |
605 | { | 586 | { |
606 | FileItem * i; | 587 | FileItem * i; |
607 | QStringList fl; | 588 | QStringList fl; |
608 | QString cmd; | 589 | QString cmd; |
609 | int err; | 590 | int err; |
610 | 591 | ||
611 | if((i = (FileItem *) firstChild()) == 0) return; | 592 | if((i = (FileItem *) firstChild()) == 0) return; |
612 | 593 | ||
613 | while( i ){ | 594 | while( i ){ |
614 | if( i->isSelected() ){ | 595 | if( i->isSelected() ){ |
615 | fl += i->getFilePath(); | 596 | fl += i->getFilePath(); |
616 | } | 597 | } |
617 | i = (FileItem *) i->nextSibling(); | 598 | i = (FileItem *) i->nextSibling(); |
618 | } | 599 | } |
619 | if( fl.count() < 1 ) return; | 600 | if( fl.count() < 1 ) return; |
620 | 601 | ||
621 | if( QMessageBox::warning( this, tr("Delete"), tr("Are you sure?"), | 602 | if( QMessageBox::warning( this, tr("Delete"), tr("Are you sure?"), |
622 | tr("Yes"), tr("No") ) == 0) | 603 | tr("Yes"), tr("No") ) == 0) |
623 | { | 604 | { |
624 | // | 605 | // |
625 | // Dependant upon the "rm" command - will probably have to be replaced | 606 | // Dependant upon the "rm" command - will probably have to be replaced |
626 | // | 607 | // |
627 | for ( QStringList::Iterator it = fl.begin(); it != fl.end(); ++it ) { | 608 | for ( QStringList::Iterator it = fl.begin(); it != fl.end(); ++it ) { |
628 | cmd = "/bin/rm -rf \"" + (*it) + "\""; | 609 | cmd = "/bin/rm -rf \"" + (*it) + "\""; |
629 | err = system( (const char *) cmd ); | 610 | err = system( (const char *) cmd ); |
630 | if ( err != 0 ) { | 611 | if ( err != 0 ) { |
631 | QMessageBox::warning( this, tr("Delete"), tr("Delete failed!"), | 612 | QMessageBox::warning( this, tr("Delete"), tr("Delete failed!"), |
632 | tr("Ok") ); | 613 | tr("Ok") ); |
633 | break; | 614 | break; |
634 | } | 615 | } |
635 | } | 616 | } |
636 | updateDir(); | 617 | updateDir(); |
637 | } | 618 | } |
638 | } | 619 | } |
639 | 620 | ||
640 | void FileView::newFolder() | 621 | void FileView::newFolder() |
641 | { | 622 | { |
642 | int t = 1; | 623 | int t = 1; |
643 | FileItem * i; | 624 | FileItem * i; |
644 | QString nd = currentDir + "/NewFolder"; | 625 | QString nd = currentDir + "/NewFolder"; |
645 | 626 | ||
646 | while( QFile( nd ).exists() ){ | 627 | while( QFile( nd ).exists() ){ |
647 | nd.sprintf( "%s/NewFolder (%d)", (const char *) currentDir, t++ ); | 628 | nd.sprintf( "%s/NewFolder (%d)", (const char *) currentDir, t++ ); |
648 | } | 629 | } |
649 | 630 | ||
650 | if( mkdir( (const char *) nd, 0777 ) != 0){ | 631 | if( mkdir( (const char *) nd, 0777 ) != 0){ |
651 | QMessageBox::warning( this, tr( "New folder" ), | 632 | QMessageBox::warning( this, tr( "New folder" ), |
652 | tr( "Folder creation failed!" ), | 633 | tr( "Folder creation failed!" ), |
653 | tr( "Ok" ) ); | 634 | tr( "Ok" ) ); |
654 | return; | 635 | return; |
655 | } | 636 | } |
656 | updateDir(); | 637 | updateDir(); |
657 | 638 | ||
658 | if((i = (FileItem *) firstChild()) == 0) return; | 639 | if((i = (FileItem *) firstChild()) == 0) return; |
@@ -1015,115 +996,96 @@ void FileBrowser::sortType() | |||
1015 | fileView->sort(); | 996 | fileView->sort(); |
1016 | sortMenu->setItemChecked( sortMenu->idAt( 0 ), FALSE ); | 997 | sortMenu->setItemChecked( sortMenu->idAt( 0 ), FALSE ); |
1017 | sortMenu->setItemChecked( sortMenu->idAt( 1 ), FALSE ); | 998 | sortMenu->setItemChecked( sortMenu->idAt( 1 ), FALSE ); |
1018 | sortMenu->setItemChecked( sortMenu->idAt( 2 ), FALSE ); | 999 | sortMenu->setItemChecked( sortMenu->idAt( 2 ), FALSE ); |
1019 | sortMenu->setItemChecked( sortMenu->idAt( 3 ), TRUE ); | 1000 | sortMenu->setItemChecked( sortMenu->idAt( 3 ), TRUE ); |
1020 | } | 1001 | } |
1021 | 1002 | ||
1022 | void FileBrowser::updateSorting() | 1003 | void FileBrowser::updateSorting() |
1023 | { | 1004 | { |
1024 | sortMenu->setItemChecked( sortMenu->idAt( 5 ), !sortMenu->isItemChecked( sortMenu->idAt( 5 ) ) ); | 1005 | sortMenu->setItemChecked( sortMenu->idAt( 5 ), !sortMenu->isItemChecked( sortMenu->idAt( 5 ) ) ); |
1025 | 1006 | ||
1026 | if ( sortMenu->isItemChecked( sortMenu->idAt( 0 ) ) ) | 1007 | if ( sortMenu->isItemChecked( sortMenu->idAt( 0 ) ) ) |
1027 | sortName(); | 1008 | sortName(); |
1028 | else if ( sortMenu->isItemChecked( sortMenu->idAt( 1 ) ) ) | 1009 | else if ( sortMenu->isItemChecked( sortMenu->idAt( 1 ) ) ) |
1029 | sortSize(); | 1010 | sortSize(); |
1030 | else if ( sortMenu->isItemChecked( sortMenu->idAt( 2 ) ) ) | 1011 | else if ( sortMenu->isItemChecked( sortMenu->idAt( 2 ) ) ) |
1031 | sortDate(); | 1012 | sortDate(); |
1032 | else | 1013 | else |
1033 | sortType(); | 1014 | sortType(); |
1034 | } | 1015 | } |
1035 | 1016 | ||
1036 | void FileView::chPerm() { | 1017 | void FileView::chPerm() { |
1037 | FileItem * i; | 1018 | FileItem * i; |
1038 | QStringList fl; | 1019 | QStringList fl; |
1039 | QString cmd; | 1020 | QString cmd; |
1040 | 1021 | ||
1041 | if((i = (FileItem *) firstChild()) == 0) return; | 1022 | if((i = (FileItem *) firstChild()) == 0) return; |
1042 | 1023 | ||
1043 | while( i ){ | 1024 | while( i ){ |
1044 | if( i->isSelected() ){ | 1025 | if( i->isSelected() ){ |
1045 | fl += i->getFilePath(); | 1026 | fl += i->getFilePath(); |
1046 | } | 1027 | } |
1047 | i = (FileItem *) i->nextSibling(); | 1028 | i = (FileItem *) i->nextSibling(); |
1048 | } | 1029 | } |
1049 | if( fl.count() < 1 ) return; | 1030 | if( fl.count() < 1 ) return; |
1050 | if( QMessageBox::warning( this, tr("Change permissions"), tr("Are you sure?"), | 1031 | if( QMessageBox::warning( this, tr("Change permissions"), tr("Are you sure?"), |
1051 | tr("Yes"), tr("No") ) == 0) { | 1032 | tr("Yes"), tr("No") ) == 0) { |
1052 | for ( QStringList::Iterator it = fl.begin(); it != fl.end(); ++it ) { | 1033 | for ( QStringList::Iterator it = fl.begin(); it != fl.end(); ++it ) { |
1053 | filePermissions *filePerm; | 1034 | filePermissions *filePerm; |
1054 | filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(*it)); | 1035 | filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(*it)); |
1055 | filePerm->exec(); | 1036 | filePerm->exec(); |
1056 | if( filePerm) | 1037 | if( filePerm) |
1057 | delete filePerm; | 1038 | delete filePerm; |
1058 | break; | 1039 | break; |
1059 | } | 1040 | } |
1060 | updateDir(); | 1041 | updateDir(); |
1061 | } | 1042 | } |
1062 | } | 1043 | } |
1063 | 1044 | ||
1064 | void FileBrowser::updateShowHidden() | 1045 | void FileBrowser::updateShowHidden() |
1065 | { | 1046 | { |
1066 | bool valShowHidden=viewMenu->isItemChecked( viewMenu->idAt( 0 ) ); | 1047 | bool valShowHidden=viewMenu->isItemChecked( viewMenu->idAt( 0 ) ); |
1067 | valShowHidden=!valShowHidden; | 1048 | valShowHidden=!valShowHidden; |
1068 | viewMenu->setItemChecked( viewMenu->idAt( 0 ), valShowHidden ); | 1049 | viewMenu->setItemChecked( viewMenu->idAt( 0 ), valShowHidden ); |
1069 | fileView->setShowHidden(valShowHidden); | 1050 | fileView->setShowHidden(valShowHidden); |
1070 | 1051 | ||
1071 | Config cfg("Filebrowser"); | 1052 | Config cfg("Filebrowser"); |
1072 | cfg.setGroup("View"); | 1053 | cfg.setGroup("View"); |
1073 | cfg.writeEntry("Hidden",valShowHidden?"TRUE":"FALSE"); | 1054 | cfg.writeEntry("Hidden",valShowHidden?"TRUE":"FALSE"); |
1074 | 1055 | ||
1075 | fileView->updateDir(); | 1056 | fileView->updateDir(); |
1076 | } | 1057 | } |
1077 | 1058 | ||
1078 | void FileBrowser::updateShowSymlinks() | 1059 | void FileBrowser::updateShowSymlinks() |
1079 | { | 1060 | { |
1080 | bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) ); | 1061 | bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) ); |
1081 | valShowSymlinks=!valShowSymlinks; | 1062 | valShowSymlinks=!valShowSymlinks; |
1082 | viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks ); | 1063 | viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks ); |
1083 | fileView->setShowSymlinks(valShowSymlinks); | 1064 | fileView->setShowSymlinks(valShowSymlinks); |
1084 | 1065 | ||
1085 | Config cfg("Filebrowser"); | 1066 | Config cfg("Filebrowser"); |
1086 | cfg.setGroup("View"); | 1067 | cfg.setGroup("View"); |
1087 | cfg.writeEntry("Symlinks",valShowSymlinks?"TRUE":"FALSE"); | 1068 | cfg.writeEntry("Symlinks",valShowSymlinks?"TRUE":"FALSE"); |
1088 | 1069 | ||
1089 | fileView->updateDir(); | 1070 | fileView->updateDir(); |
1090 | } | 1071 | } |
1091 | 1072 | ||
1092 | void FileBrowser::updateShowThumbnails() | 1073 | void FileBrowser::updateShowThumbnails() |
1093 | { | 1074 | { |
1094 | bool valShowThumbnails=viewMenu->isItemChecked( viewMenu->idAt( 2 ) ); | 1075 | bool valShowThumbnails=viewMenu->isItemChecked( viewMenu->idAt( 2 ) ); |
1095 | valShowThumbnails=!valShowThumbnails; | 1076 | valShowThumbnails=!valShowThumbnails; |
1096 | viewMenu->setItemChecked( viewMenu->idAt( 2 ), valShowThumbnails ); | 1077 | viewMenu->setItemChecked( viewMenu->idAt( 2 ), valShowThumbnails ); |
1097 | fileView->setShowThumbnails(valShowThumbnails); | 1078 | fileView->setShowThumbnails(valShowThumbnails); |
1098 | 1079 | ||
1099 | Config cfg("Filebrowser"); | 1080 | Config cfg("Filebrowser"); |
1100 | cfg.setGroup("View"); | 1081 | cfg.setGroup("View"); |
1101 | cfg.writeEntry("Thumbnails",valShowThumbnails?"TRUE":"FALSE"); | 1082 | cfg.writeEntry("Thumbnails",valShowThumbnails?"TRUE":"FALSE"); |
1102 | 1083 | ||
1103 | fileView->updateDir(); | 1084 | fileView->updateDir(); |
1104 | } | 1085 | } |
1105 | 1086 | ||
1106 | void FileBrowser::cleanUp() { | 1087 | void FileBrowser::cleanUp() { |
1107 | QString cmdr = "rm -rf /tmp/filebrowserThumbnailCache"; | 1088 | QString cmdr = "rm -rf /tmp/filebrowserThumbnailCache"; |
1108 | // qDebug("exit"); | 1089 | // qDebug("exit"); |
1109 | system(cmdr.latin1()); | 1090 | system(cmdr.latin1()); |
1110 | } | 1091 | } |
1111 | |||
1112 | { | ||
1113 | bool valShowThumbnails=viewMenu->isItemChecked( viewMenu->idAt( 2 ) ); | ||
1114 | valShowThumbnails=!valShowThumbnails; | ||
1115 | viewMenu->setItemChecked( viewMenu->idAt( 2 ), valShowThumbnails ); | ||
1116 | fileView->setShowThumbnails(valShowThumbnails); | ||
1117 | |||
1118 | Config cfg("Filebrowser"); | ||
1119 | cfg.setGroup("View"); | ||
1120 | cfg.writeEntry("Thumbnails",valShowThumbnails?"TRUE":"FALSE"); | ||
1121 | |||
1122 | fileView->updateDir(); | ||
1123 | } | ||
1124 | |||
1125 | void FileBrowser::cleanUp() { | ||
1126 | QString cmdr = "rm -rf /tmp/filebrowserThumbnailCache"; | ||
1127 | // qDebug("exit"); | ||
1128 | system(cmdr.latin1()); | ||
1129 | } | ||