diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-07-09 16:40:53 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-08-20 13:02:27 (GMT) |
commit | dc117de116eb7bd6da5a1ba931ebff908ebcf684 (patch) | |
tree | 9b843ac367509fcaaa71e4ff4960084f35f19ecf | |
parent | 33d82119e994ec8ab8282238038adccc5a306baa (diff) |
Set the public key from the profile and announce it in the network
-rw-r--r-- | src/jarabe/model/buddy.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jarabe/model/buddy.py b/src/jarabe/model/buddy.py index d52bb51..b908e10 100644 --- a/src/jarabe/model/buddy.py +++ b/src/jarabe/model/buddy.py @@ -18,9 +18,11 @@ import logging import gobject import gconf +import dbus from sugar.presence import presenceservice from sugar.graphics.xocolor import XoColor +from sugar.profile import get_profile from jarabe.util.telepathy import connection_watcher @@ -101,6 +103,8 @@ class OwnerBuddyModel(BaseBuddyModel): self.props.nick = client.get_string("/desktop/sugar/user/nick") self.props.color = XoColor(client.get_string("/desktop/sugar/user/color")) + self.props.key = get_profile().pubkey + self.connect('notify::nick', self.__property_changed_cb) self.connect('notify::color', self.__property_changed_cb) @@ -123,7 +127,7 @@ class OwnerBuddyModel(BaseBuddyModel): if CONNECTION_INTERFACE_BUDDY_INFO in connection: properties = {} if self.props.key is not None: - properties['key'] = self.props.key + properties['key'] = dbus.ByteArray(self.props.key) if self.props.color is not None: properties['color'] = self.props.color.to_string() |