Index: Plug.tmpasm =================================================================== --- Plug.tmpasm (revision 33055) +++ Plug.tmpasm (revision 33056) @@ -1,4 +1,6 @@ put /local/pcb/mod {shape} +put /local/pcb/mod/MENUFILE {shape-menu.lht} +put /local/pcb/mod/MENUVAR {shape_menu} append /local/pcb/mod/OBJS [@ $(PLUGDIR)/shape/shape.o @] Index: shape-menu.lht =================================================================== --- shape-menu.lht (nonexistent) +++ shape-menu.lht (revision 33056) @@ -0,0 +1,9 @@ +ha:rnd-menu-v1 { + li:anchored { + ha:@feature_plugins { + li:submenu { + ha:Shape generator (interactive) = { action=shape() } + } + } + } +} \ No newline at end of file Index: shape.c =================================================================== --- shape.c (revision 33055) +++ shape.c (revision 33056) @@ -44,6 +44,8 @@ #include "obj_poly_draw.h" #include "rotate.h" #include +#include +#include "menu_internal.c" const char *pcb_shape_corner_name[] = {"Rn", "Ch", "Sq", NULL}; @@ -627,6 +629,7 @@ void pplg_uninit_shape(void) { + rnd_hid_menu_unload(rnd_gui, pcb_shape_cookie); rnd_event_unbind_allcookie(pcb_shape_cookie); rnd_remove_actions_by_cookie(pcb_shape_cookie); } @@ -638,5 +641,6 @@ rnd_event_bind(PCB_EVENT_LAYERVIS_CHANGED, shape_layer_chg, NULL, pcb_shape_cookie); + rnd_hid_menu_load(rnd_gui, NULL, pcb_shape_cookie, 175, NULL, 0, shape_menu, "plugin: shape"); return 0; }