merge with plugins
This commit is contained in:
parent
b2fa484bb3
commit
a214ab12c7
12 changed files with 579 additions and 12 deletions
10
src/main.py
10
src/main.py
|
|
@ -15,6 +15,7 @@ import locale
|
|||
import toxencryptsave
|
||||
from passwordscreen import PasswordScreen
|
||||
import profile
|
||||
from plugin_support import PluginLoader
|
||||
|
||||
|
||||
class Toxygen(object):
|
||||
|
|
@ -191,6 +192,9 @@ class Toxygen(object):
|
|||
self.ms.show()
|
||||
QtGui.QApplication.setStyle(get_style(settings['theme'])) # set application style
|
||||
|
||||
plugin_helper = PluginLoader(self.tox, settings) # plugin support
|
||||
plugin_helper.load()
|
||||
|
||||
# init thread
|
||||
self.init = self.InitThread(self.tox, self.ms, self.tray)
|
||||
self.init.start()
|
||||
|
|
@ -200,11 +204,13 @@ class Toxygen(object):
|
|||
self.mainloop.start()
|
||||
self.avloop = self.ToxAVIterateThread(self.tox.AV)
|
||||
self.avloop.start()
|
||||
|
||||
app.connect(app, QtCore.SIGNAL("lastWindowClosed()"), app, QtCore.SLOT("quit()"))
|
||||
app.exec_()
|
||||
self.init.stop = True
|
||||
self.mainloop.stop = True
|
||||
self.avloop.stop = True
|
||||
plugin_helper.stop()
|
||||
self.mainloop.wait()
|
||||
self.init.wait()
|
||||
self.avloop.wait()
|
||||
|
|
@ -239,6 +245,10 @@ class Toxygen(object):
|
|||
|
||||
self.avloop = self.ToxAVIterateThread(self.tox.AV)
|
||||
self.avloop.start()
|
||||
|
||||
plugin_helper = PluginLoader.get_instance()
|
||||
plugin_helper.set_tox(self.tox)
|
||||
|
||||
return self.tox
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue