Remove buttons from all windows on unload

- Remove not yet present import of i18n
This commit is contained in:
Juraj Oravec 2019-05-15 20:56:10 +02:00
parent a90465f716
commit 256de794a3
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07
2 changed files with 7 additions and 4 deletions

View File

@ -22,7 +22,7 @@ from autoZoomer.autoZoomer import AutoZoomer
from autoZoomer.button import AutoZoomerButton
class Zoomer_Plugin(Falkon.PluginInterface, QtCore.QObject):
class AutoZoomer_Plugin(Falkon.PluginInterface, QtCore.QObject):
manager = None
buttons = {}
@ -42,7 +42,11 @@ class Zoomer_Plugin(Falkon.PluginInterface, QtCore.QObject):
def unload(self):
self.manager.saveSettings()
self.mainWindowDeleted(self.window)
for window in Falkon.MainApplication.instance().windows():
self.mainWindowDeleted(window)
del self.manager
self.manager = None
def testPlugin(self):
return True
@ -72,4 +76,4 @@ class Zoomer_Plugin(Falkon.PluginInterface, QtCore.QObject):
page.loadFinished.connect(onLoadFinished)
Falkon.registerPlugin(Zoomer_Plugin())
Falkon.registerPlugin(AutoZoomer_Plugin())

View File

@ -19,7 +19,6 @@
import os
from PySide2 import QtCore, QtWidgets, QtUiTools
from autoZoomer.listItem import ListItem
from autoZoomer.i18n import i18n
class SettingsDialog(QtWidgets.QDialog):