Ejemplo n.º 1
0
    def __init__(self, filename):
        self.filename = filename

        config = coreaux_api.get_plugin_configuration('wxlinks')('TreeIcons')
        char = config['symbol']

        if char != '':
            bits_to_colour = {b: wx.Colour() for b in xrange(1, 6)}
            bits_to_colour[1].SetFromString(config['color_valid'])
            bits_to_colour[2].SetFromString(config['color_broken'])
            bits_to_colour[3].SetFromString(config['color_target'])
            bits_to_colour[4].SetFromString(config['color_valid_and_target'])
            bits_to_colour[5].SetFromString(config['color_broken_and_target'])

            self.property_shift, self.property_mask = \
                                            wxgui_api.add_item_property(
                                            filename, 3, char, bits_to_colour)

            links_api.bind_to_upsert_link(self._handle_upsert_link)
            links_api.bind_to_delete_link(self._handle_delete_link)
            links_api.bind_to_break_link(self._handle_break_links)
            links_api.bind_to_history_insert(self._handle_history)
            links_api.bind_to_history_update(self._handle_history)
            links_api.bind_to_history_delete(self._handle_history)

            wxgui_api.bind_to_open_database(self._handle_open_database)
            wxgui_api.bind_to_close_database(self._handle_close_database)

            if wxcopypaste_api:
                wxcopypaste_api.bind_to_items_pasted(self._handle_paste)
Ejemplo n.º 2
0
    def __init__(self, filename):
        self.filename = filename

        config = coreaux_api.get_plugin_configuration('wxscheduler')(
                                                                'TreeIcons')
        char = config['symbol']

        if char != '':
            bits_to_colour = {1: wx.Colour()}
            bits_to_colour[1].SetFromString(config['color'])

            self.property_shift, self.property_mask = \
                                            wxgui_api.add_item_property(
                                            filename, 1, char, bits_to_colour)

            organism_api.bind_to_update_item_rules_conditional(
                                                    self._handle_update_rules)
            organism_api.bind_to_history_insert(self._handle_history)
            organism_api.bind_to_history_update(self._handle_history)

            wxgui_api.bind_to_open_database(self._handle_open_database)
            wxgui_api.bind_to_close_database(self._handle_close_database)

            if wxcopypaste_api:
                wxcopypaste_api.bind_to_items_pasted(self._handle_paste)
Ejemplo n.º 3
0
    def __init__(self, filename):
        self.filename = filename

        config = coreaux_api.get_plugin_configuration('wxscheduler')(
                                                                'TreeIcons')
        char = config['symbol']

        if char != '':
            bits_to_colour = {1: wx.Colour()}
            bits_to_colour[1].SetFromString(config['color'])

            self.property_shift, self.property_mask = \
                                            wxgui_api.add_item_property(
                                            filename, 1, char, bits_to_colour)

            organism_api.bind_to_update_item_rules_conditional(
                                                    self._handle_update_rules)
            organism_api.bind_to_history_insert(self._handle_history)
            organism_api.bind_to_history_update(self._handle_history)

            wxgui_api.bind_to_open_database(self._handle_open_database)
            wxgui_api.bind_to_close_database(self._handle_close_database)

            if wxcopypaste_api:
                wxcopypaste_api.bind_to_items_pasted(self._handle_paste)
Ejemplo n.º 4
0
    def __init__(self, filename):
        self.filename = filename

        config = coreaux_api.get_plugin_configuration('wxlinks')('TreeIcons')
        char = config['symbol']

        if char != '':
            bits_to_colour = {b: wx.Colour() for b in xrange(1, 6)}
            bits_to_colour[1].SetFromString(config['color_valid'])
            bits_to_colour[2].SetFromString(config['color_broken'])
            bits_to_colour[3].SetFromString(config['color_target'])
            bits_to_colour[4].SetFromString(config['color_valid_and_target'])
            bits_to_colour[5].SetFromString(config['color_broken_and_target'])

            self.property_shift, self.property_mask = \
                                            wxgui_api.add_item_property(
                                            filename, 3, char, bits_to_colour)

            links_api.bind_to_upsert_link(self._handle_upsert_link)
            links_api.bind_to_delete_link(self._handle_delete_link)
            links_api.bind_to_break_link(self._handle_break_links)
            links_api.bind_to_history_insert(self._handle_history)
            links_api.bind_to_history_update(self._handle_history)
            links_api.bind_to_history_delete(self._handle_history)

            wxgui_api.bind_to_open_database(self._handle_open_database)
            wxgui_api.bind_to_close_database(self._handle_close_database)

            if wxcopypaste_api:
                wxcopypaste_api.bind_to_items_pasted(self._handle_paste)