summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_route_groups.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-12-01 15:32:42 +0000
committerCarl Hetherington <carl@carlh.net>2009-12-01 15:32:42 +0000
commit759267af15ba002231cb04b0a2d1c53ce9e48295 (patch)
treee587b186891b901167ee47acf8a725215588d2ce /gtk2_ardour/editor_route_groups.cc
parent35d86425ba08f08cf63c00925e8b64a84914c062 (diff)
Various tweaks to group tabs, the main upshot of which is that you can start
a drag in an empty part of the group tab display and drag out a new route group. git-svn-id: svn://localhost/ardour2/branches/3.0@6249 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_route_groups.cc')
-rw-r--r--gtk2_ardour/editor_route_groups.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc
index 2a07ca89c1..1a2fb35f9e 100644
--- a/gtk2_ardour/editor_route_groups.cc
+++ b/gtk2_ardour/editor_route_groups.cc
@@ -154,7 +154,7 @@ EditorRouteGroups::EditorRouteGroups (Editor* e)
w->show();
remove_button->add (*w);
- add_button->signal_clicked().connect (mem_fun (*this, &EditorRouteGroups::new_route_group));
+ add_button->signal_clicked().connect (hide_return (mem_fun (*this, &EditorRouteGroups::new_route_group)));
remove_button->signal_clicked().connect (mem_fun (*this, &EditorRouteGroups::remove_selected));
button_box->pack_start (*add_button);
@@ -182,7 +182,7 @@ EditorRouteGroups::menu (RouteGroup* g)
_menu->set_name ("ArdourContextMenu");
MenuList& items = _menu->items();
- items.push_back (MenuElem (_("New..."), mem_fun(*this, &EditorRouteGroups::new_route_group)));
+ items.push_back (MenuElem (_("New..."), hide_return (mem_fun(*this, &EditorRouteGroups::new_route_group))));
items.push_back (MenuElem (_("New From"), *new_from));
if (g) {
items.push_back (MenuElem (_("Edit..."), bind (mem_fun (*this, &EditorRouteGroups::edit), g)));
@@ -231,8 +231,8 @@ EditorRouteGroups::set_activation (RouteGroup* g, bool a)
g->set_active (a, this);
}
-void
-EditorRouteGroups::new_route_group ()
+ARDOUR::RouteGroup *
+EditorRouteGroups::new_route_group () const
{
RouteGroup* g = new RouteGroup (
*_session,
@@ -244,13 +244,14 @@ EditorRouteGroups::new_route_group ()
RouteGroupDialog d (g, Gtk::Stock::NEW);
int const r = d.do_run ();
- if (r == Gtk::RESPONSE_OK) {
- _session->add_route_group (g);
- } else {
+ if (r != Gtk::RESPONSE_OK) {
delete g;
+ return 0;
}
+
+ _session->add_route_group (g);
+ return g;
}
-
void
EditorRouteGroups::run_new_group_dialog (const RouteList& rl)
{