Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-08-11 23:29:55 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-08-11 23:29:55 (GMT)
commitfc1aefc72c35b830ae36e5f29fce31947eb70dd7 (patch)
tree3752aee2f4534d2ff31188d6cd0f12e2ae61b53b /sugar
parentc5fb39875c9a6609868ef7295193840df183a6f4 (diff)
Use dbus-launch with the --exit-with-session. dbus not exiting still not fully solved.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/Activity.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/sugar/activity/Activity.py b/sugar/activity/Activity.py
index 13077ea..36678aa 100644
--- a/sugar/activity/Activity.py
+++ b/sugar/activity/Activity.py
@@ -72,6 +72,8 @@ class Activity(gtk.Window):
def __init__(self):
gtk.Window.__init__(self)
+ self.connect('destroy', self.__destroy_cb)
+
self._shared = False
self._activity_id = None
self._default_type = None
@@ -89,11 +91,6 @@ class Activity(gtk.Window):
self._bus = ActivityDbusService(bus_name, get_object_path(xid))
self._bus.start(self._pservice, self)
- def __del__(self):
- if self._bus:
- del self._bus
- self._bus = None
-
def set_default_type(self, default_type):
"""Set the activity default type.
@@ -145,3 +142,10 @@ class Activity(gtk.Window):
def execute(self, command, args):
"""Execute the given command with args"""
pass
+
+ def __destroy_cb(self, window):
+ if self._bus:
+ del self._bus
+ self._bus = None
+ if self._service:
+ self._pservice.unregister_service(self._service)