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;
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));
/* 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 ();
}
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 ();
}
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);
}