summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/gtk_ui.cc
diff options
context:
space:
mode:
authorDoug McLain <doug@nostar.net>2007-06-29 21:12:52 +0000
committerDoug McLain <doug@nostar.net>2007-06-29 21:12:52 +0000
commit685fa95e729e5d510b28b4c715da062e9db580d9 (patch)
tree00cecdbb300b0c72261ecdb20dd18a2b9b10ce2a /libs/gtkmm2ext/gtk_ui.cc
parent69ea58691945606219de487a41532de376e7047e (diff)
only do the widget packing style hack once, instead of everytime there is a theme change
git-svn-id: svn://localhost/ardour2/trunk@2091 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtk_ui.cc')
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 2e130f066e..442a5a22de 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -114,7 +114,7 @@ UI::caller_is_ui_thread ()
}
int
-UI::load_rcfile (string path)
+UI::load_rcfile (string path, bool themechange)
{
if (path.length() == 0) {
return -1;
@@ -129,6 +129,12 @@ UI::load_rcfile (string path)
}
RC rc (path.c_str());
+ RC::reset_styles(Gtk::Settings::get_default());
+ theme_changed.emit();
+
+ if (themechange) {
+ return 0; //Don't continue on every time there is a theme change
+ }
/* have to pack widgets into a toplevel window so that styles will stick */
@@ -199,11 +205,6 @@ UI::load_rcfile (string path)
info_mtag->property_foreground_gdk().set_value(style->get_fg(STATE_NORMAL));
info_mtag->property_background_gdk().set_value(style->get_bg(STATE_NORMAL));
-
- RC::reset_styles(Gtk::Settings::get_default());
-
- theme_changed.emit();
-
return 0;
}