- port_displays.insert (port_displays.end(), clist);
- port_box.pack_start (*clist);
-
- clist->set_data (_("port"), port);
-
- /* XXX THIS IS A DIGUSTING AND DIRTY HACK, FORCED UPON US BECAUSE
- GtkCList DOESN'T PROVIDE ANY WAY TO CONNECT TO BUTTON_PRESS_EVENTS
- FOR THE COLUMN TITLE BUTTON.
- */
-
- clist->column(0).get_widget(); // force the column title button to be created
- GtkButton *b = GTK_BUTTON(clist->gobj()->column[0].button); // no API to access this
- Gtk::Button *B = wrap (b); // make C++ signal handling easier.
-
- clist->column_titles_show ();
- clist->column_titles_active ();
-
+ 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 (X_("port"), port);
+ tview->set_headers_visible (true);
+ 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) {
+ for (uint32_t c = 0; connections[c]; ++c) {
+ TreeModel::Row row = *(port_model->append());
+ row[port_display_columns.displayed_name] = connections[c];
+ row[port_display_columns.full_name] = connections[c];
+ }
+ }
+