Index: Plug.tmpasm =================================================================== --- Plug.tmpasm (revision 32198) +++ Plug.tmpasm (revision 32199) @@ -3,6 +3,8 @@ $(PLUGDIR)/import_hpgl/hpgl.o $(SRC_3RD_DIR)/libuhpgl/parse.o @] +put /local/pcb/mod/MENUFILE {hpgl-menu.lht} +put /local/pcb/mod/MENUVAR {hpgl_menu} switch /local/pcb/import_hpgl/controls case {buildin} include /local/pcb/tmpasm/buildin; end; Index: hpgl-menu.lht =================================================================== --- hpgl-menu.lht (nonexistent) +++ hpgl-menu.lht (revision 32199) @@ -0,0 +1,9 @@ +ha:rnd-menu-v1 { + li:anchored { + ha:@import_geo { + li:submenu { + ha:Load HP-GL plot to paste-buffer = { action=LoadHPGLFrom() } + } + } + } +} \ No newline at end of file Index: hpgl.c =================================================================== --- hpgl.c (revision 32198) +++ hpgl.c (revision 32199) @@ -42,11 +42,13 @@ #include #include #include - +#include #include #include #include +#include "menu_internal.c" + static const char *hpgl_cookie = "hpgl importer"; #define HPGL2CRD_D(crd) (RND_MM_TO_COORD((double)crd*0.025)) @@ -180,6 +182,7 @@ void pplg_uninit_import_hpgl(void) { rnd_remove_actions_by_cookie(hpgl_cookie); + rnd_hid_menu_unload(rnd_gui, hpgl_cookie); } int pplg_init_import_hpgl(void) @@ -186,5 +189,6 @@ { RND_API_CHK_VER; RND_REGISTER_ACTIONS(hpgl_action_list, hpgl_cookie) + rnd_hid_menu_load(rnd_gui, NULL, hpgl_cookie, 135, NULL, 0, hpgl_menu, "plugin: import_hpgl"); return 0; }