meta-fy handling of button2, to deal with apple's messed up design decisions; on...
[ardour.git] / gtk2_ardour / io_selector.cc
index 7ff12612e60c30dee554a382f311fa766ef8c6e8..0f877206f7025eb62725ba3c8cb747b9aec9cb83 100644 (file)
@@ -214,6 +214,8 @@ IOSelector::IOSelector (Session& sess, boost::shared_ptr<IO> ior, bool input)
                io->output_changed.connect (mem_fun(*this, &IOSelector::ports_changed));
        }
 
+       set_button_sensitivity ();
+
        io->name_changed.connect (mem_fun(*this, &IOSelector::name_changed));
 }
 
@@ -545,7 +547,7 @@ IOSelector::add_port ()
                }
 
                catch (AudioEngine::PortRegistrationFailure& err) {
-                       MessageDialog msg (0,  _("There are no more JACK ports available."));
+                       MessageDialog msg (_("There are no more JACK ports available."));
                        msg.run ();
                }
 
@@ -556,7 +558,7 @@ IOSelector::add_port ()
                }
 
                catch (AudioEngine::PortRegistrationFailure& err) {
-                       MessageDialog msg (0, _("There are no more JACK ports available."));
+                       MessageDialog msg (_("There are no more JACK ports available."));
                        msg.run ();
                }
        }
@@ -778,14 +780,15 @@ PortInsertWindow::PortInsertWindow (Session& sess, boost::shared_ptr<PortInsert>
        rescan_button.signal_clicked().connect (mem_fun(*this, &PortInsertWindow::rescan));
 
        signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this))); 
-       pi->GoingAway.connect (mem_fun(*this, &PortInsertWindow::plugin_going_away));
+
+       going_away_connection = pi->GoingAway.connect (mem_fun(*this, &PortInsertWindow::plugin_going_away));
 }
 
 void
 PortInsertWindow::plugin_going_away ()
 {
        ENSURE_GUI_THREAD(mem_fun(*this, &PortInsertWindow::plugin_going_away));
-       
+       going_away_connection.disconnect ();
        delete_when_idle (this);
 }