diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2006-05-22 19:25:10 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2006-05-22 19:25:10 (GMT) |
commit | 0c2940d56e4fdfa184a2783c025fc09228eb76cb (patch) | |
tree | dcd20afda42ba5854126df6a98b7ed7c0bac15dc /sugar/p2p | |
parent | 30f3c73dcb12f93204e0f11f7fcae597772ba2a0 (diff) |
Get rid of the new message icon entirely
Diffstat (limited to 'sugar/p2p')
-rw-r--r-- | sugar/p2p/Buddy.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sugar/p2p/Buddy.py b/sugar/p2p/Buddy.py index dd42081..45aeac3 100644 --- a/sugar/p2p/Buddy.py +++ b/sugar/p2p/Buddy.py @@ -1,6 +1,10 @@ import pwd import os +import pygtk +pygtk.require('2.0') +import gtk + from Service import Service from sugar import env @@ -25,6 +29,15 @@ class Buddy(object): self._address = service.get_address() self._icon = None + def get_icon_pixbuf(self): + if self._icon: + pbl = gtk.gdk.PixbufLoader() + pbl.write(self._icon) + pbl.close() + return pbl.get_pixbuf() + else: + return None + def get_icon(self): """Return the buddies icon, if any.""" return self._icon |