static void k5_ids_write_params(k5_ids_dlg_data * d) { khm_int32 rv; #ifdef DEBUG assert(csp_params); #endif if (!k5_ids_is_mod(d)) return; #define WRITEPARAM(po,pn,vn) \ if (po != pn) { \ po = pn; \ rv = khc_write_int32(csp_params, vn, (khm_int32) po); \ assert(KHM_SUCCEEDED(rv)); \ } WRITEPARAM(d->life,d->tc_life.current, L"DefaultLifetime"); WRITEPARAM(d->renew_life,d->tc_renew.current, L"DefaultRenewLifetime"); WRITEPARAM(d->life_max,d->tc_life_max.current, L"MaxLifetime"); WRITEPARAM(d->life_min,d->tc_life_min.current, L"MinLifetime"); WRITEPARAM(d->renew_max,d->tc_renew_max.current, L"MaxRenewLifetime"); WRITEPARAM(d->renew_min,d->tc_renew_min.current, L"MinRenewLifetime"); WRITEPARAM(d->opt_saved.renewable, d->opt.renewable, L"Renewable"); WRITEPARAM(d->opt_saved.forwardable, d->opt.forwardable, L"Forwardable"); WRITEPARAM(d->opt_saved.addressless, d->opt.addressless, L"Addressless"); #undef WRITEPARAM khui_cfg_set_flags_inst(&d->cfg, KHUI_CNFLAG_APPLIED, KHUI_CNFLAG_APPLIED | KHUI_CNFLAG_MODIFIED); }
static void k5_ids_check_mod(k5_ids_dlg_data * d) { BOOL modified = k5_ids_is_mod(d); khui_cfg_set_flags_inst(&d->cfg, (modified)?KHUI_CNFLAG_MODIFIED:0, KHUI_CNFLAG_MODIFIED); }