Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2008-10-11 20:32:50 (GMT)
committer Simon Schampijer <simon@schampijer.de>2008-10-11 20:32:50 (GMT)
commit3a4856a069075296a0320c14dabf76fe341a505a (patch)
treebc2162fd9ef6c7bdb6cb5d42b1dc88ce9f991f99
parent3273bacf555ada0a8a4ffe8c35ec0083d0fdde53 (diff)
Update for gconf change in the profile
-rw-r--r--src/buddy.py9
-rw-r--r--src/server_plugin.py8
2 files changed, 10 insertions, 7 deletions
diff --git a/src/buddy.py b/src/buddy.py
index 84da0a7..7187709 100644
--- a/src/buddy.py
+++ b/src/buddy.py
@@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import gconf
import os
import logging
try:
@@ -951,13 +952,15 @@ class ShellOwner(GenericOwner):
calls GenericOwner.__init__
"""
+ client = gconf.client_get_default()
profile = get_profile()
- server = profile.jabber_server
+ server = client.get_string("/desktop/sugar/collaboration/jabber_server")
key_hash = profile.privkey_hash
key = profile.pubkey
- nick = profile.nick_name
- color = profile.color.to_string()
+
+ nick = client.get_string("/desktop/sugar/user/nick")
+ color = client.get_string("/desktop/sugar/user/color")
icon_file = os.path.join(env.get_profile_path(), "buddy-icon.jpg")
f = open(icon_file, "r")
diff --git a/src/server_plugin.py b/src/server_plugin.py
index c81a936..1f5658c 100644
--- a/src/server_plugin.py
+++ b/src/server_plugin.py
@@ -22,6 +22,7 @@ import logging
import os
from itertools import izip
from string import hexdigits
+import gconf
# Other libraries
import dbus
@@ -33,7 +34,6 @@ from telepathy.constants import (HANDLE_TYPE_CONTACT, HANDLE_TYPE_GROUP,
CONNECTION_STATUS_CONNECTED, CONNECTION_STATUS_DISCONNECTED,
CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES,
CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED)
-import sugar.profile
# Presence Service local modules
import psutils
@@ -368,15 +368,15 @@ class ServerPlugin(TelepathyPlugin):
# not ready yet
return
- config_path = os.path.join(sugar.env.get_profile_path(), 'config')
- profile = sugar.profile.Profile(config_path)
+ client = gconf.client_get_default()
+ server = client.get_string("/desktop/sugar/collaboration/jabber_server")
friends_handles = set()
friends = set()
for key in keys:
id = psutils.pubkey_to_keyid(key)
# this assumes that all our friends are on the same server as us
- jid = '%s@%s' % (id, profile.jabber_server)
+ jid = '%s@%s' % (id, server)
friends.add(jid)
def error_syncing_friends(e):