13
0

Sort stem and port export dialogs by route order key.

Also use separate column for checkbox and track name to improve layout.
This commit is contained in:
nick_m 2015-04-04 23:20:15 +11:00
parent dc1fa4a975
commit 2c28a053b4
2 changed files with 13 additions and 5 deletions

View File

@ -551,18 +551,25 @@ TrackExportChannelSelector::TrackExportChannelSelector (ARDOUR::Session * sessio
// Track list
track_list = Gtk::ListStore::create (track_cols);
track_list->set_sort_column_id (3, Gtk::SORT_ASCENDING);
track_view.set_model (track_list);
track_view.set_headers_visible (true);
track_view.append_column_editable (_("Track"), track_cols.selected);
track_view.append_column_editable (_("Export"), track_cols.selected);
Gtk::CellRendererToggle *toggle = dynamic_cast<Gtk::CellRendererToggle *>(track_view.get_column_cell_renderer (0));
toggle->set_alignment (0.0, 0.5);
toggle->signal_toggled().connect (sigc::hide (sigc::mem_fun (*this, &TrackExportChannelSelector::update_config)));
Gtk::CellRendererText* text_renderer = Gtk::manage (new Gtk::CellRendererText);
text_renderer->property_editable() = false;
text_renderer->set_alignment (0.0, 0.5);
Gtk::TreeView::Column* column = track_view.get_column (0);
column->pack_start (*text_renderer);
Gtk::TreeView::Column* column = Gtk::manage (new Gtk::TreeView::Column);
column->set_title (_("Track name"));
track_view.append_column (*column);
column->pack_start (*text_renderer, false);
column->add_attribute (text_renderer->property_text(), track_cols.label);
fill_list();
@ -609,6 +616,7 @@ TrackExportChannelSelector::add_track (boost::shared_ptr<Route> route)
row[track_cols.selected] = true;
row[track_cols.label] = route->name();
row[track_cols.route] = route;
row[track_cols.order_key] = route->order_key();
}
void

View File

@ -241,7 +241,6 @@ class TrackExportChannelSelector : public ExportChannelSelector
void fill_list();
void add_track (boost::shared_ptr<ARDOUR::Route> route);
void update_config();
ChannelConfigList configs;
Gtk::VBox main_layout;
@ -252,8 +251,9 @@ class TrackExportChannelSelector : public ExportChannelSelector
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
Gtk::TreeModelColumn<std::string> label;
Gtk::TreeModelColumn<bool> selected;
Gtk::TreeModelColumn<uint32_t> order_key;
TrackCols () { add (route); add(label); add(selected); }
TrackCols () { add (route); add(label); add(selected); add(order_key); }
};
TrackCols track_cols;