Enable build for FreeBSD (part 1/2)
[ardour.git] / libs / pbd / base_ui.cc
index 09dfa74785c303c1723c3203303c2e2d80bf68f1..d303d880c97c9853b2d77f138a8d0ecaaca44afd 100644 (file)
@@ -47,10 +47,10 @@ uint64_t BaseUI::rt_bit = 1;
 BaseUI::RequestType BaseUI::CallSlot = BaseUI::new_request_type();
 BaseUI::RequestType BaseUI::Quit = BaseUI::new_request_type();
 
-BaseUI::BaseUI (const string& str)
-       : m_context(MainContext::get_default())
+BaseUI::BaseUI (const string& loop_name)
+       : EventLoop (loop_name)
+       , m_context(MainContext::get_default())
        , run_loop_thread (0)
-       , _name (str)
        , request_channel (true)
 {
        base_ui_instance = this;
@@ -79,7 +79,7 @@ BaseUI::new_request_type ()
 void
 BaseUI::main_thread ()
 {
-       DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: event loop running in thread %2\n", name(), pthread_name()));
+       DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: event loop running in thread %2\n", event_loop_name(), pthread_name()));
        set_event_loop_for_thread (this);
        thread_init ();
        _main_loop->get_context()->signal_idle().connect (sigc::mem_fun (*this, &BaseUI::signal_running));
@@ -137,7 +137,7 @@ BaseUI::request_handler (Glib::IOCondition ioc)
 
                /* handle requests */
 
-               DEBUG_TRACE (DEBUG::EventLoop, "BaseUI::request_handler\n");
+               DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: request handler\n", event_loop_name()));
                handle_ui_requests ();
        }
 
@@ -147,7 +147,7 @@ BaseUI::request_handler (Glib::IOCondition ioc)
 void
 BaseUI::signal_new_request ()
 {
-       DEBUG_TRACE (DEBUG::EventLoop, "BaseUI::signal_new_request\n");
+       DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: signal_new_request\n", event_loop_name()));
        request_channel.wakeup ();
 }
 
@@ -157,6 +157,6 @@ BaseUI::signal_new_request ()
 void
 BaseUI::attach_request_source ()
 {
-       DEBUG_TRACE (DEBUG::EventLoop, "BaseUI::attach_request_source\n");
+       DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: attach request source\n", event_loop_name()));
        request_channel.attach (m_context);
 }