X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=inline;f=gtk2_ardour%2Fconnection_editor.h;h=aca85c7a83482d32e048832a553a67752cec6821;hb=ee9f39ed3c764aa4a99dfd1634856468bbe944b2;hp=f331d05719e61e732792644a6ccace7e93d38ebe;hpb=25ac88fcae679cb8c1355fee1b4932122dc5fe36;p=ardour.git diff --git a/gtk2_ardour/connection_editor.h b/gtk2_ardour/connection_editor.h index f331d05719..aca85c7a83 100644 --- a/gtk2_ardour/connection_editor.h +++ b/gtk2_ardour/connection_editor.h @@ -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__ @@ -34,11 +33,12 @@ using __gnu_cxx::slist; #include #include #include -#include +#include +#include #include "ardour_dialog.h" -#include +#include namespace ARDOUR { class Session; @@ -53,15 +53,30 @@ class ConnectionEditor : public ArdourDialog { void set_session (ARDOUR::Session *); protected: - gint on_map (GdkEventAny *); + void on_map (); private: ARDOUR::Connection *current_connection; int selected_port; bool push_at_front; - Gtk::CList input_connection_display; - Gtk::CList output_connection_display; + + struct ConnectionDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { + ConnectionDisplayModelColumns() { + add (name); + add (connection); + } + Gtk::TreeModelColumn name; + Gtk::TreeModelColumn connection; + }; + + ConnectionDisplayModelColumns connection_columns; + + Glib::RefPtr input_connection_model; + Glib::RefPtr output_connection_model; + + Gtk::TreeView input_connection_display; + Gtk::TreeView output_connection_display; Gtk::ScrolledWindow input_scroller; Gtk::ScrolledWindow output_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 port_displays; Gtk::Button ok_button; @@ -128,15 +143,15 @@ class ConnectionEditor : public ArdourDialog { void cancel (); void accept (); - void port_selection_handler (gint row, gint col, GdkEvent *ev, Gtk::CList *); + void selection_changed (Gtk::TreeView* display); void add_port (); void remove_port (int which_port); - void port_column_click (gint col, Gtk::CList *clist); - gint port_button_event (GdkEventButton *, Gtk::CList *clist); - gint connection_click (GdkEventButton *ev, Gtk::CList *clist); - void connection_selected (gint, gint, GdkEvent *, bool); + void port_column_click (gint col, Gtk::TreeView* ); + gint port_button_event (GdkEventButton *, Gtk::TreeView*); + gint connection_click (GdkEventButton *ev, Gtk::TreeView*); + void connection_selection_changed (Gtk::TreeView&, Glib::RefPtr&); sigc::connection config_connection; sigc::connection connect_connection;