summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/gtk_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-05-14 17:07:53 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-05-14 17:07:53 +0000
commit37969d837e16c8fbac0821074495b5ebc2297d94 (patch)
treeb79e840e364c8502aabbf785c28364c596a4632f /libs/gtkmm2ext/gtk_ui.cc
parent69a242ba6496aa8d4e565a82675ca549a11e4080 (diff)
remove virtual inheritance of sigc::trackable by Receiver and AbstractUI<T>, done by changing Gtkmm2ext::UI to use composition (HAS-A) rather than inheritance (IS-A) for Receiver; use correct synchronization when starting up a BseUI event loop thread so that tests that start/stop quickly do not encounter a race condition
git-svn-id: svn://localhost/ardour2/branches/3.0@12264 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtk_ui.cc')
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 3ec752af02..11b06b78ff 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -64,6 +64,8 @@ BaseUI::RequestType Gtkmm2ext::AddTimeout = BaseUI::new_request_type();
UI::UI (string namestr, int *argc, char ***argv)
: AbstractUI<UIRequest> (namestr)
+ , _receiver (*this)
+
{
theMain = new Main (argc, argv);
@@ -252,10 +254,10 @@ UI::load_rcfile (string path, bool themechange)
void
UI::run (Receiver &old_receiver)
{
- listen_to (error);
- listen_to (info);
- listen_to (warning);
- listen_to (fatal);
+ _receiver.listen_to (error);
+ _receiver.listen_to (info);
+ _receiver.listen_to (warning);
+ _receiver.listen_to (fatal);
/* stop the old receiver (text/console) once we hit the first idle */
@@ -266,7 +268,7 @@ UI::run (Receiver &old_receiver)
theMain->run ();
_active = false;
stopping ();
- hangup ();
+ _receiver.hangup ();
return;
}