Index: Plug.tmpasm =================================================================== --- Plug.tmpasm (revision 32205) +++ Plug.tmpasm (revision 32206) @@ -1,5 +1,7 @@ put /local/pcb/mod {import_fpcb_nl} put /local/pcb/mod/OBJS [@ $(PLUGDIR)/import_fpcb_nl/fpcb_nl.o @] +put /local/pcb/mod/MENUFILE {fpcb_nl-menu.lht} +put /local/pcb/mod/MENUVAR {fpcb_nl_menu} switch /local/pcb/import_fpcb_nl/controls case {buildin} include /local/pcb/tmpasm/buildin; end; Index: fpcb_nl-menu.lht =================================================================== --- fpcb_nl-menu.lht (nonexistent) +++ fpcb_nl-menu.lht (revision 32206) @@ -0,0 +1,9 @@ +ha:rnd-menu-v1 { + li:anchored { + ha:@import_sch { + li:submenu { + ha:Load FreePCB netlist (EasyEDA) = { action=LoadFpcbnlFrom() } + } + } + } +} \ No newline at end of file Index: fpcb_nl.c =================================================================== --- fpcb_nl.c (revision 32205) +++ fpcb_nl.c (revision 32206) @@ -40,11 +40,13 @@ #include #include #include - +#include #include #include #include +#include "menu_internal.c" + static const char *fpcb_nl_cookie = "fpcb_nl importer"; /* remove leading whitespace */ @@ -233,6 +235,7 @@ { rnd_remove_actions_by_cookie(fpcb_nl_cookie); RND_HOOK_UNREGISTER(pcb_plug_import_t, pcb_plug_import_chain, &import_fpcb_nl); + rnd_hid_menu_unload(rnd_gui, fpcb_nl_cookie); } int pplg_init_import_fpcb_nl(void) @@ -255,5 +258,6 @@ RND_REGISTER_ACTIONS(fpcb_nl_action_list, fpcb_nl_cookie) + rnd_hid_menu_load(rnd_gui, NULL, fpcb_nl_cookie, 165, NULL, 0, fpcb_nl_menu, "plugin: fpcb_nl import"); return 0; }