#include "pbd/memento_command.h"
#include "pbd/file_utils.h"
-#include <gtkmm2ext/gtk_ui.h>
-#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 "gtkmm2ext/gtk_ui.h"
+#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 "midi++/manager.h"
#include "route_time_axis.h"
#include "startup.h"
#include "engine_dialog.h"
+#include "processor_box.h"
#include "i18n.h"
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
- : Gtkmm2ext::UI (X_("Ardour"), argcp, argvp),
+ : Gtkmm2ext::UI (X_("gui"), argcp, argvp),
- primary_clock (X_("primary"), false, X_("TransportClockDisplay"), true, false, true),
- secondary_clock (X_("secondary"), false, X_("SecondaryClockDisplay"), true, false, true),
- preroll_clock (X_("preroll"), false, X_("PreRollClock"), true, true),
- postroll_clock (X_("postroll"), false, X_("PostRollClock"), true, true),
+ primary_clock (X_("primary"), false, X_("TransportClockDisplay"), true, true, false, true),
+ secondary_clock (X_("secondary"), false, X_("SecondaryClockDisplay"), true, true, false, true),
+ preroll_clock (X_("preroll"), false, X_("PreRollClock"), true, false, true),
+ postroll_clock (X_("postroll"), false, X_("PostRollClock"), true, false, true),
/* preroll stuff */
/* big clock */
- big_clock (X_("bigclock"), false, "BigClockNonRecording", true, false, true),
+ big_clock (X_("bigclock"), false, "BigClockNonRecording", true, true, false, true),
/* transport */
GainMeter::setup_slider_pix ();
RouteTimeAxisView::setup_slider_pix ();
+ SendProcessorEntry::setup_slider_pix ();
+ SessionEvent::create_per_thread_pool ("GUI", 512);
} catch (failed_constructor& err) {
error << _("could not initialize Ardour.") << endmsg;
/* we like keyboards */
- keyboard = new Keyboard;
+ keyboard = new ArdourKeyboard;
+
+ XMLNode* node = ARDOUR_UI::instance()->keyboard_settings();
+ if (node) {
+ keyboard->set_state (*node, Stateful::loading_state_version);
+ }
reset_dpi();
main().run();
- /* we don't return here until the startup assistant is finished */
-
_startup->hide ();
- return _startup->applying ();
+ switch (_startup->response()) {
+ case RESPONSE_OK:
+ return true;
+ default:
+ return false;
+ }
}
int
MIDI::Manager::instance()->set_api_data (engine->jack());
setup_midi ();
-
+
ARDOUR::init_post_engine ();
ActionManager::init ();
if (setup_windows ()) {
throw failed_constructor ();
}
-
+
check_memory_locking();
/* this is the first point at which all the keybindings are available */
update_cpu_load ();
update_sample_rate (engine->frame_rate());
+ Config->ParameterChanged.connect (mem_fun (*this, &ARDOUR_UI::parameter_changed));
+ Config->map_parameters (mem_fun (*this, &ARDOUR_UI::parameter_changed));
+
/* now start and maybe save state */
if (do_engine_start () == 0) {
}
}
- session->set_deletion_in_progress ();
+ second_connection.disconnect ();
+ point_one_second_connection.disconnect ();
+ point_oh_five_second_connection.disconnect ();
+ point_zero_one_second_connection.disconnect();
+
+ // session->set_deletion_in_progress ();
+ session->remove_pending_capture_state ();
+ delete session;
+ session = 0;
}
ArdourDialog::close_all_dialogs ();
void
-ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode, RouteGroup* route_group, uint32_t how_many)
+ARDOUR_UI::session_add_audio_route (bool track, bool aux, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode, RouteGroup* route_group, uint32_t how_many)
{
list<boost::shared_ptr<AudioTrack> > tracks;
RouteList routes;
} else {
- routes = session->new_audio_route (input_channels, output_channels, route_group, how_many);
+ routes = session->new_audio_route (aux, input_channels, output_channels, route_group, how_many);
if (routes.size() != how_many) {
if (how_many == 1) {
if (session) {
session->goto_start();
-
/* force displayed area in editor to start no matter
what "follow playhead" setting is.
*/
if (editor) {
- editor->reset_x_origin (session->current_start_frame());
+ editor->center_screen (session->current_start_frame ());
}
}
}
*/
if (editor) {
- editor->reset_x_origin (frames - (editor->current_page_frames()/2));
+ editor->center_screen (frames);
}
}
}
ARDOUR_UI::transport_goto_end ()
{
if (session) {
- nframes_t frame = session->current_end_frame();
+ nframes_t const frame = session->current_end_frame();
session->request_locate (frame);
/* force displayed area in editor to start no matter
*/
if (editor) {
- editor->reset_x_origin (frame);
+ editor->center_screen (frame);
}
}
}
return;
}
- switch (Config->get_slave_source()) {
- case None:
- case JACK:
- break;
- default:
- /* transport controlled by the master */
- return;
+ if (session->config.get_external_sync()) {
+ switch (session->config.get_sync_source()) {
+ case JACK:
+ break;
+ default:
+ /* transport controlled by the master */
+ return;
+ }
}
bool rolling = session->transport_rolling();
return;
}
- switch (Config->get_slave_source()) {
- case None:
- case JACK:
- break;
- default:
- /* transport controlled by the master */
- return;
+ if (session->config.get_external_sync()) {
+ switch (session->config.get_sync_source()) {
+ case JACK:
+ break;
+ default:
+ /* transport controlled by the master */
+ return;
+ }
}
bool rolling = session->transport_rolling();
true);
- msg.set_name (X_("CleanupDialog"));
- msg.set_title (_("Cleanup Unused Sources"));
+ msg.set_name (X_("OpenExistingDialog"));
+ msg.set_title (_("Open Existing Session"));
msg.set_wmclass (X_("existing_session"), "Ardour");
msg.set_position (Gtk::WIN_POS_MOUSE);
pop_back_splash ();
uint32_t output_chan;
string name_template = add_route_dialog->name_template ();
bool track = add_route_dialog->track ();
+ bool aux = !track && add_route_dialog->aux();
RouteGroup* route_group = add_route_dialog->route_group ();
AutoConnectOption oac = Config->get_output_auto_connect();
if (track) {
session_add_audio_track (input_chan, output_chan, add_route_dialog->mode(), route_group, count);
} else {
- session_add_audio_bus (input_chan, output_chan, route_group, count);
+ session_add_audio_bus (aux, input_chan, output_chan, route_group, count);
}
}
}