explicitely set the BuddyInfo interface

This commit is contained in:
Guillaume Desmottes 2007-02-28 00:05:00 +01:00
parent a840be0c01
commit 7cf6fd2640
2 changed files with 6 additions and 4 deletions

View File

@ -49,7 +49,7 @@ class Buddy(dbus.service.Object):
self.handles = {} # tp client -> handle self.handles = {} # tp client -> handle
self._icon = None self._icon = None
self._nick_name = None self._name = None
self._color = None self._color = None
self._key = None self._key = None
self._current_activity = None self._current_activity = None
@ -136,7 +136,7 @@ class Buddy(dbus.service.Object):
return self._icon return self._icon
def get_name(self): def get_name(self):
return self._nick_name return self._name
def get_color(self): def get_color(self):
return self._color return self._color
@ -156,7 +156,7 @@ class Buddy(dbus.service.Object):
self.IconChanged(icon) self.IconChanged(icon)
def _set_name(self, name): def _set_name(self, name):
self._nick_name = name self._name = name
def _set_color(self, color): def _set_color(self, color):
self._color = color self._color = color
@ -184,7 +184,7 @@ class Owner(Buddy):
Buddy.__init__(self, bus_name, object_id) Buddy.__init__(self, bus_name, object_id)
self._ps = ps self._ps = ps
self._nick_name = profile.get_nick_name() self._name = profile.get_nick_name()
self._color = profile.get_color().to_string() self._color = profile.get_color().to_string()
self._key = profile.get_pubkey() self._key = profile.get_pubkey()

View File

@ -175,6 +175,8 @@ class ServerPlugin(gobject.GObject):
self._conn[CONN_INTERFACE_AVATARS].connect_to_signal('AvatarUpdated', self._avatar_updated_cb) self._conn[CONN_INTERFACE_AVATARS].connect_to_signal('AvatarUpdated', self._avatar_updated_cb)
# hack
self._conn._valid_interfaces.add(CONN_INTERFACE_BUDDY_INFO)
if CONN_INTERFACE_BUDDY_INFO not in self._conn.get_valid_interfaces(): if CONN_INTERFACE_BUDDY_INFO not in self._conn.get_valid_interfaces():
print 'OLPC information not available' print 'OLPC information not available'
self.disconnect() self.disconnect()