diff --git a/src/gui/ObjectManipulator.cpp b/src/gui/ObjectManipulator.cpp index 9a24c0647..bf974336a 100644 --- a/src/gui/ObjectManipulator.cpp +++ b/src/gui/ObjectManipulator.cpp @@ -1052,9 +1052,18 @@ QAction *movID; if ( (Firewall::isA(currentObj) || Host::isA(currentObj)) && ! currentObj->isReadOnly() ) + { newID1=popup->addAction( tr("Add Interface"), this , SLOT( newInterface() ) ); + } + if ((Firewall::isA(currentObj) &&! currentObj->isReadOnly())) + { + newID1=popup->addAction( tr("Add Policy Rule Set"), this , + SLOT( newPolicyRuleSet() ) ); + newID1=popup->addAction( tr("Add NAT Rule Set"), this , + SLOT( newNATRuleSet() ) ); + } if (Interface::isA(currentObj) && ! currentObj->isReadOnly()) { newID1=popup->addAction( tr("Add IP Address"), this , @@ -2788,6 +2797,31 @@ void ObjectManipulator::newLibrary() } +void ObjectManipulator::newPolicyRuleSet () +{ + if ( currentObj->isReadOnly() ) return; + FWObject *o=createObject(currentObj,Policy::TYPENAME,tr("New Policy")); + if (o!=NULL) + { + openObject(o); + editObject(o); + } + +} + +void ObjectManipulator::newNATRuleSet () +{ + if ( currentObj->isReadOnly() ) return; + FWObject *o=createObject(currentObj,NAT::TYPENAME,tr("New NAT")); + if (o!=NULL) + { + openObject(o); + editObject(o); + } + +} + + void ObjectManipulator::newFirewall() { // QVector oms = getAllMdiObjectManipulators(); @@ -2968,6 +3002,7 @@ void ObjectManipulator::newAddressTable() } } + void ObjectManipulator::newInterfaceAddress() { if ( currentObj->isReadOnly() ) return; diff --git a/src/gui/ObjectManipulator.h b/src/gui/ObjectManipulator.h index 9e4d28f2c..3c8c9f07f 100644 --- a/src/gui/ObjectManipulator.h +++ b/src/gui/ObjectManipulator.h @@ -195,7 +195,8 @@ public slots: void newServiceGroup(); void newInterval(); - + void newPolicyRuleSet (); + void newNATRuleSet (); void duplicateObj(QAction*); void duplicateObjUnderSameParent(); void moveObj(QAction*);