Index: menu/Makefile =================================================================== --- menu/Makefile (revision 32980) +++ menu/Makefile (revision 32981) @@ -2,4 +2,14 @@ test: @./test_patch.sh 'MenuPatch(load, test, "insert.lht");' > insert.out - @diff insert.ref insert.out \ No newline at end of file + @diff insert.ref insert.out + @./test_patch.sh 'MenuPatch(load, test, "change.lht");' > change.out + @diff change.ref change.out + @./test_patch.sh 'MenuPatch(load, test, "remove.lht");' > remove.out + @diff remove.ref remove.out + @./test_patch.sh 'MenuPatch(load, test, "overwrite_m.lht");' > overwrite_m.out + @diff overwrite_m.ref overwrite_m.out + @./test_patch.sh 'MenuPatch(load, test, "overwrite_p.lht");' > overwrite_p.out + @diff overwrite_p.ref overwrite_p.out + @./test_patch.sh 'MenuPatch(load, test, "new_submenu.lht");' > new_submenu.out + @diff new_submenu.ref new_submenu.out Index: menu/change.lht =================================================================== --- menu/change.lht (nonexistent) +++ menu/change.lht (revision 32981) @@ -0,0 +1,9 @@ +ha:rnd-menu-patch-v1 { + prio=400 + li:patch { + ha:overwrite_menu_props { + path = /main_menu/File/Revert + ha:props { a={f;shiftr};} + } + } +} Index: menu/change.ref =================================================================== --- menu/change.ref (nonexistent) +++ menu/change.ref (revision 32981) @@ -0,0 +1,7 @@ + ha:Revert { +- action = Load(Revert,none) ++ a = {f;shiftr} + tip = {Revert to the layout stored on disk } +- a = {f;r} ++ action = Load(Revert,none) + } Index: menu/new_submenu.lht =================================================================== --- menu/new_submenu.lht (nonexistent) +++ menu/new_submenu.lht (revision 32981) @@ -0,0 +1,15 @@ +ha:rnd-menu-v1 { + li:main_menu { + ha:File { + li:submenu { + ha:demo { + li:submenu { + ha:hello = { a={h;h}; action=message(hello) } + ha:world = { a={h;w}; action=message(world) } + } + } + } + } + } +} + Index: menu/new_submenu.ref =================================================================== --- menu/new_submenu.ref (nonexistent) +++ menu/new_submenu.ref (revision 32981) @@ -0,0 +1,14 @@ + END ++ ha:demo { ++ li:submenu { ++ ha:hello { ++ a = {h;h} ++ action = {message(hello) } ++ } ++ ha:world { ++ a = {h;w} ++ action = {message(world) } ++ } ++ } ++ } + } Index: menu/overwrite_m.lht =================================================================== --- menu/overwrite_m.lht (nonexistent) +++ menu/overwrite_m.lht (revision 32981) @@ -0,0 +1,10 @@ +ha:rnd-menu-v1 { + li:main_menu { + ha:File { + li:submenu { + ha:Revert = { action=message(ERROR, "revert is too dangerous!") } + } + } + } +} + Index: menu/overwrite_m.ref =================================================================== --- menu/overwrite_m.ref (nonexistent) +++ menu/overwrite_m.ref (revision 32981) @@ -0,0 +1,7 @@ + ha:Revert { +- action = Load(Revert,none) +- tip = {Revert to the layout stored on disk } + a = {f;r} ++ tip = {Revert to the layout stored on disk } ++ action = {Load(Revert,none)message(ERROR, "revert is too dangerous!") } + } Index: menu/overwrite_p.lht =================================================================== --- menu/overwrite_p.lht (nonexistent) +++ menu/overwrite_p.lht (revision 32981) @@ -0,0 +1,15 @@ +ha:rnd-menu-v1 { + li:main_menu { + ha:File { + li:submenu { + ha:Revert { + li:submenu { + ha:hello = { a={h;h}; action=message(hello) } + ha:world = { a={h;w}; action=message(world) } + } + } + } + } + } +} + Index: menu/overwrite_p.ref =================================================================== --- menu/overwrite_p.ref (nonexistent) +++ menu/overwrite_p.ref (revision 32981) @@ -0,0 +1,15 @@ + ha:Revert { +- action = Load(Revert,none) +- tip = {Revert to the layout stored on disk } +- a = {f;r} ++ li:submenu { ++ ha:hello { ++ a = {h;h} ++ action = {message(hello) } ++ } ++ ha:world { ++ a = {h;w} ++ action = {message(world) } ++ } ++ } + } Index: menu/remove.lht =================================================================== --- menu/remove.lht (nonexistent) +++ menu/remove.lht (revision 32981) @@ -0,0 +1,8 @@ +ha:rnd-menu-patch-v1 { + prio=400 + li:patch { + ha:remove_menu { + path = /main_menu/File/Revert + } + } +} Index: menu/remove.ref =================================================================== --- menu/remove.ref (nonexistent) +++ menu/remove.ref (revision 32981) @@ -0,0 +1,7 @@ + } +- ha:Revert { +- action = Load(Revert,none) +- tip = {Revert to the layout stored on disk } +- a = {f;r} +- } + -