provide ArdourStartup with a Gtk::Dialog-like signal_response()

It is not a Dialog (instead, an Assistant which IS-A Window), but
we want to be able to interact with it as if it is.

Also remove unused singleton and session info cruft
This commit is contained in:
Paul Davis 2019-10-08 11:39:16 -06:00
parent 7a66b22428
commit a5c6c9a352
2 changed files with 11 additions and 18 deletions

View File

@ -69,11 +69,8 @@ using namespace PBD;
using namespace ARDOUR;
using namespace ARDOUR_UI_UTILS;
ArdourStartup* ArdourStartup::the_startup = 0;
ArdourStartup::ArdourStartup ()
: _response (RESPONSE_OK)
, config_modified (false)
: config_modified (false)
, default_dir_chooser (0)
, monitor_via_hardware_button (string_compose (_("Use an external mixer or the hardware mixer of your audio interface.\n"
"%1 will play NO role in monitoring"), PROGRAM_NAME))
@ -115,8 +112,6 @@ ArdourStartup::ArdourStartup ()
setup_monitoring_choice_page ();
setup_monitor_section_choice_page ();
setup_final_page ();
the_startup = this;
}
ArdourStartup::~ArdourStartup ()
@ -452,15 +447,13 @@ ArdourStartup::discover_plugins () {
void
ArdourStartup::on_cancel ()
{
_response = RESPONSE_CANCEL;
gtk_main_quit ();
_signal_response (int (RESPONSE_CANCEL));
}
bool
ArdourStartup::on_delete_event (GdkEventAny*)
{
_response = RESPONSE_CLOSE;
gtk_main_quit ();
_signal_response (int (RESPONSE_CLOSE));
return true;
}
@ -501,8 +494,7 @@ ArdourStartup::on_apply ()
}
_response = RESPONSE_OK;
gtk_main_quit ();
_signal_response (int (RESPONSE_OK));
}

View File

@ -44,12 +44,13 @@ public:
static bool required ();
gint response () const {
return _response;
}
/* It's not a dialog so we have to fake this to make it behave like a
* dialog. This allows the StartupFSM to treat everything similarly.
*/
sigc::signal1<void,int>& signal_response() { return _signal_response; }
private:
gint _response;
bool config_modified;
bool new_user;
@ -58,8 +59,6 @@ private:
bool on_delete_event (GdkEventAny*);
void discover_plugins ();
static ArdourStartup *the_startup;
Glib::RefPtr<Gdk::Pixbuf> icon_pixbuf;
void setup_prerelease_page ();
@ -115,6 +114,8 @@ private:
gint final_page_index;
void move_along_now ();
sigc::signal1<void,int> _signal_response;
};
#endif /* __gtk2_ardour_startup_h__ */