mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
Update rc files to use unique rc variable names, update wscript to use the names, and re-enable theme switching
git-svn-id: svn://localhost/ardour2/branches/3.0@8861 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4bd5287980
commit
8d44c2b82a
4 changed files with 864 additions and 865 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -264,7 +264,7 @@ def set_winegcc(self):
|
||||||
self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
|
self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
|
||||||
self.env.CC = 'winegcc'
|
self.env.CC = 'winegcc'
|
||||||
|
|
||||||
def build_color_scheme(path):
|
def build_color_scheme(path, prefix):
|
||||||
f = open (path, 'r')
|
f = open (path, 'r')
|
||||||
color_scheme = ''
|
color_scheme = ''
|
||||||
for line in f:
|
for line in f:
|
||||||
|
|
@ -273,7 +273,8 @@ def build_color_scheme(path):
|
||||||
words = line.split()
|
words = line.split()
|
||||||
if len(color_scheme):
|
if len(color_scheme):
|
||||||
color_scheme += ';'
|
color_scheme += ';'
|
||||||
color_scheme += 'A_' # prefix for color name
|
color_scheme += prefix
|
||||||
|
color_scheme += '_'
|
||||||
color_scheme += words[1]
|
color_scheme += words[1]
|
||||||
color_scheme += ':'
|
color_scheme += ':'
|
||||||
color_scheme += words[2]
|
color_scheme += words[2]
|
||||||
|
|
@ -429,8 +430,8 @@ def build(bld):
|
||||||
light_rc_subst_dict[key] = fontstyle
|
light_rc_subst_dict[key] = fontstyle
|
||||||
|
|
||||||
# RC files
|
# RC files
|
||||||
dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme ('gtk2_ardour/ardour3_ui_dark.rc.in')
|
dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme ('gtk2_ardour/ardour3_ui_dark.rc.in', 'ARDOUR_DARK')
|
||||||
light_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme ('gtk2_ardour/ardour3_ui_light.rc.in')
|
light_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme ('gtk2_ardour/ardour3_ui_light.rc.in', 'ARDOUR_LIGHT')
|
||||||
|
|
||||||
obj = bld.new_task_gen('subst')
|
obj = bld.new_task_gen('subst')
|
||||||
obj.source = 'ardour3_ui_dark.rc.in'
|
obj.source = 'ardour3_ui_dark.rc.in'
|
||||||
|
|
|
||||||
|
|
@ -135,9 +135,7 @@ UI::load_rcfile (string path, bool themechange)
|
||||||
* This does not occur if wiget.get_style is used instead of rc.get_style below,
|
* This does not occur if wiget.get_style is used instead of rc.get_style below,
|
||||||
* except that doesn't actually work...
|
* except that doesn't actually work...
|
||||||
*/
|
*/
|
||||||
if (themechange) {
|
|
||||||
return 0; //Disable theme change completely till we figure this out...
|
|
||||||
}
|
|
||||||
static Glib::RefPtr<Style>* fatal_style = 0;
|
static Glib::RefPtr<Style>* fatal_style = 0;
|
||||||
static Glib::RefPtr<Style>* error_style = 0;
|
static Glib::RefPtr<Style>* error_style = 0;
|
||||||
static Glib::RefPtr<Style>* warning_style = 0;
|
static Glib::RefPtr<Style>* warning_style = 0;
|
||||||
|
|
@ -155,10 +153,10 @@ UI::load_rcfile (string path, bool themechange)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
RC rc (path.c_str());
|
RC rc (path.c_str());
|
||||||
//this is buggy in gtkmm for some reason, so use C
|
//this is buggy in gtkmm for some reason, so use C
|
||||||
//RC::reset_styles (Gtk::Settings::get_default());
|
//RC::reset_styles (Gtk::Settings::get_default());
|
||||||
gtk_rc_reset_styles (gtk_settings_get_default());
|
gtk_rc_reset_styles (gtk_settings_get_default());
|
||||||
|
|
||||||
theme_changed.emit();
|
theme_changed.emit();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue