Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChatController.py5
-rw-r--r--shell/Owner.py6
-rw-r--r--shell/PresenceService/PresenceService.py4
-rwxr-xr-xshell/Shell.py3
-rw-r--r--sugar/env.py4
5 files changed, 11 insertions, 11 deletions
diff --git a/shell/ChatController.py b/shell/ChatController.py
index 0b4068d..b1b39d3 100644
--- a/shell/ChatController.py
+++ b/shell/ChatController.py
@@ -1,4 +1,4 @@
-from sugar import env
+from sugar import conf
from sugar.chat.BuddyChat import BuddyChat
from sugar.activity import ActivityFactory
from sugar.presence import PresenceService
@@ -24,7 +24,8 @@ class ChatController:
self._pservice = PresenceService.get_instance()
self._pservice.register_service_type(BuddyChat.SERVICE_TYPE)
- self._service = self._pservice.register_service(env.get_nick_name(),
+ profile = conf.get_profile()
+ self._service = self._pservice.register_service(profile.get_nick_name(),
BuddyChat.SERVICE_TYPE)
self._buddy_stream = Stream.new_from_service(self._service)
diff --git a/shell/Owner.py b/shell/Owner.py
index e2e64e8..fe9682a 100644
--- a/shell/Owner.py
+++ b/shell/Owner.py
@@ -14,8 +14,10 @@ class ShellOwner(object):
runs in the shell and serves up the buddy icon and other stuff. It's the
server portion of the Owner, paired with the client portion in Buddy.py."""
def __init__(self):
- self._nick = env.get_nick_name()
- user_dir = env.get_profile_path()
+ profile = conf.get_profile()
+
+ self._nick = profile.get_nick_name()
+ user_dir = profile.get_path()
self._icon = None
for fname in os.listdir(user_dir):
diff --git a/shell/PresenceService/PresenceService.py b/shell/PresenceService/PresenceService.py
index fe97698..f40d6e7 100644
--- a/shell/PresenceService/PresenceService.py
+++ b/shell/PresenceService/PresenceService.py
@@ -6,7 +6,7 @@ import random
import logging
from sugar import env
from sugar import util
-
+from sugar import conf
def _get_local_ip_address(ifname):
"""Call Linux specific bits to retrieve our own IP address."""
@@ -370,7 +370,7 @@ class PresenceService(object):
self._dbus_helper.ServiceAppeared(service.object_path())
except KeyError:
# Should this service mark the owner?
- owner_nick = env.get_nick_name()
+ owner_nick = conf.get_profile().get_nick_name()
source_addr = service.get_source_address()
objid = self._get_next_object_id()
if name == owner_nick and source_addr in self._local_addrs.values():
diff --git a/shell/Shell.py b/shell/Shell.py
index b79e245..59cfc59 100755
--- a/shell/Shell.py
+++ b/shell/Shell.py
@@ -75,7 +75,8 @@ class Shell(gobject.GObject):
self._screen.connect("showing_desktop_changed",
self.__showing_desktop_changed_cb)
- if env.get_nick_name() == None:
+ profile = conf.get_profile()
+ if profile.get_nick_name() == None:
dialog = FirstTimeDialog()
dialog.connect('destroy', self.__first_time_dialog_destroy_cb)
dialog.set_transient_for(self._home_window)
diff --git a/sugar/env.py b/sugar/env.py
index 6f654f3..992bcf3 100644
--- a/sugar/env.py
+++ b/sugar/env.py
@@ -60,10 +60,6 @@ def get_profile_path():
return os.path.join(path, profile_id)
-def get_nick_name():
- profile = sugar.conf.get_profile()
- return profile.get_nick_name()
-
def get_data_dir():
return sugar_data_dir