summaryrefslogtreecommitdiff
path: root/winSettings.py
diff options
context:
space:
mode:
authorjerous <jerous@gmail.com>2008-06-16 01:13:05 +0200
committerjerous <jerous@gmail.com>2008-06-16 01:13:05 +0200
commite94520bf970684506c795dd46a436d340e5a16d6 (patch)
treecdf58c86b2d742680651efc9ea56c6f537cc1bd1 /winSettings.py
parent07dcc760a9843a36d955925d75abce1bbb1c73fc (diff)
listener for plugins unloading/loading
Diffstat (limited to 'winSettings.py')
-rw-r--r--winSettings.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/winSettings.py b/winSettings.py
index 5413735..f4b2ff0 100644
--- a/winSettings.py
+++ b/winSettings.py
@@ -32,7 +32,6 @@ class winSettings(QtGui.QWidget):
item.setCheckState(QtCore.Qt.Checked)
self.lstPlugins.addItem(item)
tabWidget.addTab(plugin.getSettingsWidget(), plugin.getName())
-
layoutWin.addWidget(tabWidget)
layoutWin.addLayout(layoutButtons)
@@ -41,6 +40,8 @@ class winSettings(QtGui.QWidget):
layoutButtons.addWidget(self.btnSave)
layoutButtons.addWidget(self.btnClose)
+ self.connect(self.lstPlugins, QtCore.SIGNAL('itemChanged (QListWidgetItem*)'), self.onlstPluginItemChanged)
+
self.setWindowIcon(appIcon)
self.setWindowTitle('Settings')
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
@@ -59,7 +60,11 @@ class winSettings(QtGui.QWidget):
plugin.saveSettings()
def onBtnCloseClick(self):
self.close()
-
+ def onlstPluginItemChanged(self, item):
+ # check here if we have to load or unload the plugin!
+ row=self.lstPlugins.row(item)
+ #self.winMain.plugins[row]=None
+ return
def closeEvent(self, event):
for p in self.winMain.plugins:
plugin=self.winMain.plugins[p]