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:
Doug McLain 2011-02-15 18:02:50 +00:00
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

View File

@ -264,7 +264,7 @@ def set_winegcc(self):
self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
self.env.CC = 'winegcc'
def build_color_scheme(path):
def build_color_scheme(path, prefix):
f = open (path, 'r')
color_scheme = ''
for line in f:
@ -273,7 +273,8 @@ def build_color_scheme(path):
words = line.split()
if len(color_scheme):
color_scheme += ';'
color_scheme += 'A_' # prefix for color name
color_scheme += prefix
color_scheme += '_'
color_scheme += words[1]
color_scheme += ':'
color_scheme += words[2]
@ -429,8 +430,8 @@ def build(bld):
light_rc_subst_dict[key] = fontstyle
# RC files
dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme ('gtk2_ardour/ardour3_ui_dark.rc.in')
light_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme ('gtk2_ardour/ardour3_ui_light.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', 'ARDOUR_LIGHT')
obj = bld.new_task_gen('subst')
obj.source = 'ardour3_ui_dark.rc.in'

View File

@ -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,
* 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>* error_style = 0;
static Glib::RefPtr<Style>* warning_style = 0;
@ -155,10 +153,10 @@ UI::load_rcfile (string path, bool themechange)
return -1;
}
RC rc (path.c_str());
//this is buggy in gtkmm for some reason, so use C
//RC::reset_styles (Gtk::Settings::get_default());
gtk_rc_reset_styles (gtk_settings_get_default());
RC rc (path.c_str());
//this is buggy in gtkmm for some reason, so use C
//RC::reset_styles (Gtk::Settings::get_default());
gtk_rc_reset_styles (gtk_settings_get_default());
theme_changed.emit();