diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-05-02 10:11:57 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-05-02 10:11:57 -0400 |
commit | 7df1654947ba6f39c4133f65d715577ce8ce6daf (patch) | |
tree | 262ffabf3f3a88d93367ee08247b958a98577638 /gtk2_ardour | |
parent | f04c35cb1c3e89380c53eb95ce62091e1d7d7e76 (diff) |
make PluginUIWindow inherit from ArdourWindow not GtkWindow
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 19 | ||||
-rw-r--r-- | gtk2_ardour/plugin_ui.h | 6 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.cc | 10 |
3 files changed, 7 insertions, 28 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 5b281f33ab..bab081b600 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -82,11 +82,10 @@ using namespace Gtkmm2ext; using namespace Gtk; PluginUIWindow::PluginUIWindow ( - Gtk::Window* win, boost::shared_ptr<PluginInsert> insert, bool scrollable, bool editor) - : parent (win) + : ArdourWindow (string()) , was_visible (false) , _keyboard_focused (false) #ifdef AUDIOUNIT_SUPPORT @@ -96,7 +95,6 @@ PluginUIWindow::PluginUIWindow ( { bool have_gui = false; - Label* label = manage (new Label()); label->set_markup ("<b>THIS IS THE PLUGIN UI</b>"); @@ -147,7 +145,6 @@ PluginUIWindow::PluginUIWindow ( signal_unmap_event().connect (sigc::mem_fun (*pu, &GenericPluginUI::stop_updating)); } - // set_position (Gtk::WIN_POS_MOUSE); set_name ("PluginEditor"); add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); @@ -163,6 +160,7 @@ PluginUIWindow::PluginUIWindow ( set_default_size (w, h); set_resizable (_pluginui->resizable()); + set_position (Gtk::WIN_POS_MOUSE); } PluginUIWindow::~PluginUIWindow () @@ -171,18 +169,9 @@ PluginUIWindow::~PluginUIWindow () } void -PluginUIWindow::set_parent (Gtk::Window* win) -{ - parent = win; -} - -void PluginUIWindow::on_map () { Window::on_map (); -#ifdef __APPLE__ - set_keep_above (true); -#endif // __APPLE__ } bool @@ -236,10 +225,6 @@ PluginUIWindow::on_show () Window::on_show (); } } - - if (parent) { - // set_transient_for (*parent); - } } void diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h index 6b886cf268..be03e6ede4 100644 --- a/gtk2_ardour/plugin_ui.h +++ b/gtk2_ardour/plugin_ui.h @@ -50,6 +50,7 @@ #include "automation_controller.h" #include "ardour_button.h" +#include "ardour_window.h" namespace ARDOUR { class PluginInsert; @@ -278,11 +279,10 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox bool integer_printer (char* buf, Gtk::Adjustment &, ControlUI *); }; -class PluginUIWindow : public Gtk::Window +class PluginUIWindow : public ArdourWindow { public: - PluginUIWindow (Gtk::Window*, - boost::shared_ptr<ARDOUR::PluginInsert> insert, + PluginUIWindow (boost::shared_ptr<ARDOUR::PluginInsert> insert, bool scrollable=false, bool editor=true); ~PluginUIWindow (); diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 16088786cd..3618f437a2 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -2094,20 +2094,16 @@ ProcessorBox::toggle_edit_processor (boost::shared_ptr<Processor> processor) /* these are both allowed to be null */ - Container* toplevel = get_toplevel(); - Window* win = dynamic_cast<Gtk::Window*>(toplevel); - Window* w = get_processor_ui (plugin_insert); if (w == 0) { - plugin_ui = new PluginUIWindow (win, plugin_insert); + plugin_ui = new PluginUIWindow (plugin_insert); plugin_ui->set_title (generate_processor_title (plugin_insert)); set_processor_ui (plugin_insert, plugin_ui); } else { plugin_ui = dynamic_cast<PluginUIWindow *> (w); - plugin_ui->set_parent (win); } gidget = plugin_ui; @@ -2155,9 +2151,7 @@ ProcessorBox::toggle_edit_generic_processor (boost::shared_ptr<Processor> proces return; } - Container* toplevel = get_toplevel(); - Window* win = dynamic_cast<Gtk::Window*>(toplevel); - PluginUIWindow* plugin_ui = new PluginUIWindow(win, plugin_insert, true, false); + PluginUIWindow* plugin_ui = new PluginUIWindow (plugin_insert, true, false); plugin_ui->set_title(generate_processor_title (plugin_insert)); if (plugin_ui->is_visible()) { |