diff --git a/shell/model/Owner.py b/shell/model/Owner.py index 7dec04a7..5443eb97 100644 --- a/shell/model/Owner.py +++ b/shell/model/Owner.py @@ -6,6 +6,7 @@ import conf from sugar import env from sugar.p2p import Stream from sugar.presence import PresenceService +from model.Friends import Friends PRESENCE_SERVICE_TYPE = "_presence_olpc._tcp" @@ -30,6 +31,11 @@ class ShellOwner(object): self._pservice = PresenceService.get_instance() + self._friends = Friends() + + def get_friends(self): + return self._friends + def announce(self): # Create and announce our presence color = conf.get_profile().get_color() diff --git a/shell/model/ShellModel.py b/shell/model/ShellModel.py index 4929fe79..2bdf08ab 100644 --- a/shell/model/ShellModel.py +++ b/shell/model/ShellModel.py @@ -1,7 +1,6 @@ import gobject from sugar.presence import PresenceService -from model.Friends import Friends from model.Invites import Invites from model.Owner import ShellOwner @@ -26,11 +25,10 @@ class ShellModel(gobject.GObject): self._owner = ShellOwner() self._owner.announce() - self._friends = Friends() self._invites = Invites() def get_friends(self): - return self._friends + return self._owner.get_friends() def get_invites(self): return self._invites