- midi_port_table_widgets.clear ();
-
- midi_port_table.resize (ports.size() + 4, 11);
-
- 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 (_("MMC"))));
- label->show ();
- midi_port_table_widgets.push_back (label);
- midi_port_table.attach (*label, 6, 7, 0, 1);
- label = (manage (new Label (_("MIDI Parameter\nControl"))));
- label->show ();
- midi_port_table_widgets.push_back (label);
- midi_port_table.attach (*label, 8, 9, 0, 1);
-
- Gtk::HSeparator* hsep = (manage (new HSeparator()));
- hsep->show ();
- midi_port_table_widgets.push_back (hsep);
- midi_port_table.attach (*hsep, 0, 9, 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);
-
- for (n = 0, i = ports.begin(); i != ports.end(); ++n, ++i) {
-
- ToggleButton* tb;
- RadioButton* rb;
- Button* bb;
-
- /* the remove button. create early so we can pass it to various callbacks */
-
- bb = manage (new Button (Stock::REMOVE));
- bb->set_name ("OptionEditorToggleButton");
- bb->show ();
- midi_port_table_widgets.push_back (bb);
- midi_port_table.attach (*bb, 9, 10, n+2, n+3, FILL|EXPAND, FILL);
- bb->signal_clicked().connect (bind (mem_fun(*this, &OptionEditor::remove_midi_port), i->second));
- bb->set_sensitive (port_removable (i->second));
-
- label = (manage (new Label (i->first)));
- label->show ();
- midi_port_table_widgets.push_back (label);
- midi_port_table.attach (*label, 0, 1, n+2, n+3,FILL|EXPAND, FILL );
-
- tb = manage (new ToggleButton (_("online")));
- tb->set_name ("OptionEditorToggleButton");
-
- /* remember, we have to handle the i18n case where the relative
- lengths of the strings in language N is different than in english.
- */
-
- if (strlen (_("offline")) > strlen (_("online"))) {
- set_size_request_to_display_given_text (*tb, _("offline"), 15, 12);
- } else {
- set_size_request_to_display_given_text (*tb, _("online"), 15, 12);
- }