Do not set up the owner of the presence service if there

is no nick name in the env. I'm not sure this is the best
approach, we need to figure it out.

First go at the new simulator.
This commit is contained in:
Marco Pesenti Gritti
2006-10-09 15:11:15 +02:00
parent 1dd8f78453
commit cbd3a52a68
6 changed files with 92 additions and 5 deletions
+8 -3
View File
@@ -5,6 +5,7 @@ import Activity
import random
import logging
from sugar import util
from sugar import env
import BuddyIconCache
@@ -302,9 +303,13 @@ class PresenceService(object):
self._icon_cache = BuddyIconCache.BuddyIconCache()
# Our owner object
objid = self._get_next_object_id()
self._owner = Buddy.Owner(self, self._bus_name, objid, self._icon_cache)
self._buddies[self._owner.get_name()] = self._owner
if env.get_nick_name():
objid = self._get_next_object_id()
self._owner = Buddy.Owner(self, self._bus_name,
objid, self._icon_cache)
self._buddies[self._owner.get_name()] = self._owner
else:
self._owner = None
self._started = False