menu item says Fader and Pan, so the automation track should say the same for consistency
[ardour.git] / gtk2_ardour / io_selector.cc
index 363f2aaaf5f948ac0399725d77eb431dc17359ed..0f877206f7025eb62725ba3c8cb747b9aec9cb83 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include <map>
@@ -215,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));
 }
 
@@ -417,7 +418,7 @@ IOSelector::display_ports ()
                        
                        really_short_name = port->short_name();
                        really_short_name = really_short_name.substr (really_short_name.find ('/') + 1);
-                       
+
                        tview = manage (new TreeView());
                        RefPtr<ListStore> port_model = ListStore::create (port_display_columns);
                        
@@ -428,16 +429,15 @@ IOSelector::display_ports ()
                        tview->set_model (port_model);
                        tview->append_column (really_short_name, port_display_columns.displayed_name);
                        tview->get_selection()->set_mode (SELECTION_SINGLE);
-                       tview->set_data ("port", port);
+                       tview->set_data (X_("port"), port);
                        tview->set_headers_visible (true);
-                       tview->set_name ("IOSelectorPortList");
+                       tview->set_name (X_("IOSelectorPortList"));
                        
                        port_box.pack_start (*tview);
                        port_displays.insert (port_displays.end(), tview);
                        
                        /* now fill the clist with the current connections */
                        
-                       
                        const char **connections = port->get_connections ();
                        
                        if (connections) {
@@ -446,7 +446,7 @@ IOSelector::display_ports ()
                                        row[port_display_columns.displayed_name] = connections[c];
                                        row[port_display_columns.full_name] = connections[c];
                                }
-                       }
+                       } 
                        
                        if (for_input) {
                                
@@ -547,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 ();
                }
 
@@ -558,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 ();
                }
        }
@@ -614,7 +614,7 @@ IOSelector::connection_button_release (GdkEventButton *ev, TreeView *treeview)
 
                /* path is valid */
                ustring connected_port_name = (*iter)[port_display_columns.full_name];
-               Port *port = reinterpret_cast<Port *> (treeview->get_data (_("port")));
+               Port *port = reinterpret_cast<Port *> (treeview->get_data (X_("port")));
                
                if (for_input) {
                        Port *p = session.engine().get_port_by_name (connected_port_name);
@@ -663,7 +663,7 @@ IOSelector::select_treeview (TreeView* tview)
        */
 
        Glib::Mutex::Lock lm  (port_display_lock);
-       Port* port = reinterpret_cast<Port *> (tview->get_data (_("port")));
+       Port* port = reinterpret_cast<Port *> (tview->get_data (X_("port")));
 
        selected_port = port;
 
@@ -780,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);
 }