예제 #1
0
void wizardDisk::slotTreeMountsRightClick()
{
  if ( ! treeMounts->currentItem() )
    return;

  popup = new QMenu();
  popup->setTitle(tr("Editing:") + " " + treeMounts->currentItem()->text(1));
  popup->addSeparator();

  // Create atime sub-menu
  popupAT = popup->addMenu("atime");
  popupAT->addAction( "on", this, SLOT(slotZATON()));
  popupAT->addAction( "off", this, SLOT(slotZATOFF()));

  // Create canmount sub-menu
  popupCM = popup->addMenu("canmount");
  popupCM->addAction( "on", this, SLOT(slotZCMON()));
  popupCM->addAction( "off", this, SLOT(slotZCMOFF()));
  popupCM->addAction( "noauto", this, SLOT(slotZCMNOAUTO()));

  // Case sensitivity
  popupCI = popup->addMenu("casesensitivity");
  popupCI->addAction( "sensitive", this, SLOT(slotZCION()));
  popupCI->addAction( "insensitive", this, SLOT(slotZCIOFF()));

  // Create Checksum sub-menu
  popupCH = popup->addMenu("checksum");
  popupCH->addAction( "on", this, SLOT(slotZChkON()));
  popupCH->addAction( "off", this, SLOT(slotZChkOFF()));

  // Create compression sub-menu
  popupCmp = popup->addMenu("compression");
  popupCmp->addAction( "off", this, SLOT(slotZCmpOFF()));
  popupCmp->addAction( "on", this, SLOT(slotZCmpON()));
  popupCmp->addAction( "lz4", this, SLOT(slotZCmpLZ4()));
  popupCmp->addAction( "lzjb", this, SLOT(slotZCmpLZJB()));
  popupCmp->addAction( "gzip", this, SLOT(slotZCmpGZIP()));
  popupCmp->addAction( "zle", this, SLOT(slotZCmpZLE()));

  // Create dedup sub-menu
  // dedup is disabled for now, until such time as it is safe in all cases
  //popupDD = popup->addMenu("dedup");
  //popupDD->addAction( "off", this, SLOT(slotZDDOFF()));
  //popupDD->addAction( "on", this, SLOT(slotZDDON()));
  //popupDD->addAction( "verify", this, SLOT(slotZDDVERIFY()));

  // Create exec sub-menu
  popupNE = popup->addMenu("exec");
  popupNE->addAction( "on", this, SLOT(slotZEXON()));
  popupNE->addAction( "off", this, SLOT(slotZEXOFF()));

  // Add setuid sub-menu
  popupNE = popup->addMenu("setuid");
  popupNE->addAction( "on", this, SLOT(slotZSUIDON()));
  popupNE->addAction( "off", this, SLOT(slotZSUIDOFF()));

  popup->exec( QCursor::pos() );

}
예제 #2
0
void wizardDisk::slotTreeMountsRightClick()
{
  if ( ! treeMounts->currentItem() )
    return;

  popup = new QMenu();
  popup->setTitle(tr("Editing:") + " " + treeMounts->currentItem()->text(1));
  popup->addSeparator();

  // No options to change for /swap
  if ( treeMounts->currentItem()->text(1) == "/swap" ) {
    popup->addAction( "Change size", this, SLOT(slotZSwapSize()));
    popup->exec( QCursor::pos() );
    return;
  }

  // Create atime sub-menu
  popupAT = popup->addMenu("atime");
  popupAT->addAction( "on", this, SLOT(slotZATON()));
  popupAT->addAction( "off", this, SLOT(slotZATOFF()));

  // Create canmount sub-menu
  popupCM = popup->addMenu("canmount");
  popupCM->addAction( "on", this, SLOT(slotZCMON()));
  popupCM->addAction( "off", this, SLOT(slotZCMOFF()));
  popupCM->addAction( "noauto", this, SLOT(slotZCMNOAUTO()));

  // Create Checksum sub-menu
  popupCH = popup->addMenu("checksum");
  popupCH->addAction( "on", this, SLOT(slotZChkON()));
  popupCH->addAction( "off", this, SLOT(slotZChkOFF()));

  // Create compression sub-menu for non '/' devices
  if ( treeMounts->currentItem()->text(1) != "/" ) {
    popupCmp = popup->addMenu("compression");
    popupCmp->addAction( "off", this, SLOT(slotZCmpOFF()));
    popupCmp->addAction( "lzjb", this, SLOT(slotZCmpLZJB()));
    popupCmp->addAction( "gzip", this, SLOT(slotZCmpGZIP()));
    popupCmp->addAction( "zle", this, SLOT(slotZCmpZLE()));
  }

  // Create dedup sub-menu
  // dedup is disabled for now, until such time as it is safe in all cases
  //popupDD = popup->addMenu("dedup");
  //popupDD->addAction( "off", this, SLOT(slotZDDOFF()));
  //popupDD->addAction( "on", this, SLOT(slotZDDON()));
  //popupDD->addAction( "verify", this, SLOT(slotZDDVERIFY()));

  // Create exec sub-menu
  popupNE = popup->addMenu("exec");
  popupNE->addAction( "on", this, SLOT(slotZEXON()));
  popupNE->addAction( "off", this, SLOT(slotZEXOFF()));

  popup->exec( QCursor::pos() );

}