+void
+load_rc_file (const string& filename, bool themechange)
+{
+ sys::path rc_file_path;
+
+ SearchPath spath (ardour_search_path());
+ spath += user_config_directory();
+ spath += system_config_search_path();
+
+ if (!find_file_in_search_path (spath, filename, rc_file_path)) {
+ warning << string_compose(
+ _("Unable to find UI style file %1 in search path %2. Ardour will look strange"),
+ filename, spath.to_string())
+ << endmsg;
+ return;
+ }
+
+ cerr << "Loading ui configuration file " << rc_file_path.to_string() << endmsg;
+
+ Gtkmm2ext::UI::instance()->load_rcfile (rc_file_path.to_string(), 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)