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
This commit is contained in:
parent
6a9cf1e210
commit
dcf4d7b38a
|
@ -376,11 +376,7 @@ ThemeManager::on_dark_theme_button_toggled()
|
|||
{
|
||||
if (!dark_button.get_active()) return;
|
||||
|
||||
if (HACK_PROFILE_IS_SAE()){
|
||||
ARDOUR_UI::config()->set_ui_rc_file("ardour3_ui_dark_sae.rc");
|
||||
} else {
|
||||
ARDOUR_UI::config()->set_ui_rc_file("ardour3_ui_dark.rc");
|
||||
}
|
||||
ARDOUR_UI::config()->set_ui_rc_file("ui_dark.rc");
|
||||
ARDOUR_UI::config()->set_dirty ();
|
||||
|
||||
load_rc_file (ARDOUR_UI::config()->get_ui_rc_file(), true);
|
||||
|
@ -391,12 +387,7 @@ ThemeManager::on_light_theme_button_toggled()
|
|||
{
|
||||
if (!light_button.get_active()) return;
|
||||
|
||||
if (HACK_PROFILE_IS_SAE()){
|
||||
ARDOUR_UI::config()->set_ui_rc_file("ardour3_ui_light_sae.rc");
|
||||
} else {
|
||||
ARDOUR_UI::config()->set_ui_rc_file("ardour3_ui_light.rc");
|
||||
}
|
||||
|
||||
ARDOUR_UI::config()->set_ui_rc_file("ui_light.rc");
|
||||
load_rc_file (ARDOUR_UI::config()->get_ui_rc_file(), true);
|
||||
}
|
||||
|
||||
|
@ -473,9 +464,9 @@ ThemeManager::setup_theme ()
|
|||
rcfile = ARDOUR_UI::config()->get_ui_rc_file();
|
||||
}
|
||||
|
||||
if (rcfile == "ardour3_ui_dark.rc" || rcfile == "ardour3_ui_dark_sae.rc") {
|
||||
if (rcfile == "ui_dark.rc") {
|
||||
dark_button.set_active();
|
||||
} else if (rcfile == "ardour3_ui_light.rc" || rcfile == "ardour3_ui_light_sae.rc") {
|
||||
} else if (rcfile == "ui_light.rc") {
|
||||
light_button.set_active();
|
||||
}
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
UI_CONFIG_VARIABLE(std::string, icon_set, "icon-set", "default")
|
||||
UI_CONFIG_VARIABLE(std::string, ui_rc_file, "ui-rc-file", "ardour3_ui_dark.rc")
|
||||
UI_CONFIG_VARIABLE(std::string, ui_rc_file, "ui-rc-file", "ui_dark.rc")
|
||||
UI_CONFIG_VARIABLE(bool, flat_buttons, "flat-buttons", false)
|
||||
UI_CONFIG_VARIABLE(bool, blink_rec_arm, "blink-rec-arm", false)
|
||||
UI_CONFIG_VARIABLE(float, waveform_gradient_depth, "waveform-gradient-depth", 0)
|
||||
|
|
|
@ -350,6 +350,6 @@ style "status_bar_box"
|
|||
bg[NORMAL] = { 0.149, 0.149, 0.149 }
|
||||
}
|
||||
|
||||
##include ardour3_dark_fonts.rc
|
||||
##include ardour3_dark_styles.rc
|
||||
##include ardour3_widgets.rc
|
||||
##include dark_fonts.rc
|
||||
##include dark_styles.rc
|
||||
##include widgets.rc
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Ardour>
|
||||
<UI>
|
||||
<Option name="ui-rc-file" value="ardour3_ui_dark.rc"/>
|
||||
<Option name="ui-rc-file" value="ui_dark.rc"/>
|
||||
<Option name="flat-buttons" value="00000000"/>
|
||||
<Option name="square-buttons" value="00000000"/>
|
||||
<Option name="blink-rec-arm" value="00000000"/>
|
|
@ -361,6 +361,6 @@ style "status_bar_box"
|
|||
bg[NORMAL] = { 0.149, 0.149, 0.149 }
|
||||
}
|
||||
|
||||
##include ardour3_light_fonts.rc
|
||||
##include ardour3_light_styles.rc
|
||||
##include ardour3_widgets.rc
|
||||
##include light_fonts.rc
|
||||
##include light_styles.rc
|
||||
##include widgets.rc
|
|
@ -602,70 +602,70 @@ def build(bld):
|
|||
|
||||
# RC files
|
||||
dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
|
||||
'gtk2_ardour/ardour3_ui_dark.rc.in', 'ARDOUR_DARK')
|
||||
'gtk2_ardour/ui_dark.rc.in', 'ARDOUR_DARK')
|
||||
dark_rc_subst_dict['COLPREFIX'] = 'ARDOUR_DARK'
|
||||
light_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
|
||||
'gtk2_ardour/ardour3_ui_light.rc.in', 'ARDOUR_LIGHT')
|
||||
'gtk2_ardour/ui_light.rc.in', 'ARDOUR_LIGHT')
|
||||
light_rc_subst_dict['COLPREFIX'] = 'ARDOUR_LIGHT'
|
||||
|
||||
obj = bld(features = 'subst')
|
||||
obj.source = [ 'ardour3_ui_dark.rc.in' ]
|
||||
obj.target = 'ardour3_ui_dark.rc.pre'
|
||||
obj.source = [ 'ui_dark.rc.in' ]
|
||||
obj.target = 'ui_dark.rc.pre'
|
||||
obj.install_path = None
|
||||
set_subst_dict(obj, dark_rc_subst_dict)
|
||||
|
||||
obj = bld(features = 'subst')
|
||||
obj.source = [ 'ardour3_ui_light.rc.in' ]
|
||||
obj.target = 'ardour3_ui_light.rc.pre'
|
||||
obj.source = [ 'ui_light.rc.in' ]
|
||||
obj.target = 'ui_light.rc.pre'
|
||||
obj.install_path = None
|
||||
set_subst_dict(obj, light_rc_subst_dict)
|
||||
|
||||
obj = bld(features = 'subst')
|
||||
obj.source = [ 'ardour3_styles.rc.in' ]
|
||||
obj.target = 'ardour3_dark_styles.rc'
|
||||
obj.source = [ 'styles.rc.in' ]
|
||||
obj.target = 'dark_styles.rc'
|
||||
obj.install_path = None
|
||||
set_subst_dict(obj, dark_rc_subst_dict)
|
||||
|
||||
obj = bld(features = 'subst')
|
||||
obj.source = [ 'ardour3_styles.rc.in' ]
|
||||
obj.target = 'ardour3_light_styles.rc'
|
||||
obj.source = [ 'styles.rc.in' ]
|
||||
obj.target = 'light_styles.rc'
|
||||
obj.install_path = None
|
||||
set_subst_dict(obj, light_rc_subst_dict)
|
||||
|
||||
obj = bld(features = 'subst')
|
||||
obj.source = [ 'ardour3_fonts.rc.in' ]
|
||||
obj.target = 'ardour3_dark_fonts.rc'
|
||||
obj.source = [ 'fonts.rc.in' ]
|
||||
obj.target = 'dark_fonts.rc'
|
||||
obj.install_path = None
|
||||
set_subst_dict(obj, dark_rc_subst_dict)
|
||||
|
||||
obj = bld(features = 'subst')
|
||||
obj.source = [ 'ardour3_fonts.rc.in' ]
|
||||
obj.target = 'ardour3_light_fonts.rc'
|
||||
obj.source = [ 'fonts.rc.in' ]
|
||||
obj.target = 'light_fonts.rc'
|
||||
obj.install_path = None
|
||||
set_subst_dict(obj, light_rc_subst_dict)
|
||||
|
||||
obj = bld(rule = autowaf.copyfile)
|
||||
obj.source = [ 'ardour3_widget_list.rc' ]
|
||||
obj.target = 'ardour3_widgets.rc'
|
||||
obj = bld(rule = copyfile)
|
||||
obj.source = [ 'widget_list.rc' ]
|
||||
obj.target = 'widgets.rc'
|
||||
obj.install_path = None
|
||||
|
||||
obj = bld (rule = include_processor)
|
||||
obj.source = [ 'ardour3_ui_dark.rc.pre' ]
|
||||
obj.source = [ 'ui_dark.rc.pre' ]
|
||||
# find and add all ##include dependencies as sources
|
||||
obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_dark.rc.in').srcpath(), True)
|
||||
obj.target = 'ardour3_ui_dark.rc'
|
||||
obj.source += _doPyp (bld.path.find_resource ('ui_dark.rc.in').srcpath(), True)
|
||||
obj.target = 'ui_dark.rc'
|
||||
obj.install_path = bld.env['CONFDIR']
|
||||
|
||||
obj = bld (rule = include_processor)
|
||||
obj.source = [ 'ardour3_ui_light.rc.pre' ]
|
||||
obj.source = [ 'ui_light.rc.pre' ]
|
||||
# find and add all ##include dependencies as sources
|
||||
obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_light.rc.in').srcpath(), True)
|
||||
obj.target = 'ardour3_ui_light.rc'
|
||||
obj.source += _doPyp (bld.path.find_resource ('ui_light.rc.in').srcpath(), True)
|
||||
obj.target = 'ui_light.rc'
|
||||
obj.install_path = bld.env['CONFDIR']
|
||||
|
||||
obj = bld(features = 'subst')
|
||||
obj.source = [ 'ardour3_ui_default.conf.in' ]
|
||||
obj.target = 'ardour3_ui_default.conf'
|
||||
obj.source = [ 'ui_default.conf.in' ]
|
||||
obj.target = 'ui_default.conf'
|
||||
obj.install_path = None
|
||||
set_subst_dict(obj, ui_conf_dict)
|
||||
|
||||
|
@ -718,7 +718,7 @@ def build(bld):
|
|||
bld.install_files(bld.env['DATADIR'], 'ArdourMono.ttf')
|
||||
|
||||
# Default UI configuration
|
||||
bld.install_files(bld.env['CONFDIR'], 'ardour3_ui_default.conf')
|
||||
bld.install_files(bld.env['CONFDIR'], 'ui_default.conf')
|
||||
|
||||
# Default export stuff
|
||||
bld.install_files(os.path.join(bld.env['CONFDIR'],' export'), bld.path.ant_glob('export/*.format'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user