+ } else {
+ if (set_state (*tree.root(), Stateful::loading_state_version)) {
+ error << string_compose(_("default ui configuration file \"%1\" not loaded successfully."), rcfile) << endmsg;
+ } else {
+ _dirty = false;
+ ret = 0;
+ }
+ }
+
+ } else {
+ warning << string_compose (_("Could not find default UI configuration file %1"), default_ui_config_file_name) << endmsg;
+ }
+
+
+ if (ret == 0) {
+ /* reload color theme */
+ load_color_theme (false);
+ ColorsChanged (); /* EMIT SIGNAL */
+ }
+
+ return ret;
+}
+
+int
+UIConfiguration::load_color_theme (bool allow_own)
+{
+ std::string cfile;
+ string basename;
+ bool found = false;
+
+ if (allow_own) {
+ basename = "my-";
+ basename += color_file.get();
+ basename += ".colors";
+
+ if (find_file (ardour_config_search_path(), basename, cfile)) {
+ found = true;
+ }
+ }
+
+ if (!found) {
+ basename = color_file.get();
+ basename += ".colors";
+
+ if (find_file (ardour_config_search_path(), basename, cfile)) {
+ found = true;
+ }
+ }
+
+ if (found) {
+
+ XMLTree tree;
+
+ info << string_compose (_("Loading color file %1"), cfile) << endmsg;
+
+ if (!tree.read (cfile.c_str())) {
+ error << string_compose(_("cannot read color file \"%1\""), cfile) << endmsg;