From: Stefanos Harhalakis Date: Mon, 2 Aug 2010 21:50:56 +0000 (+0000) Subject: Only create one instance of dbus. X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=294d8221fc092db9cb140dd1de3a0d0d5bb0bd99;hp=97ecd4b9fdb91f797b6a6ddbac335e52326845e0;p=drlaunch Only create one instance of dbus. --- diff --git a/src/launcher.py b/src/launcher.py index dacde19..36d14bc 100755 --- a/src/launcher.py +++ b/src/launcher.py @@ -30,10 +30,12 @@ proxy=None def init(): global bus, proxy - bus=dbus.SessionBus() + if bus==None: + bus=dbus.SessionBus() - proxy=bus.get_object('com.nokia.HildonDesktop.AppMgr', - '/com/nokia/HildonDesktop/AppMgr') + if proxy==None: + proxy=bus.get_object('com.nokia.HildonDesktop.AppMgr', + '/com/nokia/HildonDesktop/AppMgr') def launch(prog): global bus, proxy