def __init__(self, tip_markup, parent=None): gtk.EventBox.__init__(self) self.image = gtk.Image() self.image.set_from_file(hic.ICON_INFO_DISPLAY_FILE) self.image.show() self.add(self.image) self.set_events(gtk.gdk.BUTTON_RELEASE | gtk.gdk.ENTER_NOTIFY_MASK | gtk.gdk.LEAVE_NOTIFY_MASK) self.ptip = PersistentTooltip(tip_markup) if parent: self.ptip.set_parent(parent) self.ptip.set_transient_for(parent) self.ptip.set_destroy_with_parent(True) self.connect("button-release-event", self.button_release_cb) self.connect("enter-notify-event", self.mouse_in_cb) self.connect("leave-notify-event", self.mouse_out_cb)
def show_binb_dialog(self, binb): markup = "<b>Brought in by:</b>\n%s" % binb ptip = PersistentTooltip(markup, self) ptip.show()