Selaa lähdekoodia

Extended "Lock Build File" to toolbar and added "goto"

- created and added icons (lock: closed, open, goto)
- added icons to toolbar + toggle support
- added "goto" menu entry
- disable unlock/goto without locked panel
- added tooltip to "locked" icon stating currently locked file path
- modified makeicons.bmx to add "toggle state icons" at the end
- added prebuilt icons (png)
- added licence for some (my) icons
Ronny Otto 6 vuotta sitten
vanhempi
commit
6dd543b518

+ 6 - 2
default.language.ini

@@ -20,9 +20,12 @@ tb_stepin                                    = "Step In"
 tb_stepout                                   = "Step Out"
 tb_stop                                      = "Stop"
 tb_home                                      = "Home"
-tb_back                                      = "Back"
-tb_forward                                   = "Forward"
+tb_back                                      = "Previous Help Page"
+tb_forward                                   = "Next Help Page"
 tb_continue                                  = "Continue"
+tb_lockbuildfile                             = "Lock Build File"
+tb_lockedbuildfile                           = "Current Build File"
+tb_gotobuildfile                             = "Goto Build File"
 
 ; Tabs
 tab_help                                     = "Help"
@@ -295,6 +298,7 @@ menu_program_buildoptions_overrideerrors     = "Raise 'override' errors not warn
 menu_program_buildoptions_gdbdebug           = "GDB Debug Generation"
 menu_program_lockbuildfile                   = "&Lock Build File"
 menu_program_unlockbuildfile                 = "&Unlock Build File"
+menu_program_gotobuildfile                   = "Goto Build File"
 menu_program_syncmods                        = "Synchronize Modules..."
 menu_program_buildmods                       = "Build &Modules"
 menu_program_rebuildallmods                  = "Rebuild &All Modules"

BIN
makeicons/24/LockClosed.png


BIN
makeicons/24/LockGoto.png


BIN
makeicons/24/LockOpen.png


BIN
makeicons/48/LockClosed.png


BIN
makeicons/48/LockGoto.png


BIN
makeicons/48/LockOpen.png


BIN
makeicons/64/LockClosed.png


BIN
makeicons/64/LockGoto.png


BIN
makeicons/64/LockOpen.png


+ 6 - 1
makeicons/makeicons.bmx

@@ -71,10 +71,15 @@ Function BuildIcons:TPixmap(sz:Int)
 End Function
 
 Function GetActions:String[]()
+	'attention: place all icons replacing other ones (eg toggle states)
+	'at the end of the file. Allows constant values to access
+	'toolbar indices _and_ iconStrip indices with the same value
 	Return [ "NewFile","OpenFile","CloseDocument","Save"," ", ..
 		 "Cut","Copy","Paste","Search"," ", ..
 		 "Build","Build-Run","StepOver","StepIn","StepOut","Stop"," ", ..
 		 "Home","StepBackwards","StepForward", ..
-		 "Go" ..
+		 " ", "LockOpen", "LockGoto", ..
+
+		 "Go", "LockClosed" ..
 		]
 End Function

+ 115 - 0
makeicons/source/LockClosed_16x.svg

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16"
+   height="16"
+   viewBox="0 0 16 16"
+   id="svg3342"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="LockClosed_16x.svg">
+  <defs
+     id="defs3344" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="19.068654"
+     inkscape:cx="4.0870203"
+     inkscape:cy="7.3406145"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     units="px"
+     inkscape:snap-page="true"
+     inkscape:snap-to-guides="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1143"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3354" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3347">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Ebene 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1036.3622)">
+    <path
+       style="fill:#00539c;fill-opacity:1;stroke:#f6f6f6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 7 2 C 5.8919904 2 5 2.892 5 4 L 5 6 C 3.892058 6 3 6.892 3 8 L 3 13 C 3 14.1079 3.892058 15 5 15 L 11 15 C 12.107942 15 13 14.1079 13 13 L 13 8 C 13 6.892 12.107942 6 11 6 L 11 4 C 11 2.892 10.108009 2 9 2 L 7 2 z M 7 3 L 9 3 C 9.554009 3 10 3.446 10 4 L 10 6 L 6 6 L 6 4 C 6 3.446 6.44599 3 7 3 z "
+       id="rect3358-35"
+       transform="translate(0,1036.3622)" />
+    <rect
+       style="fill:#a1260d;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3358"
+       width="10"
+       height="8.9999828"
+       x="3"
+       y="1042.3622"
+       ry="1.9998953" />
+    <rect
+       style="fill:#f0eff1;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3358-3"
+       width="8"
+       height="6.9999828"
+       x="4"
+       y="1043.3622"
+       ry="0.99989533" />
+    <rect
+       style="fill:#854134;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill-rule:nonzero;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="rect4175"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1044.3622"
+       ry="0.5" />
+    <rect
+       style="fill:#854134;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect4175-6"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1048.3622"
+       ry="0.5" />
+    <path
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="m 7,1038.3622 c -1.1080096,0 -2,0.892 -2,2 l 0,2 1,0 0,-2 c 0,-0.554 0.44599,-1 1,-1 l 2,0 c 0.554009,0 1,0.446 1,1 l 0,2 1,0 0,-2 c 0,-1.108 -0.891991,-2 -2,-2 z"
+       id="rect4218"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ssccssssccsss" />
+    <rect
+       style="fill:#854134;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect4175-5"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1046.3622"
+       ry="0.5" />
+  </g>
+</svg>

+ 127 - 0
makeicons/source/LockGoto_16x.svg

@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16"
+   height="16"
+   viewBox="0 0 16 16"
+   id="svg3342"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="LockGoto_16x.svg">
+  <defs
+     id="defs3344" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="19.068654"
+     inkscape:cx="4.0870203"
+     inkscape:cy="7.3406145"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     units="px"
+     inkscape:snap-page="true"
+     inkscape:snap-to-guides="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1143"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3354" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3347">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Ebene 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1036.3622)">
+    <path
+       style="fill:#00539c;fill-opacity:1;stroke:#f6f6f6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 7 2 C 5.8919904 2 5 2.892 5 4 L 5 6 C 3.892058 6 3 6.892 3 8 L 3 13 C 3 14.1079 3.892058 15 5 15 L 11 15 C 12.107942 15 13 14.1079 13 13 L 13 8 C 13 6.892 12.107942 6 11 6 L 11 4 C 11 2.892 10.108009 2 9 2 L 7 2 z M 7 3 L 9 3 C 9.554009 3 10 3.446 10 4 L 10 6 L 6 6 L 6 4 C 6 3.446 6.44599 3 7 3 z "
+       id="rect3358-35"
+       transform="translate(0,1036.3622)" />
+    <rect
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3358"
+       width="10"
+       height="8.9999828"
+       x="3"
+       y="1042.3622"
+       ry="1.9998953" />
+    <rect
+       style="fill:#f0eff1;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3358-3"
+       width="8"
+       height="6.9999828"
+       x="4"
+       y="1043.3622"
+       ry="0.99989533" />
+    <rect
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill-rule:nonzero;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="rect4175"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1044.3622"
+       ry="0.5" />
+    <rect
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect4175-6"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1048.3622"
+       ry="0.5" />
+    <path
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="m 7,1038.3622 c -1.1080096,0 -2,0.892 -2,2 l 0,2 1,0 0,-2 c 0,-0.554 0.44599,-1 1,-1 l 2,0 c 0.554009,0 1,0.446 1,1 l 0,2 1,0 0,-2 c 0,-1.108 -0.891991,-2 -2,-2 z"
+       id="rect4218"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ssccssssccsss" />
+    <rect
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect4175-5"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1046.3622"
+       ry="0.5" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#00539c;stroke:#f6f6f6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:2.79999995;stroke-dasharray:none;stroke-opacity:1"
+       d="m 8,1042.6955 0,2.6667 -2.3333334,0 L 4.5,1044.0289 l 1.7500001,0 0,0 0.1388332,0 c -0.3418333,-0.926 -1.2459999,-1.5754 -2.1805,-1.5754 -1.1318938,-2e-4 -2.0882511,0.626 -2.2347499,1.9087 L 1,1044.3622 c 0.1481667,-1.866 1.53825,-3 3.2083333,-3 1.085,0 2.044,0.6207 2.6250001,1.5653 l 0,-1.5653 z"
+       id="path6"
+       sodipodi:nodetypes="ccccccccccsccc" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#f7a500;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="m 8,1042.6955 0,2.6667 -2.3333334,0 L 4.5,1044.0289 l 1.7500001,0 0,0 0.1388332,0 c -0.3418333,-0.926 -1.2459999,-1.5754 -2.1805,-1.5754 -1.1318938,-2e-4 -2.0882511,0.626 -2.2347499,1.9087 L 1,1044.3622 c 0.1481667,-1.866 1.53825,-3 3.2083333,-3 1.085,0 2.044,0.6207 2.6250001,1.5653 l 0,-1.5653 z"
+       id="path6-2"
+       sodipodi:nodetypes="ccccccccccsccc" />
+  </g>
+</svg>

+ 115 - 0
makeicons/source/LockOpen_16x.svg

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16"
+   height="16"
+   viewBox="0 0 16 16"
+   id="svg3342"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="Lock_16x.svg">
+  <defs
+     id="defs3344" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="19.068654"
+     inkscape:cx="4.0870203"
+     inkscape:cy="7.3406145"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     units="px"
+     inkscape:snap-page="true"
+     inkscape:snap-to-guides="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1143"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3354" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3347">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Ebene 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1036.3622)">
+    <path
+       style="fill:#434343;fill-opacity:1;stroke:#f6f6f6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 11 2 C 9.8919904 2 9 2.892 9 4 L 9 6 L 5 6 C 3.892058 6 3 6.892 3 8 L 3 13 C 3 14.1079 3.892058 15 5 15 L 11 15 C 12.107942 15 13 14.1079 13 13 L 13 8 C 13 6.892 12.107942 6 11 6 L 10 6 L 10 4 C 10 3.446 10.44599 3 11 3 L 13 3 C 13.554009 3 14 3.446 14 4 L 14 6 L 15 6 L 15 4 C 15 2.892 14.108009 2 13 2 L 11 2 z "
+       transform="translate(0,1036.3622)"
+       id="rect3358-6" />
+    <rect
+       style="fill:#434343;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3358"
+       width="10"
+       height="8.9999828"
+       x="3"
+       y="1042.3622"
+       ry="1.9998953" />
+    <rect
+       style="fill:#f0eff1;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect3358-3"
+       width="8"
+       height="6.9999828"
+       x="4"
+       y="1043.3622"
+       ry="0.99989533" />
+    <rect
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill-rule:nonzero;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       id="rect4175"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1044.3622"
+       ry="0.5" />
+    <rect
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect4175-6"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1048.3622"
+       ry="0.5" />
+    <path
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="m 11,1038.3622 c -1.1080096,0 -2,0.892 -2,2 l 0,2 1,0 0,-2 c 0,-0.554 0.44599,-1 1,-1 l 2,0 c 0.554009,0 1,0.446 1,1 l 0,2 1,0 0,-2 c 0,-1.108 -0.891991,-2 -2,-2 z"
+       id="rect4218"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ssccssssccsss" />
+    <rect
+       style="fill:#424242;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="rect4175-5"
+       width="6"
+       height="1.0000174"
+       x="5"
+       y="1046.3622"
+       ry="0.5" />
+  </g>
+</svg>

+ 10 - 0
makeicons/source/licence.txt

@@ -0,0 +1,10 @@
+Files:
+- Build-Run_16x.svg
+- Build_16x.svg
+- Go_16x.svg
+- LockClosed_16x.svg
+- LockGoto_16x.svg
+- LockOpen_16x.svg
+
+Licence: CC BY 2.0
+Author: Ronny Otto - https://github.com/GWRon

+ 120 - 24
maxide.bmx

@@ -66,7 +66,7 @@ Incbin "window_icon.png"
 ?
 
 Const IDE_NAME$="MaxIDE"
-Const IDE_VERSION$="1.53 [ng]"
+Const IDE_VERSION$="1.54 [ng]"
 Const TIMER_FREQUENCY=15
 
 AppTitle = IDE_NAME + " " + IDE_VERSION
@@ -207,31 +207,42 @@ Const MENUJSENABLED=98
 Const MENUARMV7ENABLED=99
 Const MENUARM64ENABLED=100
 
+Const MENUGOTOBUILD=110
+
 Const MENUMISC=140
 Const MENUUPXENABLED=141
 
 Const MENUAPPSTUB=160
 
+
 Const MENURECENT=256
 
 Const TB_NEW=0
 Const TB_OPEN=1
 Const TB_CLOSE=2
 Const TB_SAVE=3
+'spacer=4
 Const TB_CUT=5
 Const TB_COPY=6
 Const TB_PASTE=7
 Const TB_FIND=8
+'spacer=9
 Const TB_BUILD=10
 Const TB_BUILDRUN=11
 Const TB_STEP=12
 Const TB_STEPIN=13
 Const TB_STEPOUT=14
 Const TB_STOP=15
+'spacer=16
 Const TB_HOME=17
 Const TB_BACK=18
 Const TB_FORWARDS=19
-Const TB_CONTINUE=20
+'spacer=20
+Const TB_LOCKOPEN=21
+Const TB_LOCKGOTO=22
+'toggle state elements:
+Const TB_CONTINUE=23
+Const TB_LOCKCLOSED=24
 
 Const TAB$=Chr(9)
 Const QUOTES$=Chr(34)
@@ -5206,6 +5217,10 @@ Type TOpenCode Extends TToolPanel
 			host.lockedpanel=Null
 		EndIf
 		host.RefreshPanel Self
+		'toolbar changes (lock icon)
+		host.RefreshToolbar
+		'menu entry changes
+		host.RefreshMenu
 	End Method
 
 	Method Help()
@@ -5733,6 +5748,9 @@ Type TCodePlay
 	Field gdbdebugenable:TGadget,gdbdebugenabled		'menu,state
 	Field requireOverrideEnable:TGadget,requireOverrideEnabled		'menu,state
 	Field overrideErrorsEnable:TGadget,overrideErrorsEnabled		'menu,state
+	Field lockBuildMenuItem:TGadget
+	Field unlockBuildMenuItem:TGadget
+	Field gotoBuildMenuItem:TGadget
 
 	Field miscoptionsmenu:TGadget
 	Field upxEnable:TGadget, upxEnabled:Int 'menu,state
@@ -6134,6 +6152,18 @@ Type TCodePlay
 
 	Method RefreshMenu()
 		TOpenCode.RefreshHighlightingMsg()
+
+		'disable menu entry to unlock build lock if there is none
+		If unlockBuildMenuItem and gotoBuildMenuItem
+			If not lockedPanel
+				DisableMenu(unlockBuildMenuItem)
+				DisableMenu(gotoBuildMenuItem)
+			Else
+				EnableMenu(unlockBuildMenuItem)
+				EnableMenu(gotoBuildMenuItem)
+			EndIf
+		EndIf
+		
 		UpdateWindowMenu window
 	EndMethod
 
@@ -6179,6 +6209,19 @@ Type TCodePlay
 		Else
 			DisableGadgetItem toolbar,TB_STOP
 		EndIf
+' locked build file buttons
+		If lockedpanel
+			If GadgetItemIcon( toolbar, TB_LOCKOPEN ) <> TB_LOCKCLOSED
+				ModifyGadgetItem( toolbar, TB_LOCKOPEN, "", GADGETITEM_LOCALIZED, TB_LOCKCLOSED, "{{tb_lockedbuildfile}}: " + lockedpanel.path )
+				EnableGadgetItem( toolbar, TB_LOCKGOTO)
+			EndIf
+		Else
+			If GadgetItemIcon( toolbar, TB_LOCKOPEN ) <> TB_LOCKOPEN
+				ModifyGadgetItem( toolbar, TB_LOCKOPEN, "", GADGETITEM_LOCALIZED, TB_LOCKOPEN, "{{tb_lockbuildfile}}" )
+				DisableGadgetItem( toolbar, TB_LOCKGOTO)
+			EndIf
+		EndIf
+
 	End Method
 
 	Method IsSourceOpen(path$)
@@ -6637,11 +6680,23 @@ Type TCodePlay
 		EndRem
 
 
-		RemoveGadgetItem toolbar, TB_CONTINUE
+		'you cannot simply remove by "sprite index", so better just
+		'remove the last entry each time
+		'RemoveGadgetItem toolbar, TB_CONTINUE
+		'RemoveGadgetItem toolbar, TB_LOCKCLOSED
+		RemoveGadgetItem toolbar, CountGadgetItems(toolbar)-1
+		RemoveGadgetItem toolbar, CountGadgetItems(toolbar)-1
 
 		'Rem
-		SetToolBarTips toolbar, ["{{tb_new}}","{{tb_open}}","{{tb_close}}","{{tb_save}}","","{{tb_cut}}","{{tb_copy}}","{{tb_paste}}","{{tb_find}}","",..
-		                         "{{tb_build}}","{{tb_buildrun}}","{{tb_step}}","{{tb_stepin}}","{{tb_stepout}}","{{tb_stop}}","","{{tb_home}}","{{tb_back}}","{{tb_forward}}"]
+		SetToolBarTips toolbar, ["{{tb_new}}","{{tb_open}}","{{tb_close}}","{{tb_save}}", ..
+		                         "", ..
+		                         "{{tb_cut}}","{{tb_copy}}","{{tb_paste}}","{{tb_find}}", ..
+		                         "", ..
+		                         "{{tb_build}}","{{tb_buildrun}}","{{tb_step}}","{{tb_stepin}}","{{tb_stepout}}","{{tb_stop}}", ..
+		                         "", ..
+		                         "{{tb_home}}","{{tb_back}}","{{tb_forward}}", ..
+		                         "", ..
+		                         "{{tb_lockbuildfile}}", "{{tb_gotobuildfile}}"]
 		'End Rem
 
 		If Not options.showtoolbar Then HideGadget toolbar
@@ -6961,8 +7016,9 @@ Type TCodePlay
 		gdbdebugenable=CreateMenu("{{menu_program_buildoptions_gdbdebug}}",MENUGDBDEBUGENABLED,devoptions)
 
 		CreateMenu "",0,program
-		CreateMenu "{{menu_program_lockbuildfile}}",MENULOCKBUILD,program
-		CreateMenu "{{menu_program_unlockbuildfile}}",MENUUNLOCKBUILD,program
+		lockBuildMenuItem = CreateMenu("{{menu_program_lockbuildfile}}",MENULOCKBUILD,program)
+		unlockBuildMenuItem=CreateMenu("{{menu_program_unlockbuildfile}}",MENUUNLOCKBUILD,program)
+		gotoBuildMenuItem=CreateMenu("{{menu_program_gotobuildfile}}",MENUGOTOBUILD,program)
 		CreateMenu "",0,program
 		buildmods=CreateMenu("{{menu_program_buildmods}}",MENUBUILDMODULES,program,KEY_D,MENUMOD)
 		buildallmods=CreateMenu("{{menu_program_rebuildallmods}}",MENUBUILDALLMODULES,program)
@@ -6995,6 +7051,10 @@ Type TCodePlay
 		'need to do this below "CheckMenu" as it automatically enables
 		'the menu (again)
 		If Not requireOverrideEnabled DisableMenu overrideErrorsEnable
+		If Not lockedPanel 
+			DisableMenu unlockBuildMenuItem
+			DisableMenu gotoBuildMenuItem
+		EndIf
 
 		Local defaultArch:Int = -1
 		For Local i:Int = 0 Until architectureenabled.length
@@ -7178,6 +7238,10 @@ Type TCodePlay
 				activepanel.invoke TOOLLOCK
 			Case MENUUNLOCKBUILD
 				If lockedpanel lockedpanel.invoke TOOLUNLOCK
+			Case MENUGOTOBUILD
+				If lockedpanel 
+					SelectPanel(lockedPanel)
+				EndIf
 
 			Case MENUCOMMANDLINE cmdlinereq.Show
 
@@ -7784,23 +7848,55 @@ Type TCodePlay
 				Select EventSource()
 					Case toolbar
 						Select EventData()
-							Case TB_NEW OpenSource ""
-							Case TB_OPEN OpenSource "."
-							Case TB_CLOSE currentpanel.invoke TOOLCLOSE
-							Case TB_SAVE currentpanel.invoke TOOLSAVE
-							Case TB_CUT currentpanel.invoke TOOLCUT
-							Case TB_COPY currentpanel.invoke TOOLCOPY
-							Case TB_PASTE currentpanel.invoke TOOLPASTE
-							Case TB_FIND currentpanel.invoke TOOLFIND
-							Case TB_BUILD BuildCode
-							Case TB_BUILDRUN RunCode
-							Case TB_STEP If output output.stepover
-							Case TB_STEPIN If output output.stepin
-							Case TB_STEPOUT If output output.stepout
-							Case TB_STOP If output output.Stop
-							Case TB_HOME helppanel.Home;SelectPanel helppanel
-							Case TB_BACK helppanel.Back;SelectPanel helppanel
-							Case TB_FORWARDS helppanel.Forward;SelectPanel helppanel
+							Case TB_NEW
+								OpenSource ""
+							Case TB_OPEN
+								OpenSource "."
+							Case TB_CLOSE
+								currentpanel.invoke TOOLCLOSE
+							Case TB_SAVE
+								currentpanel.invoke TOOLSAVE
+							Case TB_CUT
+								currentpanel.invoke TOOLCUT
+							Case TB_COPY
+								currentpanel.invoke TOOLCOPY
+							Case TB_PASTE
+								currentpanel.invoke TOOLPASTE
+							Case TB_FIND
+								currentpanel.invoke TOOLFIND
+							Case TB_BUILD
+								BuildCode
+							Case TB_BUILDRUN
+								RunCode
+							Case TB_STEP
+								If output output.stepover
+							Case TB_STEPIN
+								If output output.stepin
+							Case TB_STEPOUT
+								If output output.stepout
+							Case TB_STOP
+								If output output.Stop
+							Case TB_HOME
+								helppanel.Home
+								SelectPanel helppanel
+							Case TB_BACK
+								helppanel.Back
+								SelectPanel helppanel
+							Case TB_FORWARDS
+								helppanel.Forward
+								SelectPanel helppanel
+							Case TB_LOCKOPEN
+								'unlock
+								If lockedPanel 
+									TOpenCode(lockedPanel).SetLocked(False)
+								'lock if lockable
+								ElseIf TOpenCode(activePanel) 
+									TOpenCode(activePanel).SetLocked(True)
+								EndIf
+							Case TB_LOCKGOTO
+								If lockedPanel
+									SelectPanel(lockedPanel)
+								EndIf
 						End Select
 
 					Case tabbar

BIN
toolbar.png


BIN
toolbar_48.png


BIN
toolbar_64.png