make sure the prefs editor sets up its own window correctly
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 8 Jul 2015 19:36:49 +0000 (15:36 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 22 Feb 2016 20:31:21 +0000 (15:31 -0500)
gtk2_ardour/rc_option_editor.cc
gtk2_ardour/rc_option_editor.h

index f08b0ff6ce9b4eed677d6bf48655dcf4e1567dd4..fee9e4709407006e7bba921a2db26e041270f91a 100644 (file)
@@ -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;
+}
index a74df7cfde12d52ec0f2bb58b463ebde0e4f27c5..1681a92a2bc7b85ed90dcb5f5ff745793e7ea066 100644 (file)
@@ -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 ();