From a2489b49d4ad6aa1b33df8563cde8041b8dc524b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 22 Sep 2006 21:49:59 +0200 Subject: [PATCH] Fix a few bugs --- shell/view/BuddyIcon.py | 7 ++----- shell/view/Shell.py | 2 +- shell/view/home/MeshGroup.py | 6 ++++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/shell/view/BuddyIcon.py b/shell/view/BuddyIcon.py index 4fec55b0..9ae709a5 100644 --- a/shell/view/BuddyIcon.py +++ b/shell/view/BuddyIcon.py @@ -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) diff --git a/shell/view/Shell.py b/shell/view/Shell.py index 9eb8d469..0b54e19b 100644 --- a/shell/view/Shell.py +++ b/shell/view/Shell.py @@ -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: diff --git a/shell/view/home/MeshGroup.py b/shell/view/home/MeshGroup.py index 4578a010..fee9079b 100644 --- a/shell/view/home/MeshGroup.py +++ b/shell/view/home/MeshGroup.py @@ -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)