From 68b6d0d796560ca9bd417a02bed3e9933c343e10 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jun 2016 19:39:13 -0400 Subject: [PATCH] fix some more thinkos related to user color file management --- gtk2_ardour/color_theme_manager.cc | 4 +++- gtk2_ardour/ui_config.cc | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/color_theme_manager.cc b/gtk2_ardour/color_theme_manager.cc index 10eb9402e2..df0a0ddd4c 100644 --- a/gtk2_ardour/color_theme_manager.cc +++ b/gtk2_ardour/color_theme_manager.cc @@ -231,7 +231,9 @@ ColorThemeManager::reset_canvas_colors() 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, false, true); if (find_file (ardour_config_search_path(), basename, cfile)) { string backup = cfile + string (X_(".old")); diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 67117c2f2f..0890f6531b 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -300,12 +300,14 @@ UIConfiguration::load_color_theme (bool allow_own) PBD::Searchpath sp (user_config_directory()); - if (find_file (sp, color_file_name (true, running_from_source, true), cfile)) { + /* user's own color files never have the program name in them */ + + if (find_file (sp, color_file_name (true, false, true), cfile)) { found = true; } if (!found) { - if (find_file (sp, color_file_name (true, running_from_source, false), cfile)) { + if (find_file (sp, color_file_name (true, false, false), cfile)) { found = true; } }