From: daid303 Date: Thu, 8 Nov 2012 12:39:17 +0000 (+0100) Subject: Implement the help button for plugins. X-Git-Tag: 13.03~198 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b871d1494eb275339497114d584bc0d21c1f3e24;p=cura.git Implement the help button for plugins. --- diff --git a/Cura/gui/pluginPanel.py b/Cura/gui/pluginPanel.py index e659a9ec..5b9969d2 100644 --- a/Cura/gui/pluginPanel.py +++ b/Cura/gui/pluginPanel.py @@ -1,5 +1,5 @@ -import wx,wx.stc -import sys,math,threading,os +import wx, wx.stc +import sys, math, threading, os, webbrowser from wx.lib import scrolledpanel from util import profile @@ -94,6 +94,7 @@ class pluginPanel(wx.Panel): s.Add(wx.StaticLine(pluginPanel), pos=(3+i,0), span=(1,4), flag=wx.EXPAND|wx.LEFT|wx.RIGHT,border=3) self.Bind(wx.EVT_BUTTON, self.OnRem, remButton) + self.Bind(wx.EVT_BUTTON, self.OnHelp, helpButton) s.AddGrowableCol(1) pluginPanel.SetBackgroundColour(self.GetParent().GetBackgroundColour()) @@ -140,3 +141,13 @@ class pluginPanel(wx.Panel): self.pluginConfig.pop(idx) profile.setPluginConfig(self.pluginConfig) + + def OnHelp(self, e): + panel = e.GetEventObject().GetParent() + sizer = self.pluginEnabledPanel.GetSizer() + idx = self.panelList.index(panel) + + fname = self.pluginConfig[idx]['filename'].lower() + fname = fname[0].upper() + fname[1:] + fname = fname[:fname.rfind('.')] + webbrowser.open('http://wiki.ultimaker.com/CuraPlugin:_' + fname)