730 bkgdclr = CHANGED_WINDOW_COLOUR |
730 bkgdclr = CHANGED_WINDOW_COLOUR |
731 items = ["left", "right", "params"] |
731 items = ["left", "right", "params"] |
732 for i in items: |
732 for i in items: |
733 self.PluginInfos[plugin][i].SetBackgroundColour(bkgdclr) |
733 self.PluginInfos[plugin][i].SetBackgroundColour(bkgdclr) |
734 self.PluginInfos[plugin][i].Refresh() |
734 self.PluginInfos[plugin][i].Refresh() |
|
735 self.RefreshFileMenu() |
735 return res |
736 return res |
736 |
737 |
737 def ExpandPlugin(self, plugin, force = False): |
738 def ExpandPlugin(self, plugin, force = False): |
738 for child in self.PluginInfos[plugin]["children"]: |
739 for child in self.PluginInfos[plugin]["children"]: |
739 self.PluginInfos[child]["left"].Show() |
740 self.PluginInfos[child]["left"].Show() |
1444 if self.PluginRoot.CheckProjectPathPerm(): |
1445 if self.PluginRoot.CheckProjectPathPerm(): |
1445 dialog = wx.TextEntryDialog(self, _("Please enter a name for plugin:"), _("Add Plugin"), "", wx.OK|wx.CANCEL) |
1446 dialog = wx.TextEntryDialog(self, _("Please enter a name for plugin:"), _("Add Plugin"), "", wx.OK|wx.CANCEL) |
1446 if dialog.ShowModal() == wx.ID_OK: |
1447 if dialog.ShowModal() == wx.ID_OK: |
1447 PluginName = dialog.GetValue() |
1448 PluginName = dialog.GetValue() |
1448 plugin.PlugAddChild(PluginName, PluginType) |
1449 plugin.PlugAddChild(PluginName, PluginType) |
|
1450 self.PluginRoot.RefreshPluginsBlockLists() |
|
1451 self.RefreshFileMenu() |
1449 self.RefreshPluginTree() |
1452 self.RefreshPluginTree() |
1450 self.PluginRoot.RefreshPluginsBlockLists() |
|
1451 dialog.Destroy() |
1453 dialog.Destroy() |
1452 |
1454 |
1453 def DeletePlugin(self, plugin): |
1455 def DeletePlugin(self, plugin): |
1454 if self.PluginRoot.CheckProjectPathPerm(): |
1456 if self.PluginRoot.CheckProjectPathPerm(): |
1455 dialog = wx.MessageDialog(self, _("Really delete plugin ?"), _("Remove plugin"), wx.YES_NO|wx.NO_DEFAULT) |
1457 dialog = wx.MessageDialog(self, _("Really delete plugin ?"), _("Remove plugin"), wx.YES_NO|wx.NO_DEFAULT) |
1456 if dialog.ShowModal() == wx.ID_YES: |
1458 if dialog.ShowModal() == wx.ID_YES: |
1457 self.PluginInfos.pop(plugin) |
1459 self.PluginInfos.pop(plugin) |
1458 plugin.PlugRemove() |
1460 plugin.PlugRemove() |
1459 del plugin |
1461 del plugin |
1460 self.PluginRoot.RefreshPluginsBlockLists() |
1462 self.PluginRoot.RefreshPluginsBlockLists() |
|
1463 self.RefreshFileMenu() |
1461 self.RefreshPluginTree() |
1464 self.RefreshPluginTree() |
1462 dialog.Destroy() |
1465 dialog.Destroy() |
1463 |
1466 |
1464 #------------------------------------------------------------------------------- |
1467 #------------------------------------------------------------------------------- |
1465 # Exception Handler |
1468 # Exception Handler |