How to use the tryton.common.Tooltips function in tryton

To help you get started, we’ve selected a few tryton examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tryton / tryton / tryton / gui / window / view_form / widget_search / calendar.py View on Github external
def __init__(self, name, attrs=None, context=None,
            on_change=None):
        super(Calendar, self).__init__(name, attrs=attrs, context=context,
            on_change=on_change)

        tooltips = Tooltips()
        self.widget = gtk.HBox(spacing=3)

        self.format = date_format()

        self.liststore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
        self.combo = gtk.ComboBox(self.liststore)
        cell = gtk.CellRendererText()
        self.combo.pack_start(cell, True)
        self.combo.add_attribute(cell, 'text', 1)
        for oper in (['=', _('is')],
                ['between', _('is between')],
                ['not between', _('is not between')],
                ['!=', _('is not')],
                ):
            self.liststore.append(oper)
        self.combo.set_active(0)