Index: menu/pcb-menu-base.lht =================================================================== --- menu/pcb-menu-base.lht (revision 34891) +++ menu/pcb-menu-base.lht (nonexistent) @@ -1,194 +0,0 @@ -# minimal menu file for testing menu patches - -ha:rnd-menu-v1 { - li:mouse { - li:left { - li:press = { Tool(Press) } - li:press-shift = { Tool(Press) } - li:press-ctrl = { Tool(Save); Tool(arrow); Tool(Restore); Tool(Press) } - li:release = { Tool(Release) } - li:release-shift = { Tool(Release) } - li:release-ctrl = { Tool(Release) } - } - li:middle { - li:press = { Pan(1) } - li:release = { Pan(0) } - } - li:right { - li:press = { Tool(Stroke) } - li:release = { Tool(Release); Popup(popup-obj, obj-type) } - li:shift-release = { Popup(popup-obj-misc) } - } - li:scroll-up { - li:press = { Zoom(0.8) } - li:press-shift = { Scroll(up) } - li:press-ctrl = { Scroll(left) } - } - li:scroll-down { - li:press = { Zoom(1.25) } - li:press-shift = { Scroll(down) } - li:press-ctrl = { Scroll(right) } - } - } - - li:toolbar_static { - ha:via {tip={place a via on the board}} - ha:line {tip={draw a line segment (trace) on the board}} - ha:arc {tip={draw an arc segment (trace) on the board}} - ha:text {tip={draw text on the board}} - ha:rectangle {tip={draw a rectangular polygon on the board}} - ha:poly {tip={draw a polygon on the board}} - ha:polyhole {tip={cut out a hole from existing polygons on the board}} - ha:buffer {tip={paste the current buffer on the board}} - ha:remove {tip={remove an object from the board}} - ha:rotate {tip={rotate an object on the board}} - ha:insert {tip={insert a point in a trace or polygon contour}} - ha:thermal {tip={change thermal connectivity of a pin or via}} - ha:arrow {tip={switch to arrow mode}} - ha:lock {tip={lock or unlock objects on the board}} - } - - li:main_menu { - - ha:File { - li:submenu { - ha:Start New Layout = { li:a={{f;n}; {Ctrln};}; action=New() } - ha:Revert = { a={f;r}; action=Load(Revert,none); tip=Revert to the layout stored on disk } - - - ha:Load layout... = { li:a={{f;o};{f;l};} action=Load(Layout); tip=Load a layout from a file } - - - ha:Save Layout = { li:a={{f;s}; {Ctrls};}; action=Save(Layout); tip=Saves current layout } - ha:Save Layout As... = { li:a={{f;a}; {Shift Ctrls};}; action=Save(LayoutAs); tip=Saves current layout into a new file } - - - END - } - } - - ha:Stock-Anchors { - li:submenu { - - ha:layerkeys { - li:submenu { - ha:pre {} - te:@layerkeys - ha:post {} - } - } - - ha:layerpick { - li:submenu { - ha:pre {} - te:@layerpick - ha:post {} - } - } - - ha:layerview { - li:submenu { - ha:pre {} - te:@layerview - ha:post {} - } - } - - ha:grid { - li:submenu { - ha:pre {} - te:@grid - ha:post {} - } - } - - ha:routestyles { - li:submenu { - ha:pre {} - te:@routestyles - ha:post {} - } - } - - ha:import { - li:submenu { - ha:pre {} - te:@import_top - - - te:@import_sch - - - te:@import_geo - ha:post {} - } - } - - ha:autoroute { - li:submenu { - ha:pre {} - te:@autoroute - ha:post {} - } - } - - ha:scripts { - li:submenu { - ha:pre {} - te:@scripts - ha:post {} - } - } - - ha:feature_plugins { - li:submenu { - ha:pre {} - te:@feature_plugins - ha:post {} - } - } - - ha:indications { - li:submenu { - ha:pre {} - te:@indications - ha:post {} - } - } - - ha:indications { - li:submenu { - ha:pre {} - te:@indications - ha:post {} - } - } - } - } - - - ha:Test-Anchors { - li:submenu { - ha:indications { - li:submenu { - ha:PRE {} - te:@testanchor - ha:POST {} - } - } - } - } - - } # main menu - - li:popups { -# context sensitive right click: popup per object type under the cursor - - ha:popup-obj-line { - li:submenu { - ha:Edit properties { action=propedit(object) } - ha:Edit flags... { action=FlagEdit() } - ha:Set Same Style { action=SetSame() } - - - ha:Remove line { li:action={Tool(Save); Tool(remove); Tool(Press); Tool(Restore)} } - ha:Copy to buffer { li:action={Unselect(All); Select(object); PasteBuffer(Clear); PasteBuffer(AddSelected); Unselect(All); Tool(buffer) } } - ha:Move to current layer { action=MoveToCurrentLayer(object) } - } - } - } # popups -} # root Index: menu/menu-base.lht =================================================================== --- menu/menu-base.lht (nonexistent) +++ menu/menu-base.lht (revision 34892) @@ -0,0 +1,194 @@ +# minimal menu file for testing menu patches + +ha:rnd-menu-v1 { + li:mouse { + li:left { + li:press = { Tool(Press) } + li:press-shift = { Tool(Press) } + li:press-ctrl = { Tool(Save); Tool(arrow); Tool(Restore); Tool(Press) } + li:release = { Tool(Release) } + li:release-shift = { Tool(Release) } + li:release-ctrl = { Tool(Release) } + } + li:middle { + li:press = { Pan(1) } + li:release = { Pan(0) } + } + li:right { + li:press = { Tool(Stroke) } + li:release = { Tool(Release); Popup(popup-obj, obj-type) } + li:shift-release = { Popup(popup-obj-misc) } + } + li:scroll-up { + li:press = { Zoom(0.8) } + li:press-shift = { Scroll(up) } + li:press-ctrl = { Scroll(left) } + } + li:scroll-down { + li:press = { Zoom(1.25) } + li:press-shift = { Scroll(down) } + li:press-ctrl = { Scroll(right) } + } + } + + li:toolbar_static { + ha:via {tip={place a via on the board}} + ha:line {tip={draw a line segment (trace) on the board}} + ha:arc {tip={draw an arc segment (trace) on the board}} + ha:text {tip={draw text on the board}} + ha:rectangle {tip={draw a rectangular polygon on the board}} + ha:poly {tip={draw a polygon on the board}} + ha:polyhole {tip={cut out a hole from existing polygons on the board}} + ha:buffer {tip={paste the current buffer on the board}} + ha:remove {tip={remove an object from the board}} + ha:rotate {tip={rotate an object on the board}} + ha:insert {tip={insert a point in a trace or polygon contour}} + ha:thermal {tip={change thermal connectivity of a pin or via}} + ha:arrow {tip={switch to arrow mode}} + ha:lock {tip={lock or unlock objects on the board}} + } + + li:main_menu { + + ha:File { + li:submenu { + ha:Start New Layout = { li:a={{f;n}; {Ctrln};}; action=New() } + ha:Revert = { a={f;r}; action=Load(Revert,none); tip=Revert to the layout stored on disk } + - + ha:Load layout... = { li:a={{f;o};{f;l};} action=Load(Layout); tip=Load a layout from a file } + - + ha:Save Layout = { li:a={{f;s}; {Ctrls};}; action=Save(Layout); tip=Saves current layout } + ha:Save Layout As... = { li:a={{f;a}; {Shift Ctrls};}; action=Save(LayoutAs); tip=Saves current layout into a new file } + - + END + } + } + + ha:Stock-Anchors { + li:submenu { + + ha:layerkeys { + li:submenu { + ha:pre {} + te:@layerkeys + ha:post {} + } + } + + ha:layerpick { + li:submenu { + ha:pre {} + te:@layerpick + ha:post {} + } + } + + ha:layerview { + li:submenu { + ha:pre {} + te:@layerview + ha:post {} + } + } + + ha:grid { + li:submenu { + ha:pre {} + te:@grid + ha:post {} + } + } + + ha:routestyles { + li:submenu { + ha:pre {} + te:@routestyles + ha:post {} + } + } + + ha:import { + li:submenu { + ha:pre {} + te:@import_top + - + te:@import_sch + - + te:@import_geo + ha:post {} + } + } + + ha:autoroute { + li:submenu { + ha:pre {} + te:@autoroute + ha:post {} + } + } + + ha:scripts { + li:submenu { + ha:pre {} + te:@scripts + ha:post {} + } + } + + ha:feature_plugins { + li:submenu { + ha:pre {} + te:@feature_plugins + ha:post {} + } + } + + ha:indications { + li:submenu { + ha:pre {} + te:@indications + ha:post {} + } + } + + ha:indications { + li:submenu { + ha:pre {} + te:@indications + ha:post {} + } + } + } + } + + + ha:Test-Anchors { + li:submenu { + ha:indications { + li:submenu { + ha:PRE {} + te:@testanchor + ha:POST {} + } + } + } + } + + } # main menu + + li:popups { +# context sensitive right click: popup per object type under the cursor + + ha:popup-obj-line { + li:submenu { + ha:Edit properties { action=propedit(object) } + ha:Edit flags... { action=FlagEdit() } + ha:Set Same Style { action=SetSame() } + - + ha:Remove line { li:action={Tool(Save); Tool(remove); Tool(Press); Tool(Restore)} } + ha:Copy to buffer { li:action={Unselect(All); Select(object); PasteBuffer(Clear); PasteBuffer(AddSelected); Unselect(All); Tool(buffer) } } + ha:Move to current layer { action=MoveToCurrentLayer(object) } + } + } + } # popups +} # root Index: menu/test_patch.sh =================================================================== --- menu/test_patch.sh (revision 34891) +++ menu/test_patch.sh (revision 34892) @@ -9,7 +9,7 @@ rm d0.lht d1.lht >/dev/null 2>&1 -cp pcb-menu-base.lht $1 $SRC +cp menu-base.lht $1 $SRC ( cd $SRC mkdir dummy_lib @@ -24,7 +24,7 @@ mv $SRC/d0.lht . mv $SRC/d1.lht . -rm $SRC/pcb-menu-base.lht $SRC/$1 +rm $SRC/menu-base.lht $SRC/$1 diff -U1 d0.lht d1.lht | grep "^[ +-][^+-]"