コード例 #1
0
ファイル: menu.py プロジェクト: maximerobin/Ufwi
 def __init__(self, rules):
     Menu.__init__(self)
     window = rules.window
     self.debug = window.debug
     self.create_before = self.add(":/icons/add.png",
         tr("Create before"), self.createAclBefore)
     self.create_after = self.add(":/icons/add.png",
         tr("Create after"), self.createAclAfter)
     self.edit = self.add(":/icons/edit.png",
         tr("Edit"), self.editAcl)
     self.up = self.add(":/icons/up.png",
         tr("Move up"), self.moveUp)
     if window.compatibility.has_move_rule:
         self.move_at = self.add(":/icons/updown.png",
             tr("Move to line..."), self.moveAt)
     else:
         self.move_at = None
     self.down = self.add(":/icons/down.png",
         tr("Move down"), self.moveDown)
     self.clone = self.add(":/icons/copy.png",
         tr("Clone"), self.cloneAcl)
     self.delete = self.add(":/icons/delete.png",
         tr("Delete"), self.deleteAcl)
     self.iptables = self.add(":/icons/apply_rules.png",
         tr("Iptables rules"), self.iptablesRules)
     self.ldap = self.add(":/icons/apply_rules.png",
         tr("LDAP rules"), self.ldapRules)
     self.rules = rules
     self.rule_id = None
     self.identifiers = None
コード例 #2
0
ファイル: library.py プロジェクト: maximerobin/Ufwi
 def __init__(self, library, create_text, modify_text, delete_text):
     Menu.__init__(self)
     self.library = library
     self.create_action = self.add(":/icons/add.png", create_text, library.create)
     self.modify_action = self.add(":/icons/edit.png", modify_text, library.modifyEvent)
     self.delete_action = self.add(":/icons/delete.png", delete_text, library.deleteEvent)