+void
+AudioMappingView::set_channels (int c)
+{
+ c++;
+
+ if (c < _grid->GetNumberCols ()) {
+ _grid->DeleteCols (c, _grid->GetNumberCols() - c);
+ } else if (c > _grid->GetNumberCols ()) {
+ _grid->InsertCols (_grid->GetNumberCols(), c - _grid->GetNumberCols());
+ set_column_labels ();
+ }
+
+ set (_map);
+}
+
+void
+AudioMappingView::set_column_labels ()
+{
+ int const c = _grid->GetNumberCols ();
+
+ _grid->SetColLabelValue (0, _("Content channel"));
+
+ if (c > 0) {
+ _grid->SetColLabelValue (1, _("L"));
+ }
+
+ if (c > 1) {
+ _grid->SetColLabelValue (2, _("R"));
+ }
+
+ if (c > 2) {
+ _grid->SetColLabelValue (3, _("C"));
+ }
+
+ if (c > 3) {
+ _grid->SetColLabelValue (4, _("Lfe"));
+ }
+
+ if (c > 4) {
+ _grid->SetColLabelValue (5, _("Ls"));
+ }
+
+ if (c > 5) {
+ _grid->SetColLabelValue (6, _("Rs"));
+ }
+
+ _grid->AutoSize ();
+}