Use dbus-launch with the --exit-with-session. dbus not exiting still not fully solved.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user