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);
}
}
} 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;
}
*/
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;
}