2009-06-20 11:40:26 -04:00
|
|
|
#include <gtkmm/stock.h>
|
|
|
|
#include "ardour/route_group.h"
|
|
|
|
#include "route_group_dialog.h"
|
|
|
|
#include "i18n.h"
|
|
|
|
|
|
|
|
using namespace Gtk;
|
|
|
|
using namespace ARDOUR;
|
|
|
|
|
2009-06-21 15:59:56 -04:00
|
|
|
RouteGroupDialog::RouteGroupDialog (RouteGroup* g, StockID const & s)
|
2009-06-20 11:40:26 -04:00
|
|
|
: Dialog (_("Route group")),
|
|
|
|
_group (g),
|
2009-06-21 15:59:56 -04:00
|
|
|
_active (_("Active")),
|
|
|
|
_gain (_("Gain")),
|
|
|
|
_mute (_("Muting")),
|
|
|
|
_solo (_("Soloing")),
|
|
|
|
_rec_enable (_("Record enable")),
|
|
|
|
_select (_("Selection")),
|
|
|
|
_edit (_("Editing"))
|
2009-06-20 11:40:26 -04:00
|
|
|
{
|
|
|
|
_name.set_text (_group->name ());
|
|
|
|
_active.set_active (_group->is_active ());
|
2009-06-21 15:59:56 -04:00
|
|
|
|
|
|
|
_gain.set_active (_group->property (RouteGroup::Gain));
|
|
|
|
_mute.set_active (_group->property (RouteGroup::Mute));
|
|
|
|
_solo.set_active (_group->property (RouteGroup::Solo));
|
|
|
|
_rec_enable.set_active (_group->property (RouteGroup::RecEnable));
|
|
|
|
_select.set_active (_group->property (RouteGroup::Select));
|
|
|
|
_edit.set_active (_group->property (RouteGroup::Edit));
|
2009-06-20 11:40:26 -04:00
|
|
|
|
|
|
|
HBox* h = manage (new HBox);
|
|
|
|
h->pack_start (*manage (new Label (_("Name:"))));
|
|
|
|
h->pack_start (_name);
|
|
|
|
|
|
|
|
get_vbox()->pack_start (*h);
|
|
|
|
get_vbox()->pack_start (_active);
|
2009-06-21 15:59:56 -04:00
|
|
|
get_vbox()->pack_start (_gain);
|
|
|
|
get_vbox()->pack_start (_mute);
|
|
|
|
get_vbox()->pack_start (_solo);
|
|
|
|
get_vbox()->pack_start (_rec_enable);
|
|
|
|
get_vbox()->pack_start (_select);
|
|
|
|
get_vbox()->pack_start (_edit);
|
|
|
|
|
|
|
|
get_vbox()->set_border_width (8);
|
2009-06-20 11:40:26 -04:00
|
|
|
|
|
|
|
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
2009-06-21 15:59:56 -04:00
|
|
|
add_button (s, RESPONSE_OK);
|
2009-06-20 11:40:26 -04:00
|
|
|
|
|
|
|
show_all ();
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
RouteGroupDialog::do_run ()
|
|
|
|
{
|
|
|
|
int const r = run ();
|
|
|
|
|
|
|
|
if (r == Gtk::RESPONSE_OK) {
|
|
|
|
_group->set_name (_name.get_text ());
|
|
|
|
_group->set_active (_active.get_active (), this);
|
2009-06-21 15:59:56 -04:00
|
|
|
|
|
|
|
_group->set_property (RouteGroup::Gain, _gain.get_active ());
|
|
|
|
_group->set_property (RouteGroup::Mute, _mute.get_active ());
|
|
|
|
_group->set_property (RouteGroup::Solo, _solo.get_active ());
|
|
|
|
_group->set_property (RouteGroup::RecEnable, _rec_enable.get_active ());
|
|
|
|
_group->set_property (RouteGroup::Select, _select.get_active ());
|
|
|
|
_group->set_property (RouteGroup::Edit, _edit.get_active ());
|
2009-06-20 11:40:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|