- table->attach (*(manage (new Label (X_("Port")))), 0, 1, 0, 1);
- table->attach (*(manage (new Label (X_("Offline")))), 1, 2, 0, 1);
- table->attach (*(manage (new Label (X_("Trace\nInput")))), 2, 3, 0, 1);
- table->attach (*(manage (new Label (X_("Trace\nOutput")))), 3, 4, 0, 1);
- table->attach (*(manage (new Label (X_("MTC")))), 4, 5, 0, 1);
- table->attach (*(manage (new Label (X_("MMC")))), 6, 7, 0, 1);
- table->attach (*(manage (new Label (X_("MIDI Parameter\nControl")))), 8, 9, 0, 1);
+ for (vector<Widget*>::iterator w = midi_port_table_widgets.begin(); w != midi_port_table_widgets.end(); ++w) {
+ midi_port_table.remove (**w);
+ }
+
+ midi_port_table_widgets.clear ();
+
+ midi_port_table.resize (ports.size() + 4, 12);
+
+ Gtk::Label* label;
+
+ label = (manage (new Label (_("Port"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 0, 1, 0, 1);
+ label = (manage (new Label (_("Offline"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 1, 2, 0, 1);
+ label = (manage (new Label (_("Trace\ninput"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 2, 3, 0, 1);
+ label = (manage (new Label (_("Trace\noutput"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 3, 4, 0, 1);
+ label = (manage (new Label (_("MTC"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 4, 5, 0, 1);
+ label = (manage (new Label (_("MIDI\nclock"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 6, 7, 0, 1);
+ label = (manage (new Label (_("MMC"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 8, 9, 0, 1);
+ label = (manage (new Label (_("MIDI parameter\ncontrol"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 10, 11, 0, 1);
+
+ Gtk::HSeparator* hsep = (manage (new HSeparator()));
+ hsep->show ();
+ midi_port_table_widgets.push_back (hsep);
+ midi_port_table.attach (*hsep, 0, 11, 1, 2);
+ Gtk::VSeparator* vsep = (manage (new VSeparator()));
+ vsep->show ();
+ midi_port_table_widgets.push_back (vsep);
+ midi_port_table.attach (*vsep, 5, 6, 0, 8);
+ vsep = (manage (new VSeparator()));
+ vsep->show ();
+ midi_port_table_widgets.push_back (vsep);
+ midi_port_table.attach (*vsep, 7, 8, 0, 8);
+ vsep = (manage (new VSeparator()));
+ vsep->show ();
+ midi_port_table_widgets.push_back (vsep);
+ midi_port_table.attach (*vsep, 9, 10, 0, 8);