Fix a few bugs
This commit is contained in:
parent
f2b2b8c6ba
commit
a2489b49d4
@ -20,10 +20,8 @@ class BuddyIcon(MenuIcon):
|
||||
def _popup_action_cb(self, popup, action):
|
||||
self.popdown()
|
||||
|
||||
model = self._shell.get_model()
|
||||
|
||||
friends = self._shell.get_model().get_friends()
|
||||
if action == BuddyMenu.ACTION_REMOVE_FRIEND:
|
||||
friends = model.get_friends()
|
||||
friends.remove(self._friend)
|
||||
|
||||
buddy = self._friend.get_buddy()
|
||||
@ -31,8 +29,7 @@ class BuddyIcon(MenuIcon):
|
||||
return
|
||||
|
||||
if action == BuddyMenu.ACTION_INVITE:
|
||||
activity = model.get_current_activity()
|
||||
activity = self._shell.get_current_activity()
|
||||
activity.invite(buddy)
|
||||
elif action == BuddyMenu.ACTION_MAKE_FRIEND:
|
||||
friends = model.get_friends()
|
||||
friends.make_friend(buddy)
|
||||
|
@ -111,7 +111,7 @@ class Shell(gobject.GObject):
|
||||
def join_activity(self, bundle_id, activity_id):
|
||||
pservice = PresenceService.get_instance()
|
||||
|
||||
activity = self._model.get_activity(activity_id)
|
||||
activity = self._get_activity(activity_id)
|
||||
if activity:
|
||||
activity.present()
|
||||
else:
|
||||
|
@ -41,8 +41,10 @@ class MeshGroup(goocanvas.Group):
|
||||
self._activities = {}
|
||||
|
||||
self._pservice = PresenceService.get_instance()
|
||||
self._pservice.connect("service-appeared", self._service_appeared_cb)
|
||||
self._pservice.connect('activity-disappeared', self._activity_disappeared_cb)
|
||||
self._pservice.connect("service-appeared",
|
||||
self._service_appeared_cb)
|
||||
self._pservice.connect('activity-disappeared',
|
||||
self._activity_disappeared_cb)
|
||||
|
||||
for service in self._pservice.get_services():
|
||||
self._check_service(service)
|
||||
|
Loading…
Reference in New Issue
Block a user