summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-11-20 17:01:42 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-11-20 17:01:42 +0000
commit5270db4086b73ee56af3d79abb22c4bec89588d8 (patch)
tree448a1350061c565f540182680cb2348187d5cd1b
parentc2674e6da4349dfed22973468536bcff59de4e6c (diff)
fix crash caused by ARDOUR::Profile not existing when theme manager is created, and checking for sae-specific theme variation. hacked around for now, pending release
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4224 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/theme_manager.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc
index e0333df802..d69d356cff 100644
--- a/gtk2_ardour/theme_manager.cc
+++ b/gtk2_ardour/theme_manager.cc
@@ -193,11 +193,23 @@ load_rc_file (const string& filename, bool themechange)
Gtkmm2ext::UI::instance()->load_rcfile (rcfile, themechange);
}
+/* hmm, this is a problem. the profile doesn't
+ exist when the theme manager is constructed
+ and toggles buttons during "normal" GTK setup.
+
+ a better solution will be to make all Profile
+ methods static or something.
+
+ XXX FIX ME
+*/
+
+#define HACK_PROFILE_IS_SAE() (getenv("ARDOUR_SAE")!=0)
+
void
ThemeManager::on_dark_theme_button_toggled()
{
if (!dark_button.get_active()) return;
- if (Profile->get_sae()) {
+ if (HACK_PROFILE_IS_SAE()){
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark_sae.rc");
} else {
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark.rc");
@@ -209,7 +221,7 @@ void
ThemeManager::on_light_theme_button_toggled()
{
if (!light_button.get_active()) return;
- if (Profile->get_sae()) {
+ if (HACK_PROFILE_IS_SAE()){
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light_sae.rc");
} else {
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light.rc");