summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-18 17:42:59 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-18 17:42:59 +0000
commit0c31e4c4f3d0bfe37d26a793c934f1b436f8fa0f (patch)
tree4699d75314f5a1952404408de6bb18edc5984b6f /gtk2_ardour/route_ui.cc
parent177b2a2a17ad7ceb75b2149429363dad74a11530 (diff)
more object lifetime management fixes, plus a couple of tiny cleanups
git-svn-id: svn://localhost/ardour2/trunk@992 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 824bdb7b6d..482f5df22f 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -26,6 +26,8 @@
#include <ardour/route_group.h>
#include <pbd/memento_command.h>
+#include <pbd/stacktrace.h>
+#include <pbd/shiva.h>
#include "route_ui.h"
#include "keyboard.h"
@@ -44,7 +46,6 @@ using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace PBD;
-
RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, const char* m_name,
const char* s_name, const char* r_name)
: AxisView(sess),
@@ -65,7 +66,8 @@ RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, co
set_color (unique_random_color());
}
- _route->GoingAway.connect (mem_fun (*this, &RouteUI::route_removed));
+ new Shiva<Route,RouteUI> (*_route, *this);
+
_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));
mute_button = manage (new BindableToggleButton (_route->mute_control(), m_name ));
@@ -95,6 +97,7 @@ RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, co
RouteUI::~RouteUI()
{
+ GoingAway (); /* EMIT SIGNAL */
delete mute_menu;
}
@@ -730,13 +733,6 @@ RouteUI::idle_remove_this_route (RouteUI *rui)
}
void
-RouteUI::route_removed ()
-{
- ENSURE_GUI_THREAD(mem_fun (*this, &RouteUI::route_removed));
- delete this;
-}
-
-void
RouteUI::route_rename ()
{
ArdourPrompter name_prompter (true);