Added plugin deletion
authoretisserant
Mon, 24 Sep 2007 17:05:07 +0200
changeset 50 447b7706a5b6
parent 49 45dc6a944ab6
child 51 c31c55601556
Added plugin deletion
Beremiz.py
--- a/Beremiz.py	Fri Sep 21 17:48:34 2007 +0200
+++ b/Beremiz.py	Mon Sep 24 17:05:07 2007 +0200
@@ -806,7 +806,13 @@
         dialog.Destroy()
     
     def DeletePlugin(self):
-        pass
+        dialog = wx.MessageDialog(self,"Really delete plugin ?", "Remove plugin",wx.YES_NO|wx.NO_DEFAULT)
+        if dialog.ShowModal() == wx.ID_YES:
+            plugin = self.GetSelectedPlugin()
+            plugin.PlugRemove()
+            del plugin
+            self.RefreshPluginTree()
+        dialog.Destroy()
 
 #-------------------------------------------------------------------------------
 #                               Exception Handler