author | kergoth <kergoth> | 2002-05-15 16:44:53 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-05-15 16:44:53 (UTC) |
commit | aa5d79399aa991aa84eb8b4f48d55202473990ef (patch) (side-by-side diff) | |
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 @@ -512,83 +512,64 @@ bool FileView::copyFile( const QString & dest, const QString & src ) success = FALSE; } // Set file permissions if( stat( (const char *) src, &status ) == 0 ){ chmod( (const char *) dest, status.st_mode ); } return success; } void FileView::cut() { int err; // ##### a better inmplementation might be to rename the CUT file // ##### to ".QPE-FILEBROWSER-MOVING" rather than copying it. QString cmd, dest, basename, cd = "/tmp/qpemoving"; QStringList newflist; newflist.clear(); cmd = "rm -rf " + cd; system ( (const char *) cmd ); cmd = "mkdir " + cd; system( (const char *) cmd ); // get the names of the files to cut FileItem * item; if((item = (FileItem *) firstChild()) == 0) return; flist.clear(); while( item ){ - if( ite - // ##### a better inmplementation might be to rename the CUT file - // ##### to ".QPE-FILEBROWSER-MOVING" rather than copying it. - QString cmd, dest, basename, cd = "/tmp/qpemoving"; - QStringList newflist; - newflist.clear(); - - cmd = "rm -rf " + cd; - system ( (const char *) cmd ); - cmd = "mkdir " + cd; - system( (const char *) cmd ); - -// get the names of the files to cut - FileItem * item; - - if((item = (FileItem *) firstChild()) == 0) return; - - flist.clear(); - while( item ){ if( item->isSelected() /*&& !item->isDir()*/ ){ flist += item->getFilePath(); } item = (FileItem *) item->nextSibling(); } // move these files into a tmp dir for ( QStringList::Iterator it = flist.begin(); it != flist.end(); ++it ) { basename = (*it).mid((*it).findRev("/") + 1, (*it).length()); dest = cd + "/" + basename; newflist += dest; cmd = "/bin/mv -f \"" + (*it) +"\" " + "\"" + dest + "\""; err = system( (const char *) cmd ); if ( err != 0 ) { QMessageBox::warning( this, tr("Cut file"), tr("Cut failed!"), tr("Ok") ); break; } else { updateDir(); QListViewItem * im = firstChild(); basename = dest.mid( dest.findRev("/") + 1, dest.length() ); while( im ){ if( im->text(0) == basename ){ setCurrentItem( im ); ensureItemVisible( im ); break; } @@ -1079,51 +1060,32 @@ void FileBrowser::updateShowSymlinks() { bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) ); valShowSymlinks=!valShowSymlinks; viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks ); fileView->setShowSymlinks(valShowSymlinks); Config cfg("Filebrowser"); cfg.setGroup("View"); cfg.writeEntry("Symlinks",valShowSymlinks?"TRUE":"FALSE"); fileView->updateDir(); } void FileBrowser::updateShowThumbnails() { bool valShowThumbnails=viewMenu->isItemChecked( viewMenu->idAt( 2 ) ); valShowThumbnails=!valShowThumbnails; viewMenu->setItemChecked( viewMenu->idAt( 2 ), valShowThumbnails ); fileView->setShowThumbnails(valShowThumbnails); Config cfg("Filebrowser"); cfg.setGroup("View"); cfg.writeEntry("Thumbnails",valShowThumbnails?"TRUE":"FALSE"); fileView->updateDir(); } void FileBrowser::cleanUp() { QString cmdr = "rm -rf /tmp/filebrowserThumbnailCache"; // qDebug("exit"); system(cmdr.latin1()); } - -{ - bool valShowThumbnails=viewMenu->isItemChecked( viewMenu->idAt( 2 ) ); - valShowThumbnails=!valShowThumbnails; - viewMenu->setItemChecked( viewMenu->idAt( 2 ), valShowThumbnails ); - fileView->setShowThumbnails(valShowThumbnails); - - Config cfg("Filebrowser"); - cfg.setGroup("View"); - cfg.writeEntry("Thumbnails",valShowThumbnails?"TRUE":"FALSE"); - - fileView->updateDir(); -} - -void FileBrowser::cleanUp() { - QString cmdr = "rm -rf /tmp/filebrowserThumbnailCache"; -// qDebug("exit"); - system(cmdr.latin1()); -} |