Cleanup browser model service on destroy.

Remove the activity service even if the owner is gone.
This commit is contained in:
Marco Pesenti Gritti
2006-09-12 13:21:18 +02:00
parent d65e8b88e7
commit 53f7cc1f34
4 changed files with 17 additions and 9 deletions
+5
View File
@@ -25,6 +25,7 @@ class BrowserActivity(Activity):
self._model = None
self.set_title("Web Page")
self.connect('destroy', self._destroy_cb)
vbox = gtk.VBox()
@@ -123,3 +124,7 @@ class BrowserActivity(Activity):
self._notif_bar.set_action('goto_shared_location', 'Go There')
self._notif_bar.set_icon('stock_right')
self._notif_bar.show()
def _destroy_cb(self, window):
if self._model:
self._model.shutdown()