mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-26 15:08:17 +01:00
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
This commit is contained in:
parent
c2674e6da4
commit
5270db4086
1 changed files with 14 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue