diff options
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 7f2955dfda..5813c644fb 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -61,7 +61,8 @@ using namespace Gtkmm2ext; using namespace Gtk; using namespace sigc; -PluginUIWindow::PluginUIWindow (boost::shared_ptr<PluginInsert> insert, nframes64_t sr, nframes64_t period, bool scrollable) +PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert> insert, bool scrollable) + : parent (win) { bool have_gui = false; non_gtk_gui = false; @@ -136,17 +137,36 @@ PluginUIWindow::~PluginUIWindow () } void +PluginUIWindow::set_parent (Gtk::Window* win) +{ + parent = win; +} + +void +PluginUIWindow::on_map () +{ + Window::on_map (); + set_keep_above (true); +} + +void PluginUIWindow::on_show () { - cerr << "PluginWindow shown\n"; - + if (_pluginui) { + _pluginui->update_presets (); + } + Window::on_show (); + + if (parent) { + cerr << "plugin becomes transient for " << parent << endl; + // set_transient_for (*parent); + } } void PluginUIWindow::on_hide () { - cerr << "PluginWindow hidden\n"; Window::on_hide (); } @@ -329,3 +349,9 @@ PlugUIBase::bypass_toggled () } } } + +void +PlugUIBase::update_presets () +{ + set_popdown_strings (preset_combo, plugin->get_presets()); +} |