Index: trunk/src/safe_fs.c =================================================================== --- trunk/src/safe_fs.c (revision 27528) +++ trunk/src/safe_fs.c (revision 27529) @@ -106,8 +106,10 @@ FILE *pcb_fopen_askovr(pcb_hidlib_t *hidlib, const char *path, const char *mode, int *all) { if (strchr(mode, 'w') != NULL) { - /* if the action does not exist, it will return error, which is non-zero, which means the old behavor: just overwrite anything */ - if (pcb_find_action("gui_MayOverwriteFile", NULL) != NULL) { + fgw_func_t *fun = pcb_act_lookup("gui_mayoverwritefile"); + + /* if the action does not exist, use the old behavor: just overwrite anything */ + if (fun != NULL) { FILE *f = pcb_fopen(hidlib, path, "r"); if (f != NULL) { int res = 0; @@ -114,8 +116,20 @@ fclose(f); if (all != NULL) res = *all; - if (res != 2) - res = pcb_actionl("gui_MayOverwriteFile", path, (all != NULL) ? "1" : "0", NULL); + if (res != 2) { + fgw_arg_t ares, argv[4]; + + argv[0].type = FGW_FUNC; argv[0].val.func = fun; + argv[1].type = FGW_PTR; argv[1].val.ptr_void = hidlib; + argv[2].type = FGW_STR; argv[2].val.cstr = path; + argv[3].type = FGW_INT; argv[3].val.nat_int = (all != NULL); + ares.type = FGW_INVALID; + + if ((pcb_actionv_(fun, &ares, 4, argv) != 0) || (fgw_arg_conv(&pcb_fgw, &ares, FGW_INT) != 0)) + res = -1; + else + res = ares.val.nat_int; + } if (res == 0) return NULL; if ((all != NULL) && (res == 2)) /* remember 'overwrite all' for this session */ Index: trunk/src_plugins/export_openems/excitation.c =================================================================== --- trunk/src_plugins/export_openems/excitation.c (revision 27528) +++ trunk/src_plugins/export_openems/excitation.c (revision 27529) @@ -165,9 +165,9 @@ { PCB_DAD_BEGIN_TABLE(exc_ctx.dlg, 2); PCB_DAD_LABEL(exc_ctx.dlg, "fc"); - PCB_DAD_REAL(exc_ctx.dlg, ""); + PCB_DAD_SPIN_FREQ(exc_ctx.dlg); PCB_DAD_MINMAX(exc_ctx.dlg, 0, FREQ_MAX); - PCB_DAD_HELP(exc_ctx.dlg, "20db Cutoff Frequency [Hz]\nbandwidth is 2*fc"); + PCB_DAD_HELP(exc_ctx.dlg, "20db Cutoff Frequency\nbandwidth is 2*fc"); PCB_DAD_CHANGE_CB(exc_ctx.dlg, exc_val_chg_cb); exc_ctx.exc_data[idx].w[I_FC] = PCB_DAD_CURRENT(exc_ctx.dlg); Index: trunk/src_plugins/lib_hid_common/dlg_comm_m.c =================================================================== --- trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 27528) +++ trunk/src_plugins/lib_hid_common/dlg_comm_m.c (revision 27529) @@ -212,6 +212,7 @@ fgw_error_t pcb_act_gui_MayOverwriteFile(fgw_arg_t *res, int argc, fgw_arg_t *argv) { + pcb_hidlib_t *hidlib; const char *fn; const char *pcb_acts_gui_MayOverwriteFile = nope; const char **xpm; @@ -230,8 +231,9 @@ return 2; } - PCB_ACT_CONVARG(1, FGW_STR, gui_MayOverwriteFile, fn = argv[1].val.str); - PCB_ACT_CONVARG(2, FGW_INT, gui_MayOverwriteFile, multi = argv[2].val.nat_int); + PCB_ACT_CONVARG(1, FGW_PTR, gui_MayOverwriteFile, hidlib = argv[1].val.ptr_void); + PCB_ACT_CONVARG(2, FGW_STR, gui_MayOverwriteFile, fn = argv[2].val.str); + PCB_ACT_CONVARG(3, FGW_INT, gui_MayOverwriteFile, multi = argv[3].val.nat_int); PCB_DAD_BEGIN_VBOX(dlg); /* icon and label */ @@ -269,7 +271,7 @@ if (dlg[wdontask].val.lng) { pcb_conf_set(CFR_USER, "plugins/dialogs/file_overwrite_dialog/dont_ask", 0, "1", POL_OVERWRITE); if (pcb_conf_isdirty(CFR_USER)) - pcb_conf_save_file(&PCB->hidlib, NULL, NULL, CFR_USER, NULL); + pcb_conf_save_file(hidlib, NULL, NULL, CFR_USER, NULL); } PCB_DAD_FREE(dlg);