Example #1
0
    def __init__(self, parent, style=wx.NO_BORDER, mode=MODE_CONFIG):
        """Build config panel"""
        eclib.ControlBox.__init__(self, parent, style=style)

        # Attrtibutes
        self._mode = mode
        self._changed = False
        self._list = eclib.PanelBox(self)

        # Layout Panel
        self.SetWindow(self._list)

        if self._mode == MODE_CONFIG:
            self.PopulateCtrl()
        else:
            self.PopulateErrors()

#        cbar = self.CreateControlBar(wx.BOTTOM)
#        cbar.SetVMargin(1, 2)
#        cbar.AddStretchSpacer()
#        btn = wx.Button(cbar, id=ConfigPanel.ID_UNINSTALL, label=_("Uninstall"))
#        cbar.AddControl(btn, wx.ALIGN_RIGHT)

# Event handlers
#        self.Bind(wx.EVT_BUTTON, self.OnUninstall, id=ConfigPanel.ID_UNINSTALL)
        self.Bind(ed_event.EVT_NOTIFY, self.OnNotify)
Example #2
0
    def __init__(self, parent, style=wx.NO_BORDER):
        """Initializes the panel"""
        eclib.ControlBox.__init__(self, parent, style=style)

        # Attributes
        self._p_list = dict()  # list of available plugins/meta
        self._dl_list = dict()  # List of download urls
        self._eggcount = 0  # Number of plugins to download
        self._eggbasket = dict()  # Basket of downloaded eggs
        self._list = eclib.PanelBox(self)

        # Layout Panel
        self.CreateControlBar(wx.BOTTOM)
        cbar = self.GetControlBar(wx.BOTTOM)
        cbar.SetVMargin(1, 2)
        cbar.AddStretchSpacer()
        self._downlb = wx.Button(cbar, DownloadPanel.ID_DOWNLOAD,
                                 _("Download"))
        self._downlb.Disable()
        cbar.AddControl(self._downlb, wx.ALIGN_RIGHT)
        self.SetWindow(self._list)

        # Event Handlers
        self.Bind(wx.EVT_BUTTON, self.OnButton)
        self.Bind(ed_event.EVT_NOTIFY, self.OnNotify)
Example #3
0
    def __init__(self, parent, style=wx.NO_BORDER, mode=MODE_CONFIG):
        """Build config panel"""
        eclib.ControlBox.__init__(self, parent, style=style)

        # Attrtibutes
        self._mode = mode
        self._changed = False
        self._list = eclib.PanelBox(self)

        # Layout Panel
        self.SetWindow(self._list)

        if self._mode == MODE_CONFIG:
            self.PopulateCtrl()
        else:
            self.PopulateErrors()

        # Event Handlers
        self.Bind(ed_event.EVT_NOTIFY, self.OnNotify)
Example #4
0
    def __init__(self, parent, style=wx.SUNKEN_BORDER, mode=MODE_CONFIG):
        """Build config panel"""
        wx.Panel.__init__(self, parent, style=style)

        # Attrtibutes
        self._mode = mode
        self._list = eclib.PanelBox(self)

        # Layout Panel
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self._list, 1, wx.EXPAND)
        self.SetSizer(sizer)

        if self._mode == MODE_CONFIG:
            self.PopulateCtrl()
        else:
            self.PopulateErrors()

        # Event handlers
        self.Bind(ed_event.EVT_NOTIFY, self.OnNotify)