Add a start method to the activity module, for initialization.
This commit is contained in:
parent
5d78b148ff
commit
72d43fde28
@ -17,11 +17,6 @@ class BrowserActivity(Activity):
|
||||
def __init__(self):
|
||||
Activity.__init__(self)
|
||||
|
||||
gtkmozembed.push_startup()
|
||||
gtkmozembed.set_profile_path(env.get_profile_path(), 'gecko')
|
||||
|
||||
gecko.startup()
|
||||
|
||||
self._share_service = None
|
||||
self._model_service = None
|
||||
self._notif_service = None
|
||||
@ -132,3 +127,8 @@ class BrowserActivity(Activity):
|
||||
def _destroy_cb(self, window):
|
||||
if self._model:
|
||||
self._model.shutdown()
|
||||
|
||||
def start():
|
||||
gtkmozembed.set_profile_path(env.get_profile_path(), 'gecko')
|
||||
gtkmozembed.push_startup()
|
||||
gecko.startup()
|
||||
|
@ -29,7 +29,9 @@ class ActivityFactory(dbus.service.Object):
|
||||
module = __import__(module_name)
|
||||
for comp in module_name.split('.')[1:]:
|
||||
module = getattr(module, comp)
|
||||
|
||||
if hasattr(module, 'start'):
|
||||
module.start()
|
||||
|
||||
self._class = getattr(module, class_name)
|
||||
|
||||
bus = dbus.SessionBus()
|
||||
|
Loading…
Reference in New Issue
Block a user