#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/click_box.h"
#include "gtkmm2ext/fastmeter.h"
-#include "gtkmm2ext/stop_signal.h"
#include "gtkmm2ext/popup.h"
#include "gtkmm2ext/window_title.h"
#include "startup.h"
#include "engine_dialog.h"
#include "processor_box.h"
+#include "time_axis_view_item.h"
#include "i18n.h"
reset_dpi();
+ TimeAxisViewItem::set_constant_heights ();
+
starting.connect (sigc::mem_fun(*this, &ARDOUR_UI::startup));
stopping.connect (sigc::mem_fun(*this, &ARDOUR_UI::shutdown));
/** @return true if a session was chosen and `apply' clicked, otherwise false if `cancel' was clicked */
bool
-ARDOUR_UI::run_startup (bool should_be_new)
+ARDOUR_UI::run_startup (bool should_be_new, string load_template)
{
if (_startup == 0) {
_startup = new ArdourStartup ();
}
_startup->set_new_only (should_be_new);
+ if (!load_template.empty()) {
+ _startup->set_load_template( load_template );
+ }
_startup->present ();
main().run();
engine->Halted.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::engine_halted, this, _1, false));
+ ARDOUR::Port::set_connecting_blocked (ARDOUR_COMMAND_LINE::no_connect_ports);
+
post_engine ();
return 0;
/* Things to be done once we create the AudioEngine
*/
- MIDI::Manager::instance()->set_api_data (engine->jack());
- setup_midi ();
-
ARDOUR::init_post_engine ();
ActionManager::init ();
void
ARDOUR_UI::startup ()
{
- if (get_session_parameters (true, ARDOUR_COMMAND_LINE::new_session)) {
+ if (get_session_parameters (true, ARDOUR_COMMAND_LINE::new_session, ARDOUR_COMMAND_LINE::load_template)) {
exit (1);
}
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
prompter.set_title (_("Take Snapshot"));
prompter.set_title (_("Take Snapshot"));
- prompter.set_prompt (_("Name of New Snapshot"));
+ prompter.set_prompt (_("Name of new snapshot"));
if (!switch_to_it) {
char timebuf[128];
/** @param quit_on_cancel true if exit() should be called if the user clicks `cancel' in the new session dialog */
int
-ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new)
+ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, string load_template)
{
Glib::ustring session_name;
Glib::ustring session_path;
int ret = -1;
bool likely_new = false;
+ if (! load_template.empty()) {
+ should_be_new = true;
+ template_name = load_template;
+ }
+
while (ret != 0) {
if (!should_be_new && !ARDOUR_COMMAND_LINE::session_name.empty()) {
} else {
- bool const apply = run_startup (should_be_new);
+ bool const apply = run_startup (should_be_new, load_template);
if (!apply) {
if (quit_on_cancel) {
exit (1);