+
+ /* possibly get out of here immediately if everything is ready to go.
+ We still need to set up the whole dialog because of the way
+ ARDOUR_UI::get_session_parameters() might skip it on a first
+ pass then require it for a second pass (e.g. when there
+ is an error with session loading and we have to ask the user
+ what to do next).
+ */
+
+ if (!session_name.empty() && !require_new) {
+ response (RESPONSE_OK);
+ return;
+ }
+}
+
+SessionDialog::SessionDialog ()
+ : ArdourDialog (_("Recent Sessions"), true, true)
+ , new_only (false)
+ , _provided_session_name ("")
+ , _provided_session_path ("")
+ // the following are unused , but have no default ctor
+ , _output_limit_count_adj (1, 0, 100, 1, 10, 0)
+ , _input_limit_count_adj (1, 0, 100, 1, 10, 0)
+ , _master_bus_channel_count_adj (2, 0, 100, 1, 10, 0)
+ , _existing_session_chooser_used (false) // caller must check should_be_new
+{
+ get_vbox()->set_spacing (6);
+
+ cancel_button = add_button (Stock::CANCEL, RESPONSE_CANCEL);
+ open_button = add_button (Stock::OPEN, RESPONSE_ACCEPT);
+ open_button->set_sensitive (false);
+
+ setup_recent_sessions ();
+
+ get_vbox()->pack_start (recent_scroller, true, true);
+ get_vbox()->show_all ();
+ recent_scroller.show();
+
+ int cnt = redisplay_recent_sessions ();
+ if (cnt > 4) {
+ recent_scroller.set_size_request (-1, 300);
+ }