diff options
author | Robin Gareus <robin@gareus.org> | 2016-11-27 21:53:16 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-11-27 21:54:28 +0100 |
commit | 5ec21347a9595a88d7d1e935a5e4a271bdfb7933 (patch) | |
tree | 3a88f5b12e5bf62c57c940d61957f2233b9a2cfa /gtk2_ardour/utils.cc | |
parent | 2f30d763edafb1075c9f07f8bedf3af9d3adc13e (diff) |
Don't include program-name with <Option name="color-file" />
This allows for e.g. mixbus and mixbus32c to share the config, but
use different color-files at runtime.
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r-- | gtk2_ardour/utils.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 26b048f2b0..16607348f3 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -403,7 +403,12 @@ ARDOUR_UI_UTILS::get_color_themes (map<std::string,std::string>& themes) continue; } - themes.insert (make_pair (prop->value(), Glib::filename_to_utf8 (basename_nosuffix(*e)))); + std::string color_name = basename_nosuffix(*e); + size_t sep = color_name.find_first_of("-"); + if (sep != string::npos) { + color_name = color_name.substr (0, sep); + } + themes.insert (make_pair (prop->value(), color_name)); } } } |