示例#1
0
    def post_init(self):
        self.panel = wx.Panel(self.fpanel)
        box = wx.BoxSizer(wx.VERTICAL)
        self.panel.SetSizer(box)

        self.rule_list = RuleList(self, self.filename, self.id_)
        self.rule_editor = RuleEditor(self, self.filename, self.id_)
        self.rule_list.post_init()
        self.rule_editor.post_init()

        box.Add(self.rule_list.panel, flag=wx.EXPAND | wx.BOTTOM, border=4)
        box.Add(self.rule_editor.panel, flag=wx.EXPAND | wx.BOTTOM, border=4)

        config = coreaux_api.get_plugin_configuration('wxscheduler')(
                                                        'ContextualShortcuts')
        accelerators = {
            config["focus"]: lambda event: self.set_focus(),
            config["toggle"]: lambda event: self.toggle_focus(),
        }

        wxgui_api.add_window_to_plugin(self.filename, self.id_, self.fpanel,
                                                    self.panel, accelerators)
        self.resize()

        # Must be done *after* resizing
        if not self.rule_list.rules:
            wxgui_api.collapse_panel(self.filename, self.id_, self.fpanel)
示例#2
0
    def post_init(self):
        self.panel = wx.Panel(self.fpanel)
        box = wx.BoxSizer(wx.VERTICAL)
        self.panel.SetSizer(box)

        self.rule_list = RuleList(self, self.filename, self.id_)
        self.rule_editor = RuleEditor(self, self.filename, self.id_)
        self.rule_list.post_init()
        self.rule_editor.post_init()

        box.Add(self.rule_list.panel, flag=wx.EXPAND | wx.BOTTOM, border=4)
        box.Add(self.rule_editor.panel, flag=wx.EXPAND | wx.BOTTOM, border=4)

        config = coreaux_api.get_plugin_configuration('wxscheduler')(
                                                        'ContextualShortcuts')
        accelerators = {
            config["focus"]: lambda event: self.set_focus(),
            config["toggle"]: lambda event: self.toggle_focus(),
        }

        wxgui_api.add_window_to_plugin(self.filename, self.id_, self.fpanel,
                                                    self.panel, accelerators)
        self.resize()

        # Must be done *after* resizing
        if not self.rule_list.rules:
            wxgui_api.collapse_panel(self.filename, self.id_, self.fpanel)
示例#3
0
    def __init__(self, filename, id_):
        self.filename = filename
        self.id_ = id_

        self.fpanel = wxgui_api.add_plugin_to_editor(filename, id_,
                                                                'Manage links')

        self.lpanel = wx.Panel(self.fpanel)

        config = coreaux_api.get_plugin_configuration('wxlinks')(
                                                        'ContextualShortcuts')
        accelerators = {
            config["focus"]: lambda event: self.set_focus(),
            config["toggle"]: lambda event: self.toggle_focus(),
        }

        wxgui_api.add_window_to_plugin(filename, id_, self.fpanel, self.lpanel,
                                                                accelerators)
示例#4
0
    def __init__(self, filename, id_):
        self.filename = filename
        self.id_ = id_

        self.fpanel = wxgui_api.add_plugin_to_editor(filename, id_,
                                                     'Manage links')

        self.lpanel = wx.Panel(self.fpanel)

        config = coreaux_api.get_plugin_configuration('wxlinks')(
            'ContextualShortcuts')
        accelerators = {
            config["focus"]: lambda event: self.set_focus(),
            config["toggle"]: lambda event: self.toggle_focus(),
        }

        wxgui_api.add_window_to_plugin(filename, id_, self.fpanel, self.lpanel,
                                       accelerators)