#include "ui_config.h"
#include "utils.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace Gtk;
theme_list = TreeStore::create (color_theme_columns);
TreeModel::iterator selected_iter = theme_list->children().end();
- const bool running_from_source = running_from_source_tree();
for (std::map<string,string>::iterator c = color_themes.begin(); c != color_themes.end(); ++c) {
TreeModel::Row row;
string color_file_name = c->second;
- if (running_from_source) {
- /* color themes from within the source tree are
- suffixed by "-PROGRAM-NAME" (lowercased)
- */
- replace_all (color_file_name, string_compose ("-%1", downcase (PROGRAM_NAME)), "");
- }
-
row[color_theme_columns.path] = color_file_name;
/* match second (path; really basename) since that is
what we store/restore.
*/
- cerr << "selected CF is " << UIConfiguration::instance().get_color_file () << " this is " << c->second << endl;
-
if (UIConfiguration::instance().get_color_file() == color_file_name) {
selected_iter = row;
}
string cfile;
string basename;
- basename = UIConfiguration::instance().color_file_name (false, running_from_source_tree(), false);
+ /* look for a versioned user-owned color file, and try to rename it */
+
+ basename = UIConfiguration::instance().color_file_name (true, true);
if (find_file (ardour_config_search_path(), basename, cfile)) {
string backup = cfile + string (X_(".old"));
if (row) {
string new_theme = row[color_theme_columns.path];
- cerr << "New theme name = " << new_theme << endl;
UIConfiguration::instance().set_color_file (new_theme);
}
}