Remove unused variable and the accessor methods for it from ARDOUR_UI
[ardour.git] / gtk2_ardour / connection_editor.h
index c92809959131c215a03d760a8b017bdc8594abc5..aca85c7a83482d32e048832a553a67752cec6821 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$
 */
 
 #ifndef __ardour_gtk_connection_editor_h__
@@ -35,10 +34,11 @@ using __gnu_cxx::slist;
 #include <gtkmm/frame.h>
 #include <gtkmm/notebook.h>
 #include <gtkmm/treeview.h>
+#include <gtkmm/liststore.h>
 
 #include "ardour_dialog.h"
 
-#include <pbd/lockmonitor.h>
+#include <glibmm/thread.h>
 
 namespace ARDOUR {
        class Session;
@@ -53,13 +53,28 @@ class ConnectionEditor : public ArdourDialog {
        void set_session (ARDOUR::Session *);
 
   protected:
-       bool on_map (GdkEventAny *);
+       void on_map ();
 
   private:
        ARDOUR::Connection *current_connection;
        int                 selected_port;
        bool                push_at_front;
 
+
+       struct ConnectionDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
+           ConnectionDisplayModelColumns() { 
+                   add (name);
+                   add (connection);
+           }
+           Gtk::TreeModelColumn<Glib::ustring> name;
+           Gtk::TreeModelColumn<ARDOUR::Connection*> connection;
+       };
+
+       ConnectionDisplayModelColumns connection_columns;
+
+       Glib::RefPtr<Gtk::ListStore> input_connection_model;
+       Glib::RefPtr<Gtk::ListStore> output_connection_model;
+
        Gtk::TreeView input_connection_display;
        Gtk::TreeView output_connection_display;
        Gtk::ScrolledWindow input_scroller;
@@ -100,7 +115,7 @@ class ConnectionEditor : public ArdourDialog {
        Gtk::Button clear_button;
        Gtk::Button add_port_button;
 
-       PBD::Lock port_display_lock;
+       Glib::Mutex port_display_lock;
        slist<Gtk::ScrolledWindow *> port_displays;
 
        Gtk::Button ok_button;
@@ -128,7 +143,7 @@ class ConnectionEditor : public ArdourDialog {
        void cancel ();
        void accept ();
 
-       void port_selection_handler (gint row, gint col, GdkEvent*, Gtk::TreeView*);
+       void selection_changed (Gtk::TreeView* display);
 
        void add_port ();
        void remove_port (int which_port);
@@ -136,7 +151,7 @@ class ConnectionEditor : public ArdourDialog {
        void port_column_click (gint col, Gtk::TreeView* );
        gint port_button_event (GdkEventButton *, Gtk::TreeView*);
        gint connection_click (GdkEventButton *ev, Gtk::TreeView*);
-       void connection_selected (gint, gint, GdkEvent *, bool);
+       void connection_selection_changed (Gtk::TreeView&, Glib::RefPtr<Gtk::ListStore>&);
 
        sigc::connection config_connection;
        sigc::connection connect_connection;