def __init__(self, parent, ID=-1, title="Manage Groups"): wx.Dialog.__init__(self, parent, ID, title, style=wx.DEFAULT_DIALOG_STYLE #| wx.RESIZE_BORDER ) self.idx = -1 # s = system groups, p = private groups s, p = domaindata.get_group_names() self.sg = Groups(s) self.pg = Groups(p) self.panel = xrcl.loadPanel(self, "groupeditor.xrc", "groupeditor") self.glc = xrcl.getControl(self.panel, "grplstctrl") self.gnc = xrcl.getControl(self.panel, "grpname") self.uab = xrcl.getControl(self.panel, "upaddbutton") self.uab.SetLabel(LABEL_ADD) self.deb = xrcl.getControl(self.panel, "delbutton") self.deb.SetLabel(LABEL_DEL) self.populateForm() space = 5 self.topSizer = wx.BoxSizer(wx.VERTICAL) self.topSizer.Add(self.panel, 1, wx.EXPAND, space) self.SetSizer(self.topSizer) self.topSizer.Fit(self) self.binEvents() self.ShowModal()
def __initAvailable__(self): s, p = domaindata.get_group_names() self.availableGroups = s+p