fix some more thinkos related to user color file management
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 21 Jun 2016 23:39:13 +0000 (19:39 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 21 Jun 2016 23:39:13 +0000 (19:39 -0400)
gtk2_ardour/color_theme_manager.cc
gtk2_ardour/ui_config.cc

index 10eb9402e27bdf7834e14b697aa5fc39c9d99c2f..df0a0ddd4cf5f3db62850fee0999bcd5422c1d55 100644 (file)
@@ -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"));
index 67117c2f2f90920330972c637a614f9b27c9bd38..0890f6531b2c7e6c51e8ec221b57fc8e8b670b75 100644 (file)
@@ -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;
                        }
                }