13
0

Port export usability tweaks.

Port combo didn't register the displayed port until focus changed.
Add a separate column for track/bus name and let it take available space.
This commit is contained in:
nick_m 2015-04-05 21:43:49 +10:00
parent a8d9014215
commit 5b74a227c8

View File

@ -179,16 +179,21 @@ PortExportChannelSelector::ChannelTreeView::ChannelTreeView (uint32_t max_channe
/* Add column with toggle and text */ /* Add column with toggle and text */
append_column_editable (_("Bus or Track"), route_cols.selected); append_column_editable (_("Export"), route_cols.selected);
Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText); Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
text_renderer->property_editable() = false; text_renderer->property_editable() = false;
text_renderer->set_alignment (0.0, 0.5);
Gtk::TreeView::Column* column = get_column (0); Gtk::TreeView::Column* column = Gtk::manage (new Gtk::TreeView::Column);
column->set_title (_("Bus or Track"));
column->pack_start (*text_renderer); column->pack_start (*text_renderer);
column->set_expand (true);
column->add_attribute (text_renderer->property_text(), route_cols.name); column->add_attribute (text_renderer->property_text(), route_cols.name);
append_column (*column);
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(get_column_cell_renderer (0)); Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(get_column_cell_renderer (0));
toggle->set_alignment (0.0, 0.5);
toggle->signal_toggled().connect (sigc::mem_fun (*this, &PortExportChannelSelector::ChannelTreeView::update_toggle_selection)); toggle->signal_toggled().connect (sigc::mem_fun (*this, &PortExportChannelSelector::ChannelTreeView::update_toggle_selection));
static_columns = get_columns().size(); static_columns = get_columns().size();
@ -315,6 +320,7 @@ PortExportChannelSelector::ChannelTreeView::set_channel_count (uint32_t channels
Gtk::CellRendererCombo* combo_renderer = Gtk::manage (new Gtk::CellRendererCombo); Gtk::CellRendererCombo* combo_renderer = Gtk::manage (new Gtk::CellRendererCombo);
combo_renderer->property_text_column() = 2; combo_renderer->property_text_column() = 2;
combo_renderer->property_has_entry() = false;
column->pack_start (*combo_renderer); column->pack_start (*combo_renderer);
append_column (*column); append_column (*column);