Fix plugin loading when Falkon is running

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-05-17 18:57:21 +02:00
parent a9b689ac88
commit ddba4a570e
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -27,6 +27,8 @@ class AutoZoomer_Plugin(Falkon.PluginInterface, QtCore.QObject):
buttons = {} buttons = {}
def init(self, state, settingsPath): def init(self, state, settingsPath):
self.manager = AutoZoomer(settingsPath)
plugins = Falkon.MainApplication.instance().plugins() plugins = Falkon.MainApplication.instance().plugins()
plugins.mainWindowCreated.connect(self.mainWindowCreated) plugins.mainWindowCreated.connect(self.mainWindowCreated)
@ -38,8 +40,6 @@ class AutoZoomer_Plugin(Falkon.PluginInterface, QtCore.QObject):
for window in Falkon.MainApplication.instance().windows(): for window in Falkon.MainApplication.instance().windows():
self.mainWindowCreated(window) self.mainWindowCreated(window)
self.manager = AutoZoomer(settingsPath)
def unload(self): def unload(self):
self.manager.saveSettings() self.manager.saveSettings()
for window in Falkon.MainApplication.instance().windows(): for window in Falkon.MainApplication.instance().windows():