X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=config.c;h=c50d97da61d057bd1df7f4daa8d79104e1e020a0;hb=bb1d656dd4dac5594bf13717dac1e2512b311935;hp=a7236d1959b259acc5924c8b3da8bf73a7eadd2f;hpb=9c75fe9a3fa5e6b709f1c210795d1140ca1be2e8;p=PuTTY.git diff --git a/config.c b/config.c index a7236d19..c50d97da 100644 --- a/config.c +++ b/config.c @@ -131,12 +131,11 @@ void conf_filesel_handler(union control *ctrl, void *dlg, Conf *conf = (Conf *)data; if (event == EVENT_REFRESH) { - dlg_filesel_set(ctrl, dlg, *conf_get_filename(conf, key)); + dlg_filesel_set(ctrl, dlg, conf_get_filename(conf, key)); } else if (event == EVENT_VALCHANGE) { - Filename filename; - dlg_filesel_get(ctrl, dlg, &filename); - conf_set_filename(conf, key, &filename); - /* If Filenames ever become dynamic, free this one. */ + Filename *filename = dlg_filesel_get(ctrl, dlg); + conf_set_filename(conf, key, filename); + filename_free(filename); } } @@ -848,8 +847,8 @@ static void colour_handler(union control *ctrl, void *dlg, } else { clear = FALSE; r = conf_get_int_int(conf, CONF_colours, i*3+0); - g = conf_get_int_int(conf, CONF_colours, i*3+0); - b = conf_get_int_int(conf, CONF_colours, i*3+0); + g = conf_get_int_int(conf, CONF_colours, i*3+1); + b = conf_get_int_int(conf, CONF_colours, i*3+2); } update = TRUE; } @@ -902,8 +901,8 @@ static void colour_handler(union control *ctrl, void *dlg, */ if (dlg_coloursel_results(ctrl, dlg, &r, &g, &b)) { conf_set_int_int(conf, CONF_colours, i*3+0, r); - conf_set_int_int(conf, CONF_colours, i*3+0, g); - conf_set_int_int(conf, CONF_colours, i*3+0, b); + conf_set_int_int(conf, CONF_colours, i*3+1, g); + conf_set_int_int(conf, CONF_colours, i*3+2, b); clear = FALSE; update = TRUE; }