Fix invites

This commit is contained in:
Marco Pesenti Gritti 2006-09-15 16:04:30 +02:00
parent 7fb01c51e3
commit fe64b7c6d4
2 changed files with 7 additions and 3 deletions

View File

@ -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()

View File

@ -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