#include #include "str_editor.h" str_editor::str_editor(struct setting *s, const char *sname) : e(10, 25, s->data.string), s(&s->data.string) { editing_widget_ready(e, sname); } void str_editor::set_data() { const char *const contents = e.get_contents(); if (strequ(contents, *s)) return; delete *s; *s = strdup(contents); main_w->is_saved = false; }