first compilable version of tabbable design.
[ardour.git] / gtk2_ardour / plugin_ui.cc
index a5db9d9c6943bfadbb7ad552a85fbe52d0663324..833055eff7aa80a4c7c6eaad9655757688524083 100644 (file)
@@ -100,7 +100,7 @@ PluginUIWindow::PluginUIWindow (
                case ARDOUR::Windows_VST:
                        have_gui = create_windows_vst_editor (insert);
                        break;
-                       
+
                case ARDOUR::LXVST:
                        have_gui = create_lxvst_editor (insert);
                        break;
@@ -178,9 +178,9 @@ PluginUIWindow::on_show ()
 
        if (_pluginui) {
 #if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
-                if (pre_deactivate_x >= 0) {                                                                             
+                if (pre_deactivate_x >= 0) {
                         move (pre_deactivate_x, pre_deactivate_y);
-                }                                                      
+                }
 #endif
 
                if (_pluginui->on_window_show (_title)) {
@@ -193,7 +193,7 @@ void
 PluginUIWindow::on_hide ()
 {
 #if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
-        get_position (pre_deactivate_x, pre_deactivate_y);                                                               
+        get_position (pre_deactivate_x, pre_deactivate_y);
 #endif
 
        Window::on_hide ();
@@ -374,7 +374,7 @@ PluginUIWindow::on_key_press_event (GdkEventKey* event)
                                   no widgets in this window that we want to have
                                   key focus.
                                */
-                               return relay_key_press (event, &PublicEditor::instance());
+                               return relay_key_press (event, 0);
                        } else {
                                return relay_key_press (event, this);
                        }
@@ -484,7 +484,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
        plugin->PresetAdded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
        plugin->PresetRemoved.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
        plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset, this), gui_context ());
-       plugin->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::parameter_changed, this, _1, _2), gui_context ());
+       plugin->PresetDirty.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset_modified, this), gui_context ());
 
        insert->AutomationStateChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::automation_state_changed, this), gui_context());
 
@@ -589,7 +589,7 @@ void
 PlugUIBase::add_plugin_setting ()
 {
 #ifndef NO_PLUGIN_STATE
-       NewPluginPresetDialog d (plugin);
+       NewPluginPresetDialog d (plugin, _("New Preset"));
 
        switch (d.run ()) {
        case Gtk::RESPONSE_ACCEPT:
@@ -607,7 +607,7 @@ PlugUIBase::add_plugin_setting ()
                }
                break;
        }
-#else 
+#else
        if (!seen_saving_message) {
                seen_saving_message = true;
                show_no_plugin_message();
@@ -625,7 +625,7 @@ PlugUIBase::save_plugin_setting ()
        if (!r.uri.empty ()) {
                plugin->load_preset (r);
        }
-#else 
+#else
        if (!seen_saving_message) {
                seen_saving_message = true;
                show_no_plugin_message();
@@ -662,7 +662,7 @@ bool
 PlugUIBase::bypass_button_release (GdkEventButton*)
 {
        bool view_says_bypassed = (bypass_button.active_state() != 0);
-       
+
        if (view_says_bypassed != insert->active()) {
                if (view_says_bypassed) {
                        insert->activate ();
@@ -712,7 +712,7 @@ PlugUIBase::toggle_description()
                description_expander.add(*label);
                description_expander.show_all();
        }
-       
+
        if (!description_expander.get_expanded()) {
                description_expander.remove();
        }
@@ -813,12 +813,6 @@ PlugUIBase::update_preset_modified ()
        }
 }
 
-void
-PlugUIBase::parameter_changed (uint32_t, float)
-{
-       update_preset_modified ();
-}
-
 void
 PlugUIBase::preset_added_or_removed ()
 {