Diffstat (limited to 'noncore/unsupported/filebrowser/filebrowser.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp index 9439bb8..384d7da 100644 --- a/noncore/unsupported/filebrowser/filebrowser.cpp +++ b/noncore/unsupported/filebrowser/filebrowser.cpp @@ -22,3 +22,3 @@ #include "filebrowser.h" - +#include "filePermissions.h" #include <qpe/resource.h> @@ -656,2 +656,3 @@ void FileView::showFileMenu() tr( "Paste" ), this, SLOT( paste() ) ); + m->insertItem( tr( "change permissions" ), this, SLOT( chPerm() ) ); m->insertItem( tr( "Delete" ), this, SLOT( del() ) ); @@ -850 +851,30 @@ void FileBrowser::updateSorting() } + +void FileView::chPerm() { + FileItem * i; + QStringList fl; + QString cmd; + int err; + + if((i = (FileItem *) firstChild()) == 0) return; + + while( i ){ + if( i->isSelected() ){ + fl += i->getFilePath(); + } + i = (FileItem *) i->nextSibling(); + } + if( fl.count() < 1 ) return; + if( QMessageBox::warning( this, tr("Change permissions"), tr("Are you sure?"), + tr("Yes"), tr("No") ) == 0) { + for ( QStringList::Iterator it = fl.begin(); it != fl.end(); ++it ) { + filePermissions *filePerm; + filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(*it)); + filePerm->exec(); + if( filePerm) + delete filePerm; + break; + } + updateDir(); + } +} |