summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-05-15 16:44:53 (UTC)
committer kergoth <kergoth>2002-05-15 16:44:53 (UTC)
commitaa5d79399aa991aa84eb8b4f48d55202473990ef (patch) (unidiff)
treedda2b43b5ad001435175cce1ec943df21ef63c43
parent7844e2aebcb289f55bf10f22ea1250773c8ad7bd (diff)
downloadopie-aa5d79399aa991aa84eb8b4f48d55202473990ef.zip
opie-aa5d79399aa991aa84eb8b4f48d55202473990ef.tar.gz
opie-aa5d79399aa991aa84eb8b4f48d55202473990ef.tar.bz2
hmm, we dont need the same things in here twice. Compiles again.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp38
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
@@ -520,67 +520,48 @@ bool FileView::copyFile( const QString & dest, const QString & src )
520 return success; 520 return success;
521} 521}
522 522
523void FileView::cut() 523void 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();
@@ -1087,43 +1068,24 @@ void FileBrowser::updateShowSymlinks()
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
1092void FileBrowser::updateShowThumbnails() 1073void 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
1106void FileBrowser::cleanUp() { 1087void 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
1125void FileBrowser::cleanUp() {
1126 QString cmdr = "rm -rf /tmp/filebrowserThumbnailCache";
1127// qDebug("exit");
1128 system(cmdr.latin1());
1129}