From f03e598340d5be7a81694c358790255be0c92d5e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 30 Jan 2024 23:57:55 +0100 Subject: [PATCH] Expose Surround Send Enable Sharing in UI --- gtk2_ardour/route_group_dialog.cc | 20 +++++++++++++------- gtk2_ardour/route_group_dialog.h | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/route_group_dialog.cc b/gtk2_ardour/route_group_dialog.cc index 7eb5bada51..2d3317f794 100644 --- a/gtk2_ardour/route_group_dialog.cc +++ b/gtk2_ardour/route_group_dialog.cc @@ -50,6 +50,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new) , _mute (_("Muting")) , _solo (_("Soloing")) , _rec_enable (_("Record enable")) + , _sursend_enable (_("Surround Send enable")) , _select (_("Selection")) , _route_active (_("Active state")) , _share_color (_("Color")) @@ -107,6 +108,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new) _mute.set_active (_group->is_mute()); _solo.set_active (_group->is_solo()); _rec_enable.set_active (_group->is_recenable()); + _sursend_enable.set_active (_group->is_sursend_enable()); _select.set_active (_group->is_select()); _route_active.set_active (_group->is_route_active()); _share_color.set_active (_group->is_color()); @@ -132,6 +134,7 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new) _mute.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update)); _solo.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update)); _rec_enable.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update)); + _sursend_enable.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update)); _select.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update)); _route_active.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update)); _share_color.signal_toggled().connect (sigc::mem_fun (*this, &RouteGroupDialog::update)); @@ -153,13 +156,15 @@ RouteGroupDialog::RouteGroupDialog (RouteGroup* g, bool creating_new) table->attach (*l, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0); table->attach (_relative, 2, 3, 2, 3, Gtk::FILL, Gtk::FILL, 0, 0); - table->attach (_mute, 1, 3, 3, 4, Gtk::FILL, Gtk::FILL, 0, 0); - table->attach (_solo, 1, 3, 4, 5, Gtk::FILL, Gtk::FILL, 0, 0); - table->attach (_rec_enable, 1, 3, 5, 6, Gtk::FILL, Gtk::FILL, 0, 0); - table->attach (_select, 1, 3, 6, 7, Gtk::FILL, Gtk::FILL, 0, 0); - table->attach (_route_active, 1, 3, 7, 8, Gtk::FILL, Gtk::FILL, 0, 0); - table->attach (_share_color, 1, 3, 8, 9, Gtk::FILL, Gtk::FILL, 0, 0); - table->attach (_share_monitoring, 1, 3, 9, 10, Gtk::FILL, Gtk::FILL, 0, 0); + int r = 3; + table->attach (_mute, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; + table->attach (_solo, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; + table->attach (_rec_enable, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; + table->attach (_sursend_enable, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; + table->attach (_select, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; + table->attach (_route_active, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; + table->attach (_share_color, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; + table->attach (_share_monitoring, 1, 3, r, r + 1, Gtk::FILL, Gtk::FILL, 0, 0); ++r; options_box->pack_start (*table, false, true); main_vbox->pack_start (*options_box, false, true); @@ -208,6 +213,7 @@ RouteGroupDialog::update () plist.add (Properties::group_gain, _gain.get_active()); plist.add (Properties::group_recenable, _rec_enable.get_active()); + plist.add (Properties::group_sursend_enable, _sursend_enable.get_active()); plist.add (Properties::group_mute, _mute.get_active()); plist.add (Properties::group_solo, _solo.get_active ()); plist.add (Properties::group_select, _select.get_active()); diff --git a/gtk2_ardour/route_group_dialog.h b/gtk2_ardour/route_group_dialog.h index b7015301de..a6c564f051 100644 --- a/gtk2_ardour/route_group_dialog.h +++ b/gtk2_ardour/route_group_dialog.h @@ -48,6 +48,7 @@ private: Gtk::CheckButton _mute; Gtk::CheckButton _solo; Gtk::CheckButton _rec_enable; + Gtk::CheckButton _sursend_enable; Gtk::CheckButton _select; Gtk::CheckButton _edit; Gtk::CheckButton _route_active;