diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-07 20:27:04 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-10-07 20:27:04 -0400 |
commit | 5265ceec51c73983d9883786611de4340f0baf03 (patch) | |
tree | 693e3e26d53cfc16ceb73349922d8ab41a078f88 /libs | |
parent | 7ac849689da88113d43980dd71b291d09639dc28 (diff) |
change tortured GtkUI startup process into something just a little more sane, and remove "stopping" code since that belongs in a destructor
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 10 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index 6e466f5c9f..d9e4c871a6 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -120,9 +120,9 @@ UI::UI (string namestr, int *argc, char ***argv) UI::~UI () { + _receiver.hangup (); } - bool UI::caller_is_ui_thread () { @@ -265,12 +265,14 @@ UI::run (Receiver &old_receiver) 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; } diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index 64176232f0..232e7682ed 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -152,8 +152,7 @@ class UI : public AbstractUI<UIRequest> stopping just after we return from it (at the top level) */ - sigc::signal<void> starting; - sigc::signal<void> stopping; + virtual int starting() = 0; sigc::signal<void> theme_changed; |