Index: Plug.tmpasm =================================================================== --- Plug.tmpasm (revision 32203) +++ Plug.tmpasm (revision 32204) @@ -1,5 +1,7 @@ put /local/pcb/mod {import_calay} put /local/pcb/mod/OBJS [@ $(PLUGDIR)/import_calay/calay.o @] +put /local/pcb/mod/MENUFILE {calay-menu.lht} +put /local/pcb/mod/MENUVAR {calay_menu} switch /local/pcb/import_calay/controls case {buildin} include /local/pcb/tmpasm/buildin; end; Index: calay-menu.lht =================================================================== --- calay-menu.lht (nonexistent) +++ calay-menu.lht (revision 32204) @@ -0,0 +1,9 @@ +ha:rnd-menu-v1 { + li:anchored { + ha:@import_sch { + li:submenu { + ha:Load Calay .net+.cmp files = { action=LoadCalayFrom() } + } + } + } +} \ No newline at end of file Index: calay.c =================================================================== --- calay.c (revision 32203) +++ calay.c (revision 32204) @@ -39,7 +39,7 @@ #include #include #include - +#include #include #include #include @@ -47,6 +47,8 @@ #define NETEXT ".net" #define CMPEXT ".cmp" +#include "menu_internal.c" + static const char *calay_cookie = "calay importer"; /* remove leading whitespace */ @@ -269,6 +271,7 @@ { rnd_remove_actions_by_cookie(calay_cookie); RND_HOOK_UNREGISTER(pcb_plug_import_t, pcb_plug_import_chain, &import_calay); + rnd_hid_menu_unload(rnd_gui, calay_cookie); } int pplg_init_import_calay(void) @@ -291,5 +294,6 @@ RND_REGISTER_ACTIONS(calay_action_list, calay_cookie) + rnd_hid_menu_load(rnd_gui, NULL, calay_cookie, 170, NULL, 0, calay_menu, "plugin: import calay"); return 0; }