summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-03-17 20:54:03 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-03-17 20:54:03 +0000
commit997e4b1f9cd7ccfc704b7c035051da7f60d831e7 (patch)
tree1236e40183b677abf4a2882e4cfe8e0a345eb24d /gtk2_ardour/plugin_ui.cc
parent19a4b990325577fc949ccd5d5fbad4520eb1df56 (diff)
merge with 2.0-ongoing @ rev 3147
git-svn-id: svn://localhost/ardour2/branches/3.0@3152 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r--gtk2_ardour/plugin_ui.cc34
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());
+}