Logo Search packages:      
Sourcecode: karchiver version File versions  Download package

void KarchiveurApp::slotRemoveSelectedFiles (  )  [slot]

remove from archive all selected files

Definition at line 629 of file karchiveur.cpp.

References displayArchiveContent(), displayMessageArchiveSize(), CArchive::removeFilesFromArchive(), CLed::setColor(), slotStatusMsg(), and view.

Referenced by slotContextualMenuActivated(), slotCutt(), slotRemoveToTrashSelectedFiles(), and slotRemoveWithUndoSelectedFiles().

                                           {
  led->setColor(QColor("red"));
  slotStatusMsg(i18n("Deleting selected files..."));

      if(operation!=NOARCHIVE)
      {
            int i;
            int k;
            QListViewItem *li=view->firstChild();
            QString file;
            QStringList listselectedfiles;

            k=view->childCount();
            for(i=0;i<k;i++)
            {
                  if(view->isSelected(li))
                  {
                        file=li->text(6);
                if(file.startsWith("/"))
                  file=file.remove(0,1);
                  file+=li->text(0);
                        listselectedfiles.append(file);
                        kdDebug()<<QString("KarchiveurApp::slotRemoveSelectedFiles:%1*").arg(file)<<endl;
                  }
                  if(i!=k)
                        li=li->nextSibling();
            }
            if(KMessageBox::questionYesNoList(this, i18n("Do you really want to delete these files?"), listselectedfiles,     i18n("KArchiver"))
                  ==KMessageBox::No)
            {
                  led->setColor(QColor("green"));
              slotStatusMsg(IDS_STATUS_DEFAULT);
                  return;
            }

            archiveobj->removeFilesFromArchive(listselectedfiles);
            operation=STANDBY;
      }

      displayArchiveContent();
      led->setColor(QColor("green"));
      displayMessageArchiveSize();
}


Generated by  Doxygen 1.6.0   Back to index