From 5723676092d53abc797ad221828a238214034368 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 8 Jul 2015 15:36:49 -0400 Subject: make sure the prefs editor sets up its own window correctly --- gtk2_ardour/rc_option_editor.cc | 19 ++++++++++++++++++- gtk2_ardour/rc_option_editor.h | 2 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index f08b0ff6ce..fee9e47094 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1720,7 +1720,7 @@ private: RCOptionEditor::RCOptionEditor () : OptionEditor (Config, string_compose (_("%1 Preferences"), PROGRAM_NAME)) - , Tabbable (*this, _("Preferences")) + , Tabbable (*this, _("Preferences")) /* pack self-as-vbox into tabbable */ , _rc_config (Config) , _mixer_strip_visibility ("mixer-element-visibility") { @@ -3248,3 +3248,20 @@ RCOptionEditor::populate_sync_options () parameter_changed ("sync-source"); } + +Gtk::Window* +RCOptionEditor::use_own_window () +{ + bool new_window = !own_window(); + + Gtk::Window* win = Tabbable::use_own_window (); + + if (win && new_window) { + win->set_name ("PreferencesWindow"); + ARDOUR_UI::instance()->setup_toplevel_window (*win, _("Preferences"), this); + + cerr << "created prefs window\n"; + } + + return win; +} diff --git a/gtk2_ardour/rc_option_editor.h b/gtk2_ardour/rc_option_editor.h index a74df7cfde..1681a92a2b 100644 --- a/gtk2_ardour/rc_option_editor.h +++ b/gtk2_ardour/rc_option_editor.h @@ -41,6 +41,8 @@ public: void populate_sync_options (); + Gtk::Window* use_own_window (); + private: void parameter_changed (std::string const &); void ltc_generator_volume_changed (); -- cgit v1.2.3