Unregister the chat service on destroy.
This commit is contained in:
parent
21aa37cc24
commit
cf13a7ff5b
@ -139,7 +139,4 @@ class BuddyModel(gobject.GObject):
|
||||
def __buddy_current_activity_changed_cb(self, buddy, activity=None):
|
||||
if not self._buddy:
|
||||
return
|
||||
if activity:
|
||||
self.emit('current-activity-changed', activity)
|
||||
else:
|
||||
self.emit('current-activity-changed')
|
||||
self.emit('current-activity-changed', activity)
|
||||
|
@ -150,6 +150,6 @@ class ActivityHost:
|
||||
|
||||
def _activity_closed_cb(self, shell, activity):
|
||||
if activity == self:
|
||||
self.chat_hide()
|
||||
self._chat_window.destroy()
|
||||
self._frame_was_visible = False
|
||||
|
||||
|
@ -26,6 +26,8 @@ class ActivityChat(GroupChat):
|
||||
GroupChat.__init__(self)
|
||||
self._chat_service = None
|
||||
|
||||
self.connect('destroy', self._destroy_cb)
|
||||
|
||||
self._activity = activity
|
||||
self._pservice.register_service_type(ActivityChat.SERVICE_TYPE)
|
||||
self._pservice.connect('service-appeared', self._service_appeared_cb)
|
||||
@ -59,3 +61,6 @@ class ActivityChat(GroupChat):
|
||||
self._chat_service = self._pservice.share_activity(self._activity,
|
||||
stype=ActivityChat.SERVICE_TYPE)
|
||||
self._setup_stream(self._chat_service)
|
||||
|
||||
def _destroy_cb(self, widget):
|
||||
self._pservice.unregister_service(self._chat_service)
|
||||
|
Loading…
Reference in New Issue
Block a user