diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-07 10:25:46 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-07 10:25:46 -0400 |
commit | dcf4d7b38a5d9e0db31924912180edd6c922ca34 (patch) | |
tree | 69863b816971509fa0f7ae0d6c38d553ec793326 /gtk2_ardour/ui_config.cc | |
parent | 6a9cf1e210e9cb6cb37e0137aec14e6a380e5147 (diff) |
change all GUI config files (GTK RC and our own XML config files) to use product-neutral names
Conflicts:
gtk2_ardour/ui_config.cc
gtk2_ardour/ui_default.conf.in
gtk2_ardour/wscript
Diffstat (limited to 'gtk2_ardour/ui_config.cc')
-rw-r--r-- | gtk2_ardour/ui_config.cc | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 71e0808c63..5c98766819 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -40,6 +40,9 @@ using namespace std; using namespace PBD; using namespace ARDOUR; +static const char* ui_config_file_name = "ui_config"; +static const char* default_ui_config_file_name = "default_ui_config"; + UIConfiguration::UIConfiguration () : #undef UI_CONFIG_VARIABLE @@ -76,25 +79,15 @@ int UIConfiguration::load_defaults () { int found = 0; + std::string rcfile; - std::string default_ui_rc_file; - std::string rcfile; - - if (getenv ("ARDOUR_SAE")) { - rcfile = "ardour3_ui_sae.conf"; - } else { - rcfile = "ardour3_ui_default.conf"; - } - - if (find_file (ardour_config_search_path(), rcfile, default_ui_rc_file) ) { + if (find_file (ardour_config_search_path(), default_ui_config_file_name, rcfile) ) { XMLTree tree; found = 1; - string rcfile = default_ui_rc_file; - info << string_compose (_("Loading default ui configuration file %1"), rcfile) << endl; - if (!tree.read (rcfile.c_str())) { + if (!tree.read (default_ui_config_file_name)) { error << string_compose(_("cannot read default ui configuration file \"%1\""), rcfile) << endmsg; return -1; } @@ -115,14 +108,12 @@ UIConfiguration::load_state () { bool found = false; - std::string default_ui_rc_file; + std::string rcfile; - if ( find_file (ardour_config_search_path(), "ardour3_ui_default.conf", default_ui_rc_file)) { + if ( find_file (ardour_config_search_path(), default_ui_config_file_name, rcfile)) { XMLTree tree; found = true; - string rcfile = default_ui_rc_file; - info << string_compose (_("Loading default ui configuration file %1"), rcfile) << endl; if (!tree.read (rcfile.c_str())) { @@ -136,14 +127,10 @@ UIConfiguration::load_state () } } - std::string user_ui_rc_file; - - if (find_file (ardour_config_search_path(), "ardour3_ui.conf", user_ui_rc_file)) { + if (find_file (ardour_config_search_path(), ui_config_file_name, rcfile)) { XMLTree tree; found = true; - string rcfile = user_ui_rc_file; - info << string_compose (_("Loading user ui configuration file %1"), rcfile) << endmsg; if (!tree.read (rcfile)) { @@ -173,7 +160,7 @@ UIConfiguration::save_state() XMLTree tree; std::string rcfile(user_config_directory()); - rcfile = Glib::build_filename (rcfile, "ardour3_ui.conf"); + rcfile = Glib::build_filename (rcfile, ui_config_file_name); // this test seems bogus? if (rcfile.length()) { |