Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 2236) +++ trunk/src/Makefile.dep (revision 2237) @@ -2249,6 +2249,15 @@ ../src_3rd/liblihata/lihata.h ../src_3rd/liblihata/parser.h \ ../src_3rd/liblihata/genht/htsp.h ../src_3rd/genvector/vtp0.h \ list_conf.h error.h +plug_footprint_act.o: plug_footprint_act.c ../config.h ../config.manual.h \ + ../config.auto.h global.h const.h macro.h global_typedefs.h unit.h \ + global_objs.h ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h \ + list_common.h list_line.h ../src_3rd/genlist/gentdlist_impl.h \ + ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \ + list_arc.h list_text.h list_poly.h list_pad.h list_pin.h list_rat.h \ + vtonpoint.h ../src_3rd/genvector/genvector_impl.h \ + ../src_3rd/genvector/genvector_undef.h hid.h vtroutestyle.h \ + global_element.h list_element.h plug_footprint.h vtlibrary.h plug_io.o: plug_io.c ../config.h ../config.manual.h ../config.auto.h \ conf_core.h conf.h global.h const.h macro.h global_typedefs.h unit.h \ global_objs.h ../src_3rd/genlist/gendlist.h globalconst.h polyarea.h \ Index: trunk/src/Makefile.in =================================================================== --- trunk/src/Makefile.in (revision 2236) +++ trunk/src/Makefile.in (revision 2237) @@ -80,6 +80,7 @@ plugins.o plug_io.o plug_footprint.o + plug_footprint_act.o polygon.o polygon1.o polygon_act.o @@ -136,8 +137,8 @@ put /local/pcb/ACTION_REG_SRC { action_act.c buffer.c change_act.c conf_act.c file_act.c find_act.c gui_act.c main_act.c misc.c move.c netlist.c - object_act.c plugins.c polygon_act.c rats_act.c rats_patch.c - remove_act.c select_act.c undo_act.c + object_act.c plugins.c polygon_act.c plug_footprint_act.c rats_act.c + rats_patch.c remove_act.c select_act.c undo_act.c } #---- modules ----# Index: trunk/src/plug_footprint.h =================================================================== --- trunk/src/plug_footprint.h (revision 2236) +++ trunk/src/plug_footprint.h (revision 2237) @@ -83,4 +83,8 @@ const char *fp_default_search_path(void); int fp_host_uninit(void); + +/* rescan/reload all footprints in the library cache */ +int fp_rehash(void); + #endif Index: trunk/src/plug_footprint_act.c =================================================================== --- trunk/src/plug_footprint_act.c (nonexistent) +++ trunk/src/plug_footprint_act.c (revision 2237) @@ -0,0 +1,45 @@ +/* + * COPYRIGHT + * + * PCB, interactive printed circuit board design + * Copyright (C) 2016 Tibor 'Igor2' Palinkas + * + * This module, debug, was written and is Copyright (C) 2016 by Tibor Palinkas + * this module is also subject to the GNU GPL as described below + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#include "config.h" +#include "global.h" +#include "hid.h" +#include "plug_footprint.h" + +static const char fp_rehash_syntax[] = "fp_rehash()" ; +static const char fp_rehash_help[] = "Flush the library index; rescan all library search paths and rebuild the library index. Useful if there are changes in the library during a pcb-rnd session."; +static int Action_fp_rehash(int argc, char **argv, Coord x, Coord y) +{ + fp_rehash(); + return 0; +} + + +HID_Action conf_plug_footprint_list[] = { + {"fp_rehash", 0, Action_fp_rehash, + fp_rehash_help, fp_rehash_syntax} +}; + +REGISTER_ACTIONS(conf_plug_footprint_list, NULL)