# HG changeset patch # User etisserant # Date 1216137424 -7200 # Node ID aa5f43bafad4b53b9d51f998ce62489abcbe45aa # Parent cf99e75b6ddaace6082582f2f6691ef6b4adfb02 minor gui improvements : - smaller plugin name field, indented according plugin depth - C editor icon - IEC editor icon diff -r cf99e75b6dda -r aa5f43bafad4 Beremiz.py --- a/Beremiz.py Tue Jul 15 17:35:19 2008 +0200 +++ b/Beremiz.py Tue Jul 15 17:57:04 2008 +0200 @@ -717,17 +717,17 @@ addbutton.Bind(wx.EVT_BUTTON, self.Gen_AddPluginMenu(plugin), id=addbutton_id) adddeletesizer.AddWindow(addbutton, 0, border=5, flag=wx.RIGHT|wx.ALIGN_CENTER) + expandbutton_id = wx.NewId() + expandbutton = wx.lib.buttons.GenBitmapToggleButton(id=expandbutton_id, bitmap=wx.Bitmap(os.path.join(CWD, 'images', 'plus.png')), + name='ExpandButton', parent=leftwindow, pos=wx.Point(0, 0), + size=wx.Size(13, 13), style=wx.NO_BORDER) + expandbutton.labelDelta = 0 + expandbutton.SetBezelWidth(0) + expandbutton.SetUseFocusIndicator(False) + expandbutton.SetBitmapSelected(wx.Bitmap(os.path.join(CWD, 'images', 'minus.png'))) + expandbutton.SetToggle(self.PluginInfos[plugin]["expanded"]) + if len(self.PluginInfos[plugin]["children"]) > 0: - expandbutton_id = wx.NewId() - expandbutton = wx.lib.buttons.GenBitmapToggleButton(id=expandbutton_id, bitmap=wx.Bitmap(os.path.join(CWD, 'images', 'plus.png')), - name='ExpandButton', parent=leftwindow, pos=wx.Point(0, 0), - size=wx.Size(13, 13), style=wx.NO_BORDER) - expandbutton.labelDelta = 0 - expandbutton.SetBezelWidth(0) - expandbutton.SetUseFocusIndicator(False) - expandbutton.SetBitmapSelected(wx.Bitmap(os.path.join(CWD, 'images', 'minus.png'))) - expandbutton.SetToggle(self.PluginInfos[plugin]["expanded"]) - def togglebutton(event): if expandbutton.GetToggle(): self.ExpandPlugin(plugin) @@ -738,14 +738,16 @@ self.RefreshScrollBars() event.Skip() expandbutton.Bind(wx.EVT_BUTTON, togglebutton, id=expandbutton_id) - leftbuttonsizer.AddWindow(expandbutton, 0, border=5, flag=wx.RIGHT|wx.ALIGN_CENTER_VERTICAL) + else: + expandbutton.Enable(False) + iecsizer.AddWindow(expandbutton, 0, border=5, flag=wx.RIGHT|wx.ALIGN_CENTER_VERTICAL) tc_id = wx.NewId() - tc = wx.TextCtrl(leftwindow, tc_id, size=wx.Size(150, 35), style=wx.NO_BORDER) + tc = wx.TextCtrl(leftwindow, tc_id, size=wx.Size(150, 25), style=wx.NO_BORDER) tc.SetFont(wx.Font(faces["size"] * 0.75, wx.DEFAULT, wx.NORMAL, wx.BOLD, faceName = faces["helv"])) tc.SetValue(plugin.MandatoryParams[1].getName()) tc.Bind(wx.EVT_KILL_FOCUS, self.GetTextCtrlCallBackFunction(tc, plugin, "BaseParams.Name"), id=tc_id) - leftbuttonsizer.AddWindow(tc, 0, border=5, flag=wx.RIGHT|wx.ALIGN_CENTER_VERTICAL) + iecsizer.AddWindow(tc, 0, border=5, flag=wx.RIGHT|wx.ALIGN_CENTER_VERTICAL) leftminimizebutton_id = wx.NewId() diff -r cf99e75b6dda -r aa5f43bafad4 images/EditCfile.png Binary file images/EditCfile.png has changed diff -r cf99e75b6dda -r aa5f43bafad4 images/IECCDown.png Binary file images/IECCDown.png has changed diff -r cf99e75b6dda -r aa5f43bafad4 images/IECCUp.png Binary file images/IECCUp.png has changed diff -r cf99e75b6dda -r aa5f43bafad4 images/ShowIECcode.png Binary file images/ShowIECcode.png has changed diff -r cf99e75b6dda -r aa5f43bafad4 images/editIECrawcode.png Binary file images/editIECrawcode.png has changed diff -r cf99e75b6dda -r aa5f43bafad4 images/genicons.sh --- a/images/genicons.sh Tue Jul 15 17:35:19 2008 +0200 +++ b/images/genicons.sh Tue Jul 15 17:57:04 2008 +0200 @@ -4,9 +4,13 @@ for i in `cat icons.svg |grep -o -e '%%[^%]*%%'|sed 's/%//g'` do - echo "$INKSCAPE" icons.svg -z -e $i.png -i $i - rm -f $i.png - "$INKSCAPE" icons.svg -z -e $i.png -i $i + if [ $i.png -nt icons.svg ]; then + echo "Skip $i" + else + rm -f $i.png + echo "$INKSCAPE" icons.svg -z -e $i.png -i $i + "$INKSCAPE" icons.svg -z -e $i.png -i $i + fi done cp ico24.png brz.png diff -r cf99e75b6dda -r aa5f43bafad4 images/icons.svg --- a/images/icons.svg Tue Jul 15 17:35:19 2008 +0200 +++ b/images/icons.svg Tue Jul 15 17:57:04 2008 +0200 @@ -42,8 +42,8 @@ id="base" showgrid="true" inkscape:zoom="1" - inkscape:cx="431.15744" - inkscape:cy="809.69819" + inkscape:cx="440.43263" + inkscape:cy="865.35999" inkscape:window-x="47" inkscape:window-y="25" inkscape:current-layer="svg2" @@ -52,14 +52,21 @@ - + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transform="matrix(0.9968636,0,0,0.9968648,-6.725278,-12.08626)"> - - - - - ST - - - - - - - - - - - - - - - - - - - + id="g16346" + transform="translate(1600.9892,-350.1329)"> + + + ST + + + + + + + + + + + + + + + + + %% Add Delete Disabled Enabled HideVars IECCDown IECCUp Maximize Minimize minus plus ShowVars %% + transform="translate(25.999952,123.97794)"> + transform="translate(19.498009,119.61597)"> + transform="matrix(0.9968618,0,0,0.996865,-396.72428,99.913609)"> + transform="matrix(0.9968618,0,0,0.9968618,-339.72428,79.915124)"> + transform="matrix(0.965737,0,0,0.965737,-233.99669,79.166717)"> + - - - - + style="fill:url(#linearGradient16279);fill-opacity:1;stroke:url(#linearGradient16281)" + id="g59085" + transform="matrix(1,0,0,-1,-6.571463,804.20104)"> + + - - - - + style="fill:url(#linearGradient16270);fill-opacity:1;stroke:url(#linearGradient16272)" + id="g59118" + transform="translate(39.428537,314.5234)"> + + transform="matrix(0.9968629,0,0,0.9968629,-119.72484,1.91483)"> + transform="translate(20,119.91553)"> + transform="matrix(0.996861,0,0,0.996861,17.276127,-43.08392)"> + transform="matrix(0.996861,0,0,0.996861,58.276127,-63.08387)"> %% Compiler TargetType %% + transform="matrix(9.6211589e-2,0,0,9.6211589e-2,359.72267,486.8136)"> @@ -84010,7 +84440,7 @@ + transform="matrix(5.3097304e-2,0,0,5.3097304e-2,387.38564,480.36282)"> Beremiz icons + transform="translate(1165.0472,-113.94633)"> Pre-Alpha Release. Copyright © LOLITECH 2008 %% splash %% + y="771.29181" + x="323.28137" + style="font-size:12.76000023px">%% splash %% + %% editIECrawcode EditCfile %% + + + ST + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r cf99e75b6dda -r aa5f43bafad4 plugger.py --- a/plugger.py Tue Jul 15 17:35:19 2008 +0200 +++ b/plugger.py Tue Jul 15 17:57:04 2008 +0200 @@ -1169,11 +1169,12 @@ "tooltip" : "Stop Running PLC", "method" : "_Stop"}, {"bitmap" : os.path.join("images", "ShowIECcode"), - "name" : "Show IEC code", + "name" : "Show code", "enabled" : False, "tooltip" : "Show IEC code generated by PLCGenerator", "method" : "_showIECcode"}, - {"name" : "Edit raw IEC code", + {"bitmap" : os.path.join("images", "editIECrawcode"), + "name" : "Append code", "tooltip" : "Edit raw IEC code added to code generated by PLCGenerator", "method" : "_editIECrawcode"} ] diff -r cf99e75b6dda -r aa5f43bafad4 plugins/c_ext/c_ext.py --- a/plugins/c_ext/c_ext.py Tue Jul 15 17:35:19 2008 +0200 +++ b/plugins/c_ext/c_ext.py Tue Jul 15 17:57:04 2008 +0200 @@ -200,7 +200,8 @@ self._View.Show() PluginMethods = [ - {"name" : "Edit C File", + {"bitmap" : os.path.join("images", "EditCfile"), + "name" : "Edit C File", "tooltip" : "Edit C File", "method" : "_OpenView"}, ]