6 static char *xml_titles[] =
22 static int auto_defaults[] =
36 int AutoConf::load_defaults(Defaults* defaults)
38 for(int i = 0; i < AUTOMATION_TOTAL; i++)
40 autos[i] = defaults->get(xml_titles[i], auto_defaults[i]);
42 transitions = defaults->get("SHOW_TRANSITIONS", 1);
43 plugins = defaults->get("SHOW_PLUGINS", 1);
47 void AutoConf::load_xml(FileXML *file)
49 for(int i = 0; i < AUTOMATION_TOTAL; i++)
51 autos[i] = file->tag.get_property(xml_titles[i], auto_defaults[i]);
53 transitions = file->tag.get_property("SHOW_TRANSITIONS", 1);
54 plugins = file->tag.get_property("SHOW_PLUGINS", 1);
57 int AutoConf::save_defaults(Defaults* defaults)
59 for(int i = 0; i < AUTOMATION_TOTAL; i++)
61 defaults->update(xml_titles[i], autos[i]);
63 defaults->update("SHOW_TRANSITIONS", transitions);
64 defaults->update("SHOW_PLUGINS", plugins);
68 void AutoConf::save_xml(FileXML *file)
70 for(int i = 0; i < AUTOMATION_TOTAL; i++)
72 file->tag.set_property(xml_titles[i], autos[i]);
74 file->tag.set_property("SHOW_TRANSITIONS", transitions);
75 file->tag.set_property("SHOW_PLUGINS", plugins);
78 int AutoConf::set_all(int value)
80 for(int i = 0; i < AUTOMATION_TOTAL; i++)
89 AutoConf& AutoConf::operator=(AutoConf &that)
95 void AutoConf::copy_from(AutoConf *src)
97 for(int i = 0; i < AUTOMATION_TOTAL; i++)
99 autos[i] = src->autos[i];
101 transitions = src->transitions;
102 plugins = src->plugins;