Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-09-19 17:20:40 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-09-19 17:20:40 (GMT)
commitc74276dcdbbd51df8d1a9ec40326cf5e26244267 (patch)
tree90423c06e35da46b494ccd8dddefeb2413a3c979 /shell
parentc6459583ee4e83db1a33bc5c3c9f9719ebddb8ed (diff)
Always remove invites from the frame
Conflicts: NEWS
Diffstat (limited to 'shell')
-rw-r--r--shell/model/Invites.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/model/Invites.py b/shell/model/Invites.py
index d4779f1..9ffab44 100644
--- a/shell/model/Invites.py
+++ b/shell/model/Invites.py
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import gobject
+from sugar.presence import presenceservice
class Invite:
def __init__(self, issuer, bundle_id, activity_id):
@@ -41,6 +42,10 @@ class Invites(gobject.GObject):
self._dict = {}
+ ps = presenceservice.get_instance()
+ owner = ps.get_owner()
+ owner.connect('joined-activity', self._owner_joined_cb)
+
def add_invite(self, issuer, bundle_id, activity_id):
if activity_id in self._dict:
# there is no point to add more than one time
@@ -60,5 +65,8 @@ class Invites(gobject.GObject):
if invite is not None:
self.remove_invite(invite)
+ def _owner_joined_cb(self, owner, activity):
+ self.remove_activity(activity.props.id)
+
def __iter__(self):
return self._dict.values().__iter__()