#include "gtkmm2ext/actions.h"
#include "gtkmm2ext/activatable.h"
#include "gtkmm2ext/actions.h"
+#include "gtkmm2ext/gui_thread.h"
#include "i18n.h"
#include "pbd/abstract_ui.cc" /* instantiate the template */
+template class AbstractUI<Gtkmm2ext::UIRequest>;
+
UI::UI (string namestr, int *argc, char ***argv)
: AbstractUI<UIRequest> (namestr)
, _receiver (*this)
+ , errors (0)
{
theMain = new Main (argc, argv);
UI::~UI ()
{
+ _receiver.hangup ();
+ delete (errors);
}
-
bool
UI::caller_is_ui_thread ()
{
Glib::signal_idle().connect (bind_return (mem_fun (old_receiver, &Receiver::hangup), false));
- starting ();
+ if (starting ()) {
+ return;
+ }
+
_active = true;
theMain->run ();
_active = false;
- stopping ();
- _receiver.hangup ();
+
return;
}
}
bool
-UI::just_hide_it (GdkEventAny */*ev*/, Window *win)
+UI::just_hide_it (GdkEventAny* /*ev*/, Window *win)
{
win->hide ();
return true;
}
bool
-UI::color_selection_deleted (GdkEventAny */*ev*/)
+UI::color_selection_deleted (GdkEventAny* /*ev*/)
{
Main::quit ();
return true;