diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-20 15:40:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-20 15:40:26 +0000 |
commit | f0bf3a0c190ced488d1520435df8234ef50971d6 (patch) | |
tree | 5e437385cf03c2abf53d57742c9351b99d5dedbf /gtk2_ardour/route_group_dialog.cc | |
parent | 6b20256ad47de1b4c02553f62c31e7e5c8b0cac8 (diff) |
Allow edit group creation from the route UI's menu. Allow new tracks to be put in particular edit groups.
git-svn-id: svn://localhost/ardour2/branches/3.0@5226 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_group_dialog.cc')
-rw-r--r-- | gtk2_ardour/route_group_dialog.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gtk2_ardour/route_group_dialog.cc b/gtk2_ardour/route_group_dialog.cc new file mode 100644 index 0000000000..0e1b549f97 --- /dev/null +++ b/gtk2_ardour/route_group_dialog.cc @@ -0,0 +1,42 @@ +#include <gtkmm/stock.h> +#include "ardour/route_group.h" +#include "route_group_dialog.h" +#include "i18n.h" + +using namespace Gtk; +using namespace ARDOUR; + +RouteGroupDialog::RouteGroupDialog (RouteGroup* g) + : Dialog (_("Route group")), + _group (g), + _active (_("Active")) +{ + _name.set_text (_group->name ()); + _active.set_active (_group->is_active ()); + + 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); + + add_button (Stock::CANCEL, RESPONSE_CANCEL); + /* XXX: change this depending on context */ + add_button (Stock::OK, RESPONSE_OK); + + 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); + } + + return r; +} |