Index: trunk/src/conf_act.c =================================================================== --- trunk/src/conf_act.c (revision 24384) +++ trunk/src/conf_act.c (revision 24385) @@ -293,6 +293,20 @@ return 0; } +static const char pcb_acts_ChkTermID[] = "ChkTermID(pattern)\n"; +static const char pcb_acth_ChkTermID[] = "Return 1 if currently shown term ID matches the requested pattern"; +static fgw_error_t pcb_act_ChkTermID(fgw_arg_t *res, int argc, fgw_arg_t *argv) +{ + const char *have = conf_core.editor.term_id, *expected = ""; + + if (have == NULL) have = ""; + + PCB_ACT_MAY_CONVARG(1, FGW_STR, ChkTermID, expected = argv[1].val.str); + + PCB_ACT_IRES(strcmp(expected, have) == 0); + return 0; +} + static const char pcb_acts_ChkGridUnits[] = "ChkGridUnits(expected)"; static const char pcb_acth_ChkGridUnits[] = "Return 1 if currently selected grid unit matches the expected (normally mm or mil)"; static fgw_error_t pcb_act_ChkGridUnits(fgw_arg_t *res, int argc, fgw_arg_t *argv) @@ -319,6 +333,7 @@ {"ChkMode", pcb_act_ChkMode, pcb_acth_ChkMode, pcb_acts_ChkMode}, {"ChkGridSize", pcb_act_ChkGridSize, pcb_acth_ChkGridSize, pcb_acts_ChkGridSize}, {"ChkSubcID", pcb_act_ChkSubcID, pcb_acth_ChkSubcID, pcb_acts_ChkSubcID}, + {"ChkTermID", pcb_act_ChkTermID, pcb_acth_ChkTermID, pcb_acts_ChkTermID}, {"ChkGridUnits", pcb_act_ChkGridUnits, pcb_acth_ChkGridUnits, pcb_acts_ChkGridUnits}, {"ChkBuffer", pcb_act_ChkBuffer, pcb_acth_ChkBuffer, pcb_acts_ChkBuffer} }; Index: trunk/src/funchash_core_list.h =================================================================== --- trunk/src/funchash_core_list.h (revision 24384) +++ trunk/src/funchash_core_list.h (revision 24385) @@ -141,6 +141,7 @@ action_entry(SubcToBuffer) action_entry(SubcID) action_entry(Swap) +action_entry(TermID) action_entry(Text) action_entry(TextScale) action_entry(Thaw) Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 24384) +++ trunk/src/gui_act.c (revision 24385) @@ -119,6 +119,17 @@ return 0; } + if (id == F_TermID) { /* change the displayed name of terminals */ + if (argc > 1) + conf_set(CFR_DESIGN, "editor/term_id", -1, str_dir, POL_OVERWRITE); + else + conf_set(CFR_DESIGN, "editor/term_id", -1, "", POL_OVERWRITE); + + pcb_gui->invalidate_all(); /* doesn't change too often, isn't worth anything more complicated */ + pcb_draw(); + return 0; + } + if (!str_dir || !*str_dir) { switch (id) { Index: trunk/src/pcb-menu-default.lht =================================================================== --- trunk/src/pcb-menu-default.lht (revision 24384) +++ trunk/src/pcb-menu-default.lht (revision 24385) @@ -220,7 +220,7 @@ - ha:Displayed subcircuit ID { li:submenu { - ha:refdes = { a={v; s; r}; checked=ChkSubcID(%a.refdes%); action=Display(SubcID, "%a.refdes%"); update_on={editor/name_on_pcb} } + ha:refdes = { a={v; s; r}; checked=ChkSubcID(%a.refdes%); action=Display(SubcID, "%a.refdes%"); update_on={editor/subc_id} } ha:footprint = { a={v; s; f}; checked=ChkSubcID(%a.footprint%); action=Display(SubcID,"%a.footprint%"); update_on={editor/subc_id} } ha:value = { a={v; s; v}; checked=ChkSubcID(%a.value%); action=Display(SubcID,"%a.value%"); update_on={editor/subc_id} } ha:refdes+value = { a={v; s; s}; checked=ChkSubcID(%a.refdes%\\n%a.value%); action=Display(SubcID,"%a.refdes%\\\\n%a.value%"); update_on={editor/subc_id} } @@ -227,6 +227,14 @@ ha:user configured = { a={v; s; c}; action=Display(SubcID); } } } + ha:Displayed terminal ID { + li:submenu { + ha:term = { a={v; t; t}; checked=ChkTermID(%a.term%); action=Display(TermID, "%a.term%"); update_on={editor/term_id} } + ha:name = { a={v; t; n}; checked=ChkTermID(%a.name%); action=Display(TermID, "%a.name%"); update_on={editor/term_id} } + ha:term+name = { a={v; t; s}; checked=ChkTermID(%a.term%\\n%a.name%); action=Display(TermID, "%a.term%\\\\n%a.name%"); update_on={editor/term_id} } + ha:user configured = { a={v; t; c}; action=Display(TermID); } + } + } ha:Zoom and side { li:submenu { ha:Zoom In 20% = { li:a={{z;z;}; {+};} action=Zoom(-1.2) }