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

void KarchiveurApp::enableMenus ( bool  b  )  [protected]

enable or disable the KAction menus

Definition at line 1817 of file karchiveur.cpp.

References cbdirectories, supportDisplayByDirs(), and CArchive::supportPassword().

Referenced by addToArchive(), createArchiveFromCommandLine(), displayArchiveContent(), extractFromCommandLine(), KarchiveurApp(), openFileFromCommandLine(), openFilesDropPaste(), slotDiskCutUncut(), slotExtractArchive(), slotMessageArchiveOperation(), and slotWizard().

{
  const bool enabledandselected =b  && (selectedfilesStatusbarMessage.nbselectedfiles>0);
  fileCryptArchive->setEnabled(b);
  fileMailArchive->setEnabled(b);
  fileConvertArchive->setEnabled(b);
  fileInfosArchive->setEnabled(b);
  filePrint->setEnabled(b);
  fileCloseArchive->setEnabled(b);
  fileMakeSfxArchive->setEnabled(b);

  archiveExtract->setEnabled(b);
  archiveAdd->setEnabled(b);
  archiveView->setEnabled(b);
  archiveSetPassword->setEnabled(b);
  if((archiveobj!=NULL)&&(!archiveobj->supportPassword()))
    archiveSetPassword->setEnabled(false);
  archiveViewSelection->setEnabled( enabledandselected );
  archiveDeleteSelection->setEnabled(enabledandselected);
  archiveDeleteToTrashSelection->setEnabled(enabledandselected);
  archiveWizard->setEnabled(b);
  archiveProprieties->setEnabled(b);
  archiveTest->setEnabled(b);
  archiveScan->setEnabled(b);

  editUndo->setEnabled(b && (!listUndo.isEmpty()) );
  editRedo->setEnabled(b && (!listRedo.isEmpty())) ;
  editCut->setEnabled(b && (selectedfilesStatusbarMessage.nbselectedfiles>0) );
  editCopy->setEnabled(b && (selectedfilesStatusbarMessage.nbselectedfiles>0) );
  editPaste->setEnabled(b);
  editSelectAll->setEnabled(b);
  editUnselectAll->setEnabled(b);
  editFind->setEnabled(b);
  if(viewbydirectories && supportDisplayByDirs() && b)
      cbdirectories->show();
  else
      cbdirectories->hide();
  
  if(archiveobj==NULL)
    b=true;

    fileNewArchive->setEnabled(b);
    fileOpenArchive->setEnabled(b);
    fileOpenRecent->setEnabled(b);
    diskSplit->setEnabled(b);

}


Generated by  Doxygen 1.6.0   Back to index