Remove obsolete gtk import and code and save 1.7MiB writeable. Whee\!

This commit is contained in:
Dan Williams 2006-08-25 16:09:54 -04:00
parent ef47f6e4c5
commit 93a97660b4

View File

@ -1,7 +1,6 @@
import base64 import base64
import logging import logging
import gtk
import gobject import gobject
import dbus, dbus.service import dbus, dbus.service
@ -122,13 +121,13 @@ class Buddy(object):
if result_status == network.RESULT_SUCCESS: if result_status == network.RESULT_SUCCESS:
if icon and len(icon): if icon and len(icon):
icon = base64.b64decode(icon) icon = base64.b64decode(icon)
print "Buddy icon for '%s' is size %d" % (self._nick_name, len(icon)) logging.debug("Buddy icon for '%s' is size %d" % (self._nick_name, len(icon)))
self._set_icon(icon) self._set_icon(icon)
if (result_status == network.RESULT_FAILED or not icon) and self._icon_tries < 3: if (result_status == network.RESULT_FAILED or not icon) and self._icon_tries < 3:
self._icon_tries = self._icon_tries + 1 self._icon_tries = self._icon_tries + 1
print "Failed to retrieve buddy icon for '%s' on try %d of %d" % (self._nick_name, \ logging.debug("Failed to retrieve buddy icon for '%s' on try %d of %d" % (self._nick_name, \
self._icon_tries, 3) self._icon_tries, 3))
gobject.timeout_add(1000, self._request_buddy_icon, service) gobject.timeout_add(1000, self._request_buddy_icon, service)
return False return False
@ -242,15 +241,6 @@ class Buddy(object):
and successfully resolved.""" and successfully resolved."""
return self._valid return self._valid
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): def get_icon(self):
"""Return the buddies icon, if any.""" """Return the buddies icon, if any."""
return self._icon return self._icon