diff options
author | Sampo Savolainen <v2@iki.fi> | 2009-05-08 17:21:17 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2009-05-08 17:21:17 +0000 |
commit | 764e6f919fe50692aae66855f457d4dbc515e125 (patch) | |
tree | 9af44395ca1680ef7a2f53d3284f94aeebe1ebe8 /gtk2_ardour/plugin_ui.cc | |
parent | 05c597d0ee7b36fc4f8f8e524a761b20e954d0ac (diff) |
Use an expander properly to control the visibility of plugin analysis.
git-svn-id: svn://localhost/ardour2/branches/3.0@5067 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 21f0a938d6..f398c23d7c 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -348,7 +348,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi) save_button(_("Add")), bypass_button (_("Bypass")), latency_gui (0), - eqgui_toggle (_("Freq Analysis")) + plugin_analysis_expander (_("Plugin analysis")) { //preset_combo.set_use_arrows_always(true); update_presets(); @@ -363,10 +363,6 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi) mem_fun(*this, &PlugUIBase::processor_active_changed), boost::weak_ptr<Processor>(insert))); - eqgui_toggle.set_active (false); - eqgui_toggle.signal_toggled().connect( mem_fun(*this, &PlugUIBase::toggle_plugin_analysis)); - - bypass_button.set_active (!pi->active()); bypass_button.set_name ("PluginBypassButton"); @@ -386,7 +382,9 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi) ARDOUR_UI::instance()->set_tip (&focus_button, _("Click to allow the plugin to receive keyboard events that Ardour would normally use as a shortcut"), ""); ARDOUR_UI::instance()->set_tip (&bypass_button, _("Click to enable/disable this plugin"), ""); - plugin_eq_bin.set_expanded(true); + plugin_analysis_expander.property_expanded().signal_changed().connect( mem_fun(*this, &PlugUIBase::toggle_plugin_analysis)); + + plugin_analysis_expander.set_expanded(false); } PlugUIBase::~PlugUIBase() @@ -510,24 +508,26 @@ PlugUIBase::focus_toggled (GdkEventButton* ev) void PlugUIBase::toggle_plugin_analysis() { - if (eqgui_toggle.get_active() && !plugin_eq_bin.get_child()) { + if (plugin_analysis_expander.get_expanded() && + !plugin_analysis_expander.get_child()) { // Create the GUI PluginEqGui *foo = new PluginEqGui(insert); - plugin_eq_bin.add( *foo ); - plugin_eq_bin.show_all(); + plugin_analysis_expander.add( *foo ); + plugin_analysis_expander.show_all(); } Gtk::Widget *gui; - if (!eqgui_toggle.get_active() && (gui = plugin_eq_bin.get_child())) { + if (!plugin_analysis_expander.get_expanded() && + (gui = plugin_analysis_expander.get_child())) { // Hide & remove gui->hide(); - //plugin_eq_bin.remove(*gui); - plugin_eq_bin.remove(); + //plugin_analysis_expander.remove(*gui); + plugin_analysis_expander.remove(); delete gui; - Gtk::Widget *toplevel = plugin_eq_bin.get_toplevel(); + Gtk::Widget *toplevel = plugin_analysis_expander.get_toplevel(); if (!toplevel) { std::cerr << "No toplevel widget?!?!" << std::endl; return; |