Exemplo n.º 1
0
 def __init__(self, widgets):
     '''
     '''
     InfoExpander.__init__(self, _("General"), widgets)
     general_box = self.widgets.loc_gen_box
     self.widgets.remove_parent(general_box)
     self.vbox.pack_start(general_box)
Exemplo n.º 2
0
    def __init__(self, widgets):
        """
        the constructor
        """
        InfoExpander.__init__(self, _("General"), widgets)
        general_box = self.widgets.sp_general_box
        self.widgets.remove_parent(general_box)
        self.vbox.pack_start(general_box)
        self.widgets.sp_name_data.set_line_wrap(True)

        # make the check buttons read only
        def on_enter(button, *args):
            button.emit_stop_by_name("enter-notify-event")
            return True

        self.current_obj = None

        def on_nacc_clicked(*args):
            cmd = "acc where species.id=%s" % self.current_obj.id
            bauble.gui.send_command(cmd)

        utils.make_label_clickable(self.widgets.sp_nacc_data, on_nacc_clicked)

        def on_nplants_clicked(*args):
            cmd = "plant where accession.species.id=%s" % self.current_obj.id
            bauble.gui.send_command(cmd)

        utils.make_label_clickable(self.widgets.sp_nplants_data, on_nplants_clicked)
Exemplo n.º 3
0
    def __init__(self, widgets):
        '''
        '''
        InfoExpander.__init__(self, _("General"), widgets)
        general_box = self.widgets.loc_gen_box
        self.widgets.remove_parent(general_box)
        self.vbox.pack_start(general_box)
        self.current_obj = None

        def on_nplants_clicked(*args):
            cmd = 'plant where location.code="%s"' % self.current_obj.code
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.loc_nplants_data,
                                   on_nplants_clicked)
Exemplo n.º 4
0
    def __init__(self, widgets):
        """

        Arguments:
        - `widgets`:
        """
        InfoExpander.__init__(self, _("General"), widgets)
        general_box = self.widgets.fam_general_box
        self.widgets.remove_parent(general_box)
        self.vbox.pack_start(general_box)

        def on_ngen_clicked(*args):
            f = self.current_obj
            cmd = 'genus where family.family="%s" and family.qualifier="%s"'\
                % (f.family, f.qualifier)
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.fam_ngen_data,
                                   on_ngen_clicked)

        def on_nsp_clicked(*args):
            f = self.current_obj
            cmd = 'species where genus.family.family="%s" '\
                'and genus.family.qualifier="%s"' % (f.family, f.qualifier)
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.fam_nsp_data,
                                   on_nsp_clicked)

        def on_nacc_clicked(*args):
            f = self.current_obj
            cmd = 'acc where species.genus.family.family="%s" ' \
                'and species.genus.family.qualifier="%s"' \
                % (f.family, f.qualifier)
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.fam_nacc_data,
                                   on_nacc_clicked)

        def on_nplants_clicked(*args):
            f = self.current_obj
            cmd = 'plant where accession.species.genus.family.family="%s" ' \
                'and accession.species.genus.family.qualifier="%s"' \
                % (f.family, f.qualifier)
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.fam_nplants_data,
                                   on_nplants_clicked)
Exemplo n.º 5
0
    def __init__(self, widgets):
        '''
        the constructor
        '''
        InfoExpander.__init__(self, _("General"), widgets)
        general_box = self.widgets.gen_general_box
        self.widgets.remove_parent(general_box)
        self.vbox.pack_start(general_box)

        self.current_obj = None
        def on_family_clicked(*args):
            select_in_search_results(self.current_obj.family)
        utils.make_label_clickable(self.widgets.gen_fam_data,
                                   on_family_clicked)

        def on_nsp_clicked(*args):
            g = self.current_obj
            cmd = 'species where genus.genus="%s" and genus.qualifier="%s"' \
                % (g.genus, g.qualifier)
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.gen_nsp_data,
                                   on_nsp_clicked)

        def on_nacc_clicked(*args):
            g = self.current_obj
            cmd = 'acc where species.genus.genus="%s" ' \
                'and species.genus.qualifier="%s"' \
                % (g.genus, g.qualifier)
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.gen_nacc_data,
                                   on_nacc_clicked)

        def on_nplants_clicked(*args):
            g = self.current_obj
            cmd = 'plant where accession.species.genus.genus="%s" and ' \
                'accession.species.genus.qualifier="%s"' \
                % (g.genus, g.qualifier)
            bauble.gui.send_command(cmd)
        utils.make_label_clickable(self.widgets.gen_nplants_data,
                                   on_nplants_clicked)
Exemplo n.º 6
0
 def __init__(self, widgets):
     InfoExpander.__init__(self, _("Synonyms"), widgets)
     synonyms_box = self.widgets.sp_synonyms_box
     self.widgets.remove_parent(synonyms_box)
     self.vbox.pack_start(synonyms_box)
Exemplo n.º 7
0
 def __init__(self, widgets):
     InfoExpander.__init__(self, _("Vernacular Names"), widgets)
     vernacular_box = self.widgets.sp_vernacular_box
     self.widgets.remove_parent(vernacular_box)
     self.vbox.pack_start(vernacular_box)
Exemplo n.º 8
0
 def __init__(self, widgets):
     InfoExpander.__init__(self, _("Description"), widgets)
     descr_box = self.widgets.loc_descr_box
     self.widgets.remove_parent(descr_box)
     self.vbox.pack_start(descr_box)
Exemplo n.º 9
0
 def __init__(self, widgets):
     InfoExpander.__init__(self, _("Vernacular Names"), widgets)
     vernacular_box = self.widgets.sp_vernacular_box
     self.widgets.remove_parent(vernacular_box)
     self.vbox.pack_start(vernacular_box)
Exemplo n.º 10
0
 def __init__(self, widgets):
     InfoExpander.__init__(self, _("Description"), widgets)
     descr_box = self.widgets.loc_descr_box
     self.widgets.remove_parent(descr_box)
     self.vbox.pack_start(descr_box)
Exemplo n.º 11
0
 def __init__(self, widgets):
     InfoExpander.__init__(self, _("Synonyms"), widgets)
     synonyms_box = self.widgets.gen_synonyms_box
     self.widgets.remove_parent(synonyms_box)
     self.vbox.pack_start(synonyms_box)