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

void KarchiveurApp::displayArchiveContent (  ) 

this method will launch the right compressor to list the file contents It will then launch the right method to display the content in the listview

this method will launch the right compressor to list the file contents It will then launch the right method to display the content in the listview

Definition at line 914 of file karchiveur.cpp.

References CArchiveOperation::canDisplayArchive(), cbdirectories, CArchiveOperation::displayArchiveContent(), enableMenus(), CArchive::getArchiveName(), CArchiveChoice::getArchiveName(), CArchiveChoice::getCurrentArchiveDirectory(), CLed::setColor(), CArchiveBrowser::setPath(), slotMessageArchiveOperation(), slotStatusMsg(), and view.

Referenced by removeFilesFromArchive(), slotFileOpen(), slotFileOpenRecent(), slotMessageArchiveOperation(), slotOpenFileFromArchiveBrowser(), slotOpenFileFromArchiveFinder(), slotRemoveSelectedFiles(), and slotRemoveThoseFiles().

{
  QString errormessage;

  QString archivename=archivechoice->getArchiveName();
  led->setColor(KLed::red);
  slotStatusMsg(i18n("Running compressor..."));
  
  if(archiveoperation!=NULL)
    delete archiveoperation;

  archiveoperation = new CArchiveOperationDisplay( archivename, readarchivewithstream, viewbydirectories, archiveobj,  progress );
  connect(archiveoperation, SIGNAL(operationEnded(int, QString)), this, SLOT(slotMessageArchiveOperation(int , QString )));

  errormessage=archiveoperation->canDisplayArchive();

  if(!errormessage.isEmpty()) //cannot display archive
  {
    kdDebug()<<QString("KarchiveurApp::displayArchiveContent - Error:%1").arg(errormessage)<<endl;
    led->setColor(QColor("orange"));
    slotStatusMsg(errormessage);
    if((operation==STANDBY)&&(archiveobj!=NULL))
      archivechoice->setName(archiveobj->getArchiveName());//restore name of previous valide archive,which has been stored in CArchiveChoice
    else
    {
      archiveobj=NULL;
      operation=NOARCHIVE;
    }
    return;
  }

  setCaption(archivename);
  enableMenus(false);
  fileOpenRecent->addURL(KURL(archivechoice->getArchiveName()));
  navigateur->setPath(archivechoice->getCurrentArchiveDirectory());
  view->clear();
  for(int i=0;i<7;i++)
    view->setColumnWidth(i,50);
  operation=READING;
  cbdirectories->clear();
  selectedfilesStatusbarMessage.nbselectedfiles=0;
  selectedfilesStatusbarMessage.sizeselectedfiles=0;

  animation->startAnimation();
  archiveoperation->displayArchiveContent();
}


Generated by  Doxygen 1.6.0   Back to index