def _on_contact_change_something(self, *args):
        """
        update the menu when contacts change something
        """
        if len(args) == 3:
            account, type_change, value_change = args
        elif len(args) == 4:
            account, type_change, value_change, do_notify = args

        if type_change == 'status':
            contact =  self.main_window.session.contacts.get(account)
            if not contact:
                return
            time = strftime('[%H:%M:%S]', localtime())
            stat = e3.status.STATUS[contact.status]

            if hasattr(gui.theme, "image_theme"):
                status = gui.theme.image_theme.status_icons[contact.status]
            else:
                status = gui.theme.status_icons[contact.status]

            pixbuf = utils.safe_gtk_pixbuf_load(status)

            pixbuf.scale_simple(20, 20, gtk.gdk.INTERP_BILINEAR)
            display_name = Renderers.msnplus_to_plain_text(contact.display_name)
            self.model.prepend([time, pixbuf, contact.status, display_name])
            self.set_active(0)
Exemplo n.º 2
0
 def set_text(self, text):
     """set the text of the label"""
     self.label.set_markup(Renderer.msnplus_to_list(gobject.markup_escape_text(text))[0])
Exemplo n.º 3
0
 def set_text(self, text):
     '''set the text of the label'''
     self.label.set_markup(
         Renderer.msnplus_to_list(gobject.markup_escape_text(text))[0])