21 #include "gtk2ardour-config.h"
22 #include "gtk2ardour-version.h"
31 #ifndef PLATFORM_WINDOWS
32 #include <sys/resource.h>
42 #include <glib/gstdio.h>
44 #include <gtkmm/messagedialog.h>
45 #include <gtkmm/accelmap.h>
88 #ifdef WINDOWS_VST_SUPPORT
91 #ifdef AUDIOUNIT_SUPPORT
95 #include "timecode/time.h"
168 MessageDialog msg (
string_compose (
_(
"%1 %2.x has discovered configuration files from %1 %3.x.\n\n"
169 "Would you like these files to be copied and used for %1 %2.x?\n\n"
170 "(This will require you to restart %1.)"),
171 PROGRAM_NAME, PROGRAM_VERSION, version),
178 msg.set_default_response (Gtk::RESPONSE_YES);
181 return (msg.run() == Gtk::RESPONSE_YES);
188 , session_loaded (false)
190 , primary_clock (new
MainClock (
X_(
"primary"),
X_(
"transport"), true ))
191 , secondary_clock (new
MainClock (
X_(
"secondary"),
X_(
"secondary"), false))
192 , big_clock (new
AudioClock (
X_(
"bigclock"), false,
"big", true, true, false, false))
194 , ignore_dual_punch (false)
199 , _mixer_on_top (false)
200 , first_time_engine_run (true)
208 , auto_return_button (
ArdourButton::led_default_elements)
209 , follow_edits_button (
ArdourButton::led_default_elements)
210 , auto_input_button (
ArdourButton::led_default_elements)
211 , auditioning_alert_button (
_(
"Audition"))
212 , solo_alert_button (
_(
"Solo"))
213 , feedback_alert_button (
_(
"Feedback"))
214 , error_alert_button (
ArdourButton::just_led_default_elements )
216 , editor_meter_peak_display()
217 , open_session_selector (0)
218 , _numpad_locate_happening (false)
219 , _session_is_new (false)
220 , last_key_press_time (0)
223 , speaker_config_window (
X_(
"speaker-config"),
_(
"Speaker Configuration"))
224 , key_editor (
X_(
"key-editor"),
_(
"Key Bindings"))
225 , rc_option_editor (
X_(
"rc-options-editor"),
_(
"Preferences"))
226 , add_route_dialog (
X_(
"add-routes"),
_(
"Add Tracks/Busses"))
227 , about (
X_(
"about"),
_(
"About"))
228 , location_ui (
X_(
"locations"),
_(
"Locations"))
229 , route_params (
X_(
"inspector"),
_(
"Tracks and Busses"))
230 , audio_midi_setup (
X_(
"audio-midi-setup"),
_(
"Audio/MIDI Setup"))
231 , export_video_dialog (
X_(
"video-export"),
_(
"Video Export Dialog"))
232 , session_option_editor (
X_(
"session-options-editor"),
_(
"Properties"),
boost::bind (&
ARDOUR_UI::create_session_option_editor, this))
233 , add_video_dialog (
X_(
"add-video"),
_(
"Add Tracks/Busses"),
boost::bind (&
ARDOUR_UI::create_add_video_dialog, this))
234 , bundle_manager (
X_(
"bundle-manager"),
_(
"Bundle Manager"),
boost::bind (&
ARDOUR_UI::create_bundle_manager, this))
235 , big_clock_window (
X_(
"big-clock"),
_(
"Big Clock"),
boost::bind (&
ARDOUR_UI::create_big_clock_window, this))
236 , audio_port_matrix (
X_(
"audio-connection-manager"),
_(
"Audio Connections"),
boost::bind (&
ARDOUR_UI::create_global_port_matrix, this,
ARDOUR::
DataType::AUDIO))
238 , video_server_process (0)
240 , have_configure_timeout (false)
241 , last_configure_time (0)
243 , have_disk_speed_dialog_displayed (false)
244 , _status_bar_visibility (
X_(
"status-bar"))
245 , _feedback_exists (false)
246 , _log_not_acknowledged (LogLevelNone)
251 MessageDialog msg (
string_compose (
_(
"Your configuration files were copied. You can now restart %1."), PROGRAM_NAME),
true);
279 rec_button.set_name (
"transport recenable button");
334 SessionEvent::create_per_thread_pool (
"GUI", 512);
346 Bindings::set_ignored_state (GDK_LOCK_MASK|GDK_MOD2_MASK|GDK_MOD3_MASK);
455 char *copy = strdup (reason);
471 if (strlen (reason)) {
472 msgstr =
string_compose (
_(
"The audio backend was shutdown because:\n\n%1"), reason);
475 The audio backend has either been shutdown or it\n\
476 disconnected %1 because %1\n\
477 was not fast enough. Try to restart\n\
478 the audio backend and save the session."), PROGRAM_NAME);
481 MessageDialog msg (*
editor, msgstr);
486 free (const_cast<char*> (reason));
495 #ifdef AUDIOUNIT_SUPPORT
497 if (AUPluginInfo::au_get_crashlog(au_msg)) {
498 popup_error(
_(
"Audio Unit Plugin Scan Failed. Automatic AU scanning has been disabled. Please see the log window for further details."));
531 vector<string> names;
532 vector<string> paths;
535 vector<AccelKey> bindings;
539 vector<string>::iterator n;
540 vector<string>::iterator k;
541 vector<string>::iterator p;
542 for (n = names.begin(), k = keys.begin(), p = paths.begin(); n != names.end(); ++n, ++k, ++p) {
543 cout <<
"Action: '" << (*n) <<
"' bound to '" << (*k) <<
"' Path: '" << (*p) <<
"'" << endl;
547 AudioEngine::instance()->stop ();
553 AudioFileSource::set_build_peakfiles (
true);
554 AudioFileSource::set_build_missing_peakfiles (
true);
590 if (getenv (
"ARDOUR_RUNNING_UNDER_VALGRIND")) {
597 FastMeter::flush_pattern_cache ();
647 if ((prop = node.
property (
"roll")) != 0) {
650 if ((prop = node.
property (
"stop")) != 0) {
653 if ((prop = node.
property (
"goto-start")) != 0) {
656 if ((prop = node.
property (
"goto-end")) != 0) {
659 if ((prop = node.
property (
"auto-loop")) != 0) {
662 if ((prop = node.
property (
"play-selection")) != 0) {
665 if ((prop = node.
property (
"rec")) != 0) {
668 if ((prop = node.
property (
"shuttle")) != 0) {
710 if (g_main_depth() > 1) {
718 if (!
Config->get_periodic_safety_backups()) {
740 Config->get_periodic_safety_backup_interval() * 1000);
753 string _annc_filename;
756 _annc_filename = PROGRAM_NAME
"_announcements_osx_";
758 _annc_filename = PROGRAM_NAME
"_announcements_linux_";
760 _annc_filename.append (VERSIONSTRING);
763 std::ifstream announce_file (path.c_str());
764 if ( announce_file.fail() )
767 std::stringstream oss;
768 oss << announce_file.rdbuf();
799 std::cerr <<
"audio-midi engine setup failed."<< std::endl;
803 if ((nsm_url = g_getenv (
"NSM_URL")) != 0) {
814 const char *process_name = g_getenv (
"ARDOUR_SELF");
815 nsm->
announce (PROGRAM_NAME,
":dirty:", process_name ? process_name :
"ardour4");
819 for ( i = 0; i < 5000; ++i) {
828 error <<
_(
"NSM server did not announce itself") <<
endmsg;
832 for ( i = 0; i < 5000; ++i) {
853 vector<string> action_names;
854 action_names.push_back(
"SaveAs");
855 action_names.push_back(
"Rename");
856 action_names.push_back(
"New");
857 action_names.push_back(
"Open");
858 action_names.push_back(
"Recent");
859 action_names.push_back(
"Close");
861 for (vector<string>::const_iterator n = action_names.begin(); n != action_names.end(); ++n) {
864 act->set_sensitive (
false);
877 if (brand_new_user) {
883 case Gtk::RESPONSE_OK:
890 #ifdef NO_PLUGIN_STATE
897 if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS) && !rs.empty()) {
903 Button b (
string_compose (
_(
"Subscribe and support development of %1"), PROGRAM_NAME));
904 CheckButton c (
_(
"Don't warn me about this again"));
906 l.set_markup (
string_compose (
_(
"<span weight=\"bold\" size=\"large\">%1</span>\n\n<b>%2</b>\n\n<i>%3</i>\n\n%4"),
908 _(
"It will not restore OR save any plugin settings"),
909 _(
"If you load an existing session with plugin settings\n"
910 "they will not be used and will be lost."),
911 _(
"To get full access to updates without this limitation\n"
912 "consider becoming a subscriber for a low cost every month.")));
913 l.set_justify (JUSTIFY_CENTER);
917 d.get_vbox()->pack_start (l,
true,
true);
918 d.get_vbox()->pack_start (b,
false,
false, 12);
919 d.get_vbox()->pack_start (c,
false,
false, 12);
921 d.add_button (
_(
"Quit now"), RESPONSE_CANCEL);
922 d.add_button (
string_compose (
_(
"Continue using %1"), PROGRAM_NAME), RESPONSE_OK);
926 c.signal_toggled().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (
toggle_file_existence), path)));
928 if (d.run () != RESPONSE_OK) {
939 std::cerr <<
"Cannot get session parameters."<< std::endl;
962 #if defined(__APPLE__) || defined(PLATFORM_WINDOWS)
969 if (AudioEngine::instance()->is_realtime() && memory_warning_node == 0) {
971 struct rlimit limits;
973 long pages, page_size;
975 size_t pages_len=
sizeof(pages);
976 if ((page_size = getpagesize()) < 0 ||
977 sysctlbyname(
"hw.availpages", &pages, &pages_len, NULL, 0))
979 if ((page_size = sysconf (_SC_PAGESIZE)) < 0 ||(pages = sysconf (_SC_PHYS_PAGES)) < 0)
984 ram = (int64_t) pages * (int64_t) page_size;
987 if (getrlimit (RLIMIT_MEMLOCK, &limits)) {
991 if (limits.rlim_cur != RLIM_INFINITY) {
993 if (ram == 0 || ((
double) limits.rlim_cur / ram) < 0.75) {
997 _(
"WARNING: Your system has a limit for maximum amount of locked memory. "
998 "This might cause %1 to run out of memory before your system "
999 "runs out of memory. \n\n"
1000 "You can view the memory limit with 'ulimit -l', "
1001 "and it is normally controlled by %2"),
1004 X_(
"/etc/login.conf")
1006 X_(
" /etc/security/limits.conf")
1010 msg.set_default_response (RESPONSE_OK);
1012 VBox* vbox = msg.get_vbox();
1014 CheckButton cb (
_(
"Do not show this window again"));
1015 hbox.pack_start (cb,
true,
false);
1016 vbox->pack_start (hbox);
1026 if (cb.get_active()) {
1033 #endif // !__APPLE__
1057 vector<string> actions;
1058 actions.push_back (
_(
"Don't quit"));
1059 actions.push_back (
_(
"Just quit"));
1060 actions.push_back (
_(
"Save and quit"));
1069 MessageDialog msg (*
editor,
1071 %1 was unable to save your session.\n\n\
1072 If you still wish to quit, please use the\n\n\
1073 \"Just quit\" option."), PROGRAM_NAME));
1110 AudioEngine::instance()->stop ();
1111 #ifdef WINDOWS_VST_SUPPORT
1112 fst_stop_threading();
1122 Gtk::Label prompt_label;
1123 Gtk::Image* dimage = manage (
new Gtk::Image(Stock::DIALOG_WARNING, Gtk::ICON_SIZE_DIALOG));
1127 assert (actions.size() >= 3);
1129 window.add_button (actions[0], RESPONSE_REJECT);
1130 window.add_button (actions[1], RESPONSE_APPLY);
1131 window.add_button (actions[2], RESPONSE_ACCEPT);
1133 window.set_default_response (RESPONSE_ACCEPT);
1135 Gtk::Button noquit_button (msg);
1136 noquit_button.set_name (
"EditorGTKButton");
1141 prompt =
string_compose(
_(
"The session \"%1\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"),
1144 prompt =
string_compose(
_(
"The snapshot \"%1\"\nhas not been saved.\n\nAny changes made this time\nwill be lost unless you save it.\n\nWhat do you want to do?"),
1148 prompt_label.set_text (prompt);
1149 prompt_label.set_name (
X_(
"PrompterLabel"));
1150 prompt_label.set_alignment(ALIGN_LEFT, ALIGN_TOP);
1152 dimage->set_alignment(ALIGN_CENTER, ALIGN_TOP);
1153 dhbox.set_homogeneous (
false);
1154 dhbox.pack_start (*dimage,
false,
false, 5);
1155 dhbox.pack_start (prompt_label,
true,
false, 5);
1156 window.get_vbox()->pack_start (dhbox);
1158 window.set_name (
_(
"Prompter"));
1159 window.set_modal (
true);
1160 window.set_resizable (
false);
1163 prompt_label.show();
1168 ResponseType r = (ResponseType) window.run();
1173 case RESPONSE_ACCEPT:
1175 case RESPONSE_APPLY:
1233 unsigned int interval = 40;
1242 interval = floor(500.
1246 #ifdef PLATFORM_WINDOWS
1253 interval = std::max(30u, interval);
1255 interval = std::max(8u, interval);
1269 if (!AudioEngine::instance()->connected()) {
1271 snprintf (buf,
sizeof (buf),
"%s",
_(
"Audio: <span foreground=\"red\">none</span>"));
1275 framecnt_t rate = AudioEngine::instance()->sample_rate();
1279 snprintf (buf,
sizeof (buf),
"%s",
_(
"Audio: <span foreground=\"red\">none</span>"));
1282 if (fmod (rate, 1000.0) != 0.0) {
1283 snprintf (buf,
sizeof (buf),
_(
"Audio: <span foreground=\"green\">%.1f kHz / %4.1f ms</span>"),
1284 (
float) rate / 1000.0
f,
1285 (AudioEngine::instance()->usecs_per_cycle() / 1000.0
f));
1287 snprintf (buf,
sizeof (buf),
_(
"Audio: <span foreground=\"green\">%" PRId64
" kHz / %4.1f ms</span>"),
1289 (AudioEngine::instance()->usecs_per_cycle() / 1000.0
f));
1305 s <<
_(
"File:") <<
X_(
" <span foreground=\"green\">");
1362 snprintf (buf,
sizeof (buf),
_(
"X: <span foreground=\"%s\">>10K</span>"),
X_(
"red"));
1364 snprintf (buf,
sizeof (buf),
_(
"X: <span foreground=\"%s\">%u</span>"), x > 0 ?
X_(
"red") :
X_(
"green"), x);
1367 snprintf (buf,
sizeof (buf),
_(
"X: <span foreground=\"%s\">?</span>"),
X_(
"yellow"));
1382 double const c = AudioEngine::instance()->get_dsp_load ();
1383 snprintf (buf,
sizeof (buf),
_(
"DSP: <span foreground=\"%s\">%5.1f%%</span>"), c >= 90 ?
X_(
"red") :
X_(
"green"), c);
1402 _(
"Buffers: <span foreground=\"green\">p:</span><span foreground=\"%s\">%" PRIu32
"%%</span> "
1403 "<span foreground=\"green\">c:</span><span foreground=\"%s\">%" PRIu32
"%%</span>"),
1404 playback <= 5 ?
X_(
"red") :
X_(
"green"),
1406 capture <= 5 ?
X_(
"red") :
X_(
"green"),
1443 snprintf (buf,
sizeof (buf),
"%s",
_(
"Disk: <span foreground=\"green\">Unknown</span>"));
1444 }
else if (opt_frames.get_value_or (0) ==
max_framecnt) {
1445 snprintf (buf,
sizeof (buf),
"%s",
_(
"Disk: <span foreground=\"green\">24hrs+</span>"));
1450 framecnt_t frames = opt_frames.get_value_or (0);
1460 hrs = frames / (fr * 3600);
1463 snprintf (buf,
sizeof (buf),
"%s",
_(
"Disk: <span foreground=\"green\">>24 hrs</span>"));
1465 frames -= hrs * fr * 3600;
1466 mins = frames / (fr * 60);
1467 frames -= mins * fr * 60;
1470 bool const low = (hrs == 0 && mins <= 30);
1474 _(
"Disk: <span foreground=\"%s\">%02dh:%02dm:%02ds</span>"),
1475 low ?
X_(
"red") :
X_(
"green"),
1494 if ((sync_src ==
LTC || sync_src ==
MTC) && (tcslave = dynamic_cast<TimecodeSlave*>(
_session->
slave())) != 0) {
1500 snprintf (buf,
sizeof (buf),
S_(
"Timecode|TC: <span foreground=\"%s\">%s</span>"),
1501 matching ?
X_(
"green") :
X_(
"red"),
1502 Timecode::timecode_format_name (
_session->
config.get_timecode_format()).c_str());
1504 snprintf (buf,
sizeof (buf),
"TC: n/a");
1515 static int last_min = -1;
1518 tm_now = localtime (&now);
1519 if (last_min != tm_now->tm_min) {
1521 sprintf (buf,
"%02d:%02d", tm_now->tm_hour, tm_now->tm_min);
1523 last_min = tm_now->tm_min;
1532 std::vector<std::string> session_directories;
1547 sort (rs.begin(), rs.end(), cmp);
1549 for (ARDOUR::RecentSessions::iterator i = rs.begin(); i != rs.end(); ++i) {
1550 session_directories.push_back ((*i).second);
1553 for (vector<std::string>::const_iterator i = session_directories.begin();
1554 i != session_directories.end(); ++i)
1556 std::vector<std::string> state_file_paths;
1562 vector<string> states;
1563 vector<const gchar*> item;
1564 string fullpath = *i;
1568 if (fullpath[fullpath.length() - 1] ==
'/') {
1569 fullpath = fullpath.substr (0, fullpath.length() - 1);
1573 if (!Glib::file_test(fullpath.c_str(), Glib::FILE_TEST_EXISTS)) {
1579 states = Session::possible_states (fullpath);
1581 if (states.empty()) {
1593 if (state_file_names.size() > 1) {
1598 for (std::vector<std::string>::iterator i2 = state_file_names.begin();
1599 i2 != state_file_names.end(); ++i2)
1623 Gtk::ScrolledWindow *scroller = manage (
new Gtk::ScrolledWindow);
1636 scroller->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
1668 case RESPONSE_ACCEPT:
1707 if (!AudioEngine::instance()->connected()) {
1709 _(
"%1 is not connected to any audio backend.\n"
1710 "You cannot open or close sessions in this condition"),
1739 string session_parent_dir = Glib::path_get_dirname(
_session->
path());
1740 string::size_type last_dir_sep = session_parent_dir.rfind(G_DIR_SEPARATOR);
1741 session_parent_dir = session_parent_dir.substr(0, last_dir_sep);
1747 string default_session_folder =
Config->get_default_session_parent_dir();
1752 catch (Glib::Error & e) {
1753 std::cerr <<
"open_session_selector->add_shortcut_folder (" << default_session_folder <<
") threw Glib::Error " << e.what() << std::endl;
1756 FileFilter session_filter;
1758 session_filter.set_name (
string_compose (
_(
"%1 sessions"), PROGRAM_NAME));
1767 case RESPONSE_ACCEPT:
1779 if (session_path.length() > 0) {
1790 uint32_t how_many,
const string& name_template,
PluginInfoPtr instrument)
1792 list<boost::shared_ptr<MidiTrack> > tracks;
1795 warning <<
_(
"You cannot add a track without a session already loaded.") <<
endmsg;
1802 if (tracks.size() != how_many) {
1803 error <<
string_compose(
P_(
"could not create %1 new mixed track",
"could not create %1 new mixed tracks", how_many), how_many) <<
endmsg;
1808 MessageDialog msg (*
editor,
1810 to create a new track or bus.\n\
1811 You should save %1, exit and\n\
1812 restart with more ports."), PROGRAM_NAME));
1822 one_midi_channel.
set (DataType::MIDI, 1);
1825 session_add_mixed_track (one_midi_channel, one_midi_channel, route_group, how_many, name_template, instrument);
1832 int32_t input_channels,
1833 int32_t output_channels,
1837 string const & name_template
1840 list<boost::shared_ptr<AudioTrack> > tracks;
1844 warning <<
_(
"You cannot add a track or bus without a session already loaded.") <<
endmsg;
1850 tracks =
_session->
new_audio_track (input_channels, output_channels, mode, route_group, how_many, name_template);
1852 if (tracks.size() != how_many) {
1853 error <<
string_compose (
P_(
"could not create %1 new audio track",
"could not create %1 new audio tracks", how_many), how_many)
1861 if (routes.size() != how_many) {
1862 error <<
string_compose (
P_(
"could not create %1 new audio bus",
"could not create %1 new audio busses", how_many), how_many)
1869 MessageDialog msg (*
editor,
1871 to create a new track or bus.\n\
1872 You should save %1, exit and\n\
1873 restart with more ports."), PROGRAM_NAME));
1925 if (frame_rate == 0) {
1930 frames = tmnow.tm_hour * (60 * 60 * frame_rate);
1931 frames += tmnow.tm_min * (60 * frame_rate);
1932 frames += tmnow.tm_sec * frame_rate;
1989 bool none_record_enabled =
true;
1991 for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
1996 none_record_enabled =
false;
2001 if (none_record_enabled) {
2005 return none_record_enabled;
2013 case Session::Disabled:
2015 MessageDialog msg (*
editor,
_(
"Please create one or more tracks before trying to record.\nYou can do this with the \"Add Track or Bus\" option in the Session menu."));
2027 case Session::Recording:
2035 case Session::Enabled:
2054 switch (
Config->get_sync_source()) {
2073 if (!
Config->get_loop_is_mode()) {
2077 if (!
Config->get_seamless_loop()) {
2080 }
else if (rolling) {
2117 switch (
Config->get_sync_source()) {
2127 bool affect_transport =
true;
2129 if (rolling && roll_out_of_bounded_mode) {
2132 if (
Config->get_seamless_loop()) {
2137 affect_transport =
true;
2140 affect_transport =
false;
2144 affect_transport =
false;
2149 if (affect_transport) {
2185 if (
Config->get_loop_is_mode()) {
2218 float current_transport_speed;
2223 if (current_transport_speed >= 0.0
f) {
2251 if (current_transport_speed <= 0.0
f) {
2282 if ((t = dynamic_cast<Track*>(r.
get())) != 0) {
2317 if (
Config->get_loop_is_mode()) {
2343 if (
Config->get_loop_is_mode ()) {
2376 if (
ui_config->get_super_rapid_clock_update()) {
2394 snprintf (buf,
sizeof (buf),
_(
"Copied %" PRId64
" of %" PRId64), cnt, total);
2396 label->set_text (buf);
2397 bar->set_fraction (fraction);
2401 while (gtk_events_pending()) {
2402 gtk_main_iteration ();
2426 case Gtk::RESPONSE_OK:
2434 Gtk::ProgressBar progress_bar;
2436 progress_dialog.get_vbox()->pack_start (label);
2437 progress_dialog.get_vbox()->pack_start (progress_bar);
2439 progress_bar.show ();
2460 progress_dialog.show_all ();
2461 progress_dialog.present ();
2484 prompter.set_name (
"Prompter");
2485 prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
2487 prompter.set_title (
_(
"Save as..."));
2490 prompter.set_title (
_(
"Take Snapshot"));
2494 if (!switch_to_it) {
2497 struct tm local_time;
2501 strftime (timebuf,
sizeof(timebuf),
"%FT%H.%M.%S", &local_time);
2506 switch (prompter.run()) {
2507 case RESPONSE_ACCEPT:
2511 bool do_save = (snapname.length() != 0);
2514 char illegal = Session::session_name_is_legal(snapname);
2516 MessageDialog msg (
string_compose (
_(
"To ensure compatibility with various systems\n"
2517 "snapshot names may not contain a '%1' character"), illegal));
2523 vector<std::string> p;
2526 if (find (n.begin(), n.end(), snapname) != n.end()) {
2528 ArdourDialog confirm (
_(
"Confirm Snapshot Overwrite"),
true);
2529 Label m (
_(
"A snapshot already exists with that name. Do you want to overwrite it?"));
2530 confirm.get_vbox()->pack_start (m,
true,
true);
2531 confirm.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
2532 confirm.add_button (
_(
"Overwrite"), Gtk::RESPONSE_ACCEPT);
2533 confirm.show_all ();
2534 switch (confirm.run()) {
2535 case RESPONSE_CANCEL:
2564 prompter.set_name (
"Prompter");
2565 prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
2566 prompter.set_title (
_(
"Rename Session"));
2570 switch (prompter.run()) {
2571 case RESPONSE_ACCEPT:
2575 bool do_rename = (name.length() != 0);
2578 char illegal = Session::session_name_is_legal (name);
2581 MessageDialog msg (
string_compose (
_(
"To ensure compatibility with various systems\n"
2582 "session names may not contain a '%1' character"), illegal));
2589 MessageDialog msg (
_(
"That name is already in use by another directory/folder. Please try again."));
2590 msg.set_position (WIN_POS_MOUSE);
2598 MessageDialog msg (
_(
"Renaming this session failed.\nThings could be seriously messed up at this point"));
2599 msg.set_position (WIN_POS_MOUSE);
2638 if (name.length() == 0) {
2689 if (r == Session::Enabled || (r == Session::Recording && !h)) {
2695 }
else if (r == Session::Recording && h) {
2712 prompter.set_name (
X_(
"Prompter"));
2713 prompter.set_title (
_(
"Save Template"));
2716 prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
2718 switch (prompter.run()) {
2719 case RESPONSE_ACCEPT:
2722 if (name.length()) {
2737 dialog.grab_focus ();
2752 std::string str =
string_compose (
_(
"This session\n%1\nalready exists. Do you want to open it?"), session_path);
2754 MessageDialog msg (str,
2756 Gtk::MESSAGE_WARNING,
2757 Gtk::BUTTONS_YES_NO,
2761 msg.set_name (
X_(
"OpenExistingDialog"));
2762 msg.set_title (
_(
"Open Existing Session"));
2763 msg.set_wmclass (
X_(
"existing_session"), PROGRAM_NAME);
2764 msg.set_position (Gtk::WIN_POS_CENTER);
2767 switch (msg.run()) {
2818 if (
build_session (session_path, session_name, bus_profile)) {
2830 if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
2844 string session_path;
2845 string template_name;
2847 bool likely_new =
false;
2848 bool cancel_not_quit;
2872 if (!load_template.empty()) {
2873 should_be_new =
true;
2880 if (!session_path.empty()) {
2881 if (Glib::file_test (session_path.c_str(), Glib::FILE_TEST_EXISTS)) {
2882 if (Glib::file_test (session_path.c_str(), Glib::FILE_TEST_IS_REGULAR)) {
2884 session_path = Glib::path_get_dirname (session_path);
2902 if (suffix != string::npos) {
2905 session_name = Glib::path_get_basename (session_name);
2916 if (should_be_new || session_name.empty()) {
2919 cerr <<
"run dialog\n";
2921 switch (session_dialog.run()) {
2922 case RESPONSE_ACCEPT:
2925 if (quit_on_cancel) {
2939 session_dialog.hide ();
2944 should_be_new =
false;
2946 session_name = session_dialog.
session_name (likely_new);
2955 if (suffix != string::npos) {
2956 session_name = session_name.substr (0, suffix);
2961 if (session_name.empty()) {
2970 if (session_name[0] == G_DIR_SEPARATOR ||
2971 #ifdef PLATFORM_WINDOWS
2972 (session_name.length() > 3 && session_name[1] ==
':' && session_name[2] == G_DIR_SEPARATOR)
2974 (session_name.length() > 2 && session_name[0] ==
'.' && session_name[1] == G_DIR_SEPARATOR) ||
2975 (session_name.length() > 3 && session_name[0] ==
'.' && session_name[1] ==
'.' && session_name[2] == G_DIR_SEPARATOR)
2984 session_path = Glib::path_get_dirname (session_name);
2985 session_name = Glib::path_get_basename (session_name);
2991 char illegal = Session::session_name_is_legal (session_name);
2994 MessageDialog msg (session_dialog,
2996 "session names may not contain a '%1' character"),
3004 if (Glib::file_test (session_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
3007 if (likely_new && !
nsm) {
3009 std::string existing = Glib::build_filename (session_path, session_name);
3023 MessageDialog msg (
string_compose (
_(
"There is no existing session at \"%1\""), session_path));
3029 char illegal = Session::session_name_is_legal(session_name);
3033 MessageDialog msg (session_dialog,
string_compose(
_(
"To ensure compatibility with various systems\n"
3034 "session names may not contain a '%1' character"), illegal));
3043 if (likely_new && template_name.empty()) {
3049 ret =
load_session (session_path, session_name, template_name);
3105 if (unload_status < 0) {
3107 }
else if (unload_status > 0) {
3118 new_session =
new Session (*AudioEngine::instance(), path, snap_name, 0, mix_template);
3123 catch (AudioEngine::PortRegistrationFailure& err) {
3125 MessageDialog msg (err.what(),
3128 Gtk::BUTTONS_CLOSE);
3130 msg.set_title (
_(
"Port Registration Error"));
3131 msg.set_secondary_text (
_(
"Click the Close button to try again."));
3132 msg.set_position (Gtk::WIN_POS_CENTER);
3136 int response = msg.run ();
3141 case RESPONSE_CANCEL:
3152 _(
"Session \"%1 (snapshot %2)\" did not load successfully"),
3158 msg.set_title (
_(
"Loading Error"));
3159 msg.set_position (Gtk::WIN_POS_CENTER);
3177 MessageDialog msg (
_(
"This session has been opened in read-only mode.\n\nYou will not be able to record or save."),
3182 msg.set_title (
_(
"Read-only Session"));
3183 msg.set_position (Gtk::WIN_POS_CENTER);
3210 #ifdef WINDOWS_VST_SUPPORT
3211 fst_stop_threading();
3216 #ifdef WINDOWS_VST_SUPPORT
3217 fst_start_threading();
3243 new_session =
new Session (*AudioEngine::instance(), path, snap_name, &bus_profile);
3248 MessageDialog msg (
string_compose(
_(
"Could not create session in \"%1\""), path));
3287 open_uri(
"http://webchat.freenode.net/?channels=ardour-osx");
3288 #elif defined PLATFORM_WINDOWS
3289 open_uri(
"http://webchat.freenode.net/?channels=ardour-windows");
3291 open_uri(
"http://webchat.freenode.net/?channels=ardour");
3310 PBD::open_uri (
"http://tracker.ardour.org/bug_report_page.php");
3323 PBD::open_uri (
"http://manual.ardour.org/files/a3_mnemonic_cheat_sheet_osx.pdf");
3325 PBD::open_uri (
"http://manual.ardour.org/files/a3_mnemonic_cheatsheet.pdf");
3393 removed = rep.
paths.size();
3396 MessageDialog msgd (*
editor,
3397 _(
"No files were ready for clean-up"),
3401 msgd.set_title (
_(
"Clean-up"));
3402 msgd.set_secondary_text (
_(
"If this seems suprising, \n\
3403 check for any existing snapshots.\n\
3404 These may still include regions that\n\
3405 require some unused files to continue to exist."));
3413 struct CleanupResultsModelColumns :
public Gtk::TreeModel::ColumnRecord {
3414 CleanupResultsModelColumns() {
3418 Gtk::TreeModelColumn<std::string> visible_name;
3419 Gtk::TreeModelColumn<std::string> fullpath;
3423 CleanupResultsModelColumns results_columns;
3424 Glib::RefPtr<Gtk::ListStore> results_model;
3425 Gtk::TreeView results_display;
3427 results_model = ListStore::create (results_columns);
3428 results_display.set_model (results_model);
3429 results_display.append_column (list_title, results_columns.visible_name);
3431 results_display.set_name (
"CleanupResultsList");
3432 results_display.set_headers_visible (
true);
3433 results_display.set_headers_clickable (
false);
3434 results_display.set_reorderable (
false);
3436 Gtk::ScrolledWindow list_scroller;
3441 Gtk::Image* dimage = manage (
new Gtk::Image(Stock::DIALOG_INFO, Gtk::ICON_SIZE_DIALOG));
3443 dimage->set_alignment(ALIGN_LEFT, ALIGN_TOP);
3454 const char* bprefix;
3455 double space_adjusted = 0;
3457 if (rep.
space < 1000) {
3459 space_adjusted = rep.
space;
3460 }
else if (rep.
space < 1000000) {
3461 bprefix =
_(
"kilo");
3462 space_adjusted = floorf((
float)rep.
space / 1000.0);
3463 }
else if (rep.
space < 1000000 * 1000) {
3464 bprefix =
_(
"mega");
3465 space_adjusted = floorf((
float)rep.
space / (1000.0 * 1000.0));
3467 bprefix =
_(
"giga");
3468 space_adjusted = floorf((
float)rep.
space / (1000.0 * 1000 * 1000.0));
3473 The following file was deleted from %2,\n\
3474 releasing %3 %4bytes of disk space",
"\
3475 The following %1 files were deleted from %2,\n\
3476 releasing %3 %4bytes of disk space", removed),
3477 removed, Glib::Markup::escape_text (dead_directory), space_adjusted, bprefix, PROGRAM_NAME));
3480 The following file was not in use and \n\
3481 has been moved to: %2\n\n\
3482 After a restart of %5\n\n\
3483 <span face=\"mono\">Session -> Clean-up -> Flush Wastebasket</span>\n\n\
3484 will release an additional %3 %4bytes of disk space.\n",
"\
3485 The following %1 files were not in use and \n\
3486 have been moved to: %2\n\n\
3487 After a restart of %5\n\n\
3488 <span face=\"mono\">Session -> Clean-up -> Flush Wastebasket</span>\n\n\
3489 will release an additional %3 %4bytes of disk space.\n", removed),
3490 removed, Glib::Markup::escape_text (dead_directory), space_adjusted, bprefix, PROGRAM_NAME));
3493 dhbox.pack_start (*dimage,
true,
false, 5);
3494 dhbox.pack_start (txt,
true,
false, 5);
3496 for (vector<string>::iterator i = rep.
paths.begin(); i != rep.
paths.end(); ++i) {
3497 TreeModel::Row row = *(results_model->append());
3498 row[results_columns.visible_name] = *i;
3499 row[results_columns.fullpath] = *i;
3502 list_scroller.add (results_display);
3503 list_scroller.set_size_request (-1, 150);
3504 list_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
3506 dvbox.pack_start (dhbox,
true,
false, 5);
3507 dvbox.pack_start (list_scroller,
true,
false, 5);
3508 ddhbox.pack_start (dvbox,
true,
false, 5);
3510 results.get_vbox()->pack_start (ddhbox,
true,
false, 5);
3511 results.add_button (Stock::CLOSE, RESPONSE_CLOSE);
3512 results.set_default_response (RESPONSE_CLOSE);
3513 results.set_position (Gtk::WIN_POS_MOUSE);
3515 results_display.show();
3516 list_scroller.show();
3524 results.set_resizable (
false);
3539 MessageDialog checker (
_(
"Are you sure you want to clean-up?"),
3541 Gtk::MESSAGE_QUESTION,
3544 checker.set_title (
_(
"Clean-up"));
3546 checker.set_secondary_text(
_(
"Clean-up is a destructive operation.\n\
3547 ALL undo/redo information will be lost if you clean-up.\n\
3548 Clean-up will move all unused files to a \"dead\" location."));
3550 checker.add_button (Stock::CANCEL, RESPONSE_CANCEL);
3551 checker.add_button (
_(
"Clean-up"), RESPONSE_ACCEPT);
3552 checker.set_default_response (RESPONSE_CANCEL);
3554 checker.set_name (
_(
"CleanupDialog"));
3555 checker.set_wmclass (
X_(
"ardour_cleanup"), PROGRAM_NAME);
3556 checker.set_position (Gtk::WIN_POS_MOUSE);
3558 switch (checker.run()) {
3559 case RESPONSE_ACCEPT:
3573 act->set_sensitive (
false);
3607 uint32_t order_hint = UINT32_MAX;
3635 if (order_hint == UINT32_MAX) {
3646 for (RouteList::iterator ri = rd->begin(); ri != rd->end(); ++ri) {
3678 case RESPONSE_ACCEPT:
3694 if (!template_path.empty()) {
3712 output_chan.
set (DataType::MIDI, 0);
3714 output_chan = input_chan;
3744 Label m (
_(
"Do you really want to stop the Video Server?"));
3745 confirm.get_vbox()->pack_start (m,
true,
true);
3746 confirm.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
3747 confirm.add_button (
_(
"Yes, Stop It"), Gtk::RESPONSE_ACCEPT);
3748 confirm.show_all ();
3749 if (confirm.run() == RESPONSE_CANCEL) {
3773 popup_error(
_(
"The Video Server is already started."));
3775 popup_error(
_(
"An external Video Server is configured and can be reached. Not starting a new instance."));
3783 warning <<
_(
"Could not connect to the Video Server. Start it or configure its access URL in Preferences.") <<
endmsg;
3787 video_server_dialog->set_transient_for (*float_window);
3790 if (!
Config->get_show_video_server_dialog() && firsttime < 2) {
3791 video_server_dialog->hide();
3793 ResponseType r = (ResponseType) video_server_dialog->run ();
3794 video_server_dialog->hide();
3795 if (r != RESPONSE_ACCEPT) {
return false; }
3797 Config->set_show_video_server_dialog(
false);
3801 std::string icsd_exec = video_server_dialog->
get_exec_path();
3802 std::string icsd_docroot = video_server_dialog->
get_docroot();
3803 if (icsd_docroot.empty()) {
3804 #ifndef PLATFORM_WINDOWS
3805 icsd_docroot =
X_(
"/");
3807 icsd_docroot =
X_(
"C:\\");
3812 if (g_lstat (icsd_docroot.c_str(), &sb) != 0 || !S_ISDIR(sb.st_mode)) {
3813 warning <<
_(
"Specified docroot is not an existing directory.") <<
endmsg;
3816 #ifndef PLATFORM_WINDOWS
3817 if ( (g_lstat (icsd_exec.c_str(), &sb) != 0)
3818 || (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) == 0 ) {
3819 warning <<
_(
"Given Video Server is not an executable file.") <<
endmsg;
3823 if ( (g_lstat (icsd_exec.c_str(), &sb) != 0)
3824 || (sb.st_mode & (S_IXUSR)) == 0 ) {
3825 warning <<
_(
"Given Video Server is not an executable file.") <<
endmsg;
3831 argp=(
char**) calloc(9,
sizeof(
char*));
3832 argp[0] = strdup(icsd_exec.c_str());
3833 argp[1] = strdup(
"-P");
3834 argp[2] = (
char*) calloc(16,
sizeof(
char)); snprintf(argp[2], 16,
"%s", video_server_dialog->
get_listenaddr().c_str());
3835 argp[3] = strdup(
"-p");
3836 argp[4] = (
char*) calloc(6,
sizeof(
char)); snprintf(argp[4], 6,
"%i", video_server_dialog->
get_listenport());
3837 argp[5] = strdup(
"-C");
3838 argp[6] = (
char*) calloc(6,
sizeof(
char)); snprintf(argp[6], 6,
"%i", video_server_dialog->
get_cachesize());
3839 argp[7] = strdup(icsd_docroot.c_str());
3843 if (icsd_docroot ==
X_(
"/") || icsd_docroot ==
X_(
"C:\\")) {
3844 Config->set_video_advanced_setup(
false);
3846 std::ostringstream osstream;
3847 osstream <<
"http://localhost:" << video_server_dialog->
get_listenport() <<
"/";
3848 Config->set_video_server_url(osstream.str());
3849 Config->set_video_server_docroot(icsd_docroot);
3850 Config->set_video_advanced_setup(
true);
3864 Glib::usleep (50000);
3866 if (--timeout <= 0 || !video_server_process->is_running())
break;
3869 warning <<
_(
"Video-server was started but does not respond to requests...") <<
endmsg;
3888 warning <<
_(
"Could not connect to the Video Server. Start it or configure its access URL in Preferences.") <<
endmsg;
3903 if (r != RESPONSE_ACCEPT) {
return; }
3905 bool local_file, orig_local_file;
3908 std::string orig_path = path;
3909 orig_local_file = local_file;
3913 if (local_file && !Glib::file_test(path, Glib::FILE_TEST_EXISTS)) {
3917 if (!local_file && path.length() == 0) {
3927 ResponseType r = (ResponseType) transcode_video_dialog->run ();
3928 transcode_video_dialog->hide();
3929 if (r != RESPONSE_ACCEPT) {
3930 delete transcode_video_dialog;
3948 delete transcode_video_dialog;
3951 delete transcode_video_dialog;
3962 if (path.at(0) == G_DIR_SEPARATOR) {
3963 path=path.substr(1);
3973 if (orig_local_file) {
4019 if (localcacheonly) {
4032 Gtk::ResponseType rv = (Gtk::ResponseType) infobox.run();
4037 case GTK_RESPONSE_YES:
4080 if (getenv(
"ARDOUR_INSTANT_XML_PATH")) {
4118 cerr <<
"HALT on xrun\n";
4119 MessageDialog msg (*
editor,
_(
"Recording was stopped because your system could not keep up."));
4149 The disk system on your computer\n\
4150 was not able to keep up with %1.\n\
4152 Specifically, it failed to write data to disk\n\
4153 quickly enough to keep up with recording.\n"), PROGRAM_NAME));
4168 PluginManager::instance().cancel_plugin_scan();
4174 PluginManager::instance().cancel_plugin_timeout();
4185 scan_pbar->set_fraction ((
float) timeout / (
float)
Config->get_vst_scan_timeout());
4200 const bool cancelled = PluginManager::instance().cancelled();
4201 if (type !=
X_(
"closeme") && !
ui_config->get_show_plugin_scan_window()) {
4202 if (cancelled &&
scan_dlg->is_mapped()) {
4207 if (cancelled || !can_cancel) {
4212 static Gtk::Button *cancel_button;
4213 static Gtk::Button *timeout_button;
4215 scan_dlg =
new MessageDialog(
"",
false, MESSAGE_INFO, BUTTONS_NONE);
4217 vbox->set_size_request(400,-1);
4218 scan_dlg->set_title (
_(
"Scanning for plugins"));
4220 cancel_button = manage(
new Gtk::Button(
_(
"Cancel plugin scan")));
4221 cancel_button->set_name (
"EditorGTKButton");
4223 cancel_button->show();
4225 scan_dlg->get_vbox()->pack_start ( *cancel_button, PACK_SHRINK);
4229 timeout_button = manage(
new Gtk::Button(
_(
"Stop Timeout")));
4230 timeout_button->set_name (
"EditorGTKButton");
4232 timeout_button->show();
4235 scan_pbar->set_orientation(Gtk::PROGRESS_RIGHT_TO_LEFT);
4240 scan_tbox->pack_start (*timeout_button, PACK_SHRINK, 4);
4247 if (type ==
X_(
"closeme")) {
4250 scan_dlg->set_message(type +
": " + Glib::path_get_basename(plugin));
4253 if (!can_cancel || !cancelled) {
4256 cancel_button->set_sensitive(can_cancel && !cancelled);
4266 while (gtk_events_pending() && --timeout) {
4267 gtk_main_iteration ();
4278 MessageDialog* msg =
new MessageDialog (
4280 was not able to keep up with %1.\n\
4282 Specifically, it failed to read data from disk\n\
4283 quickly enough to keep up with playback.\n"), PROGRAM_NAME));
4304 d =
new MessageDialog (*
editor, msg,
false, MESSAGE_INFO, BUTTONS_OK,
true);
4306 d =
new MessageDialog (msg,
false, MESSAGE_INFO, BUTTONS_OK,
true);
4317 HBox* hbox = manage (
new HBox());
4318 Image* image = manage (
new Image (Stock::DIALOG_QUESTION, ICON_SIZE_DIALOG));
4321 This session appears to have been in the\n\
4322 middle of recording when %1 or\n\
4323 the computer was shutdown.\n\
4325 %1 can recover any captured audio for\n\
4326 you, or it can ignore it. Please decide\n\
4327 what you would like to do.\n"), PROGRAM_NAME));
4328 image->set_alignment(ALIGN_CENTER, ALIGN_TOP);
4329 hbox->pack_start (*image, PACK_EXPAND_WIDGET, 12);
4330 hbox->pack_end (message, PACK_EXPAND_PADDING, 12);
4331 dialog.get_vbox()->pack_start(*hbox, PACK_EXPAND_PADDING, 6);
4332 dialog.add_button (
_(
"Ignore crash data"), RESPONSE_REJECT);
4333 dialog.add_button (
_(
"Recover from crash"), RESPONSE_ACCEPT);
4334 dialog.set_default_response (RESPONSE_ACCEPT);
4335 dialog.set_position (WIN_POS_CENTER);
4340 switch (dialog.run ()) {
4341 case RESPONSE_ACCEPT:
4351 HBox* hbox =
new HBox();
4352 Image* image =
new Image (Stock::DIALOG_WARNING, ICON_SIZE_DIALOG);
4355 This session was created with a sample rate of %1 Hz, but\n\
4356 %2 is currently running at %3 Hz. If you load this session,\n\
4357 audio may be played at the wrong sample rate.\n"), desired, PROGRAM_NAME, actual));
4359 image->set_alignment(ALIGN_CENTER, ALIGN_TOP);
4360 hbox->pack_start (*image, PACK_EXPAND_WIDGET, 12);
4361 hbox->pack_end (message, PACK_EXPAND_PADDING, 12);
4362 dialog.get_vbox()->pack_start(*hbox, PACK_EXPAND_PADDING, 6);
4363 dialog.add_button (
_(
"Do not load session"), RESPONSE_REJECT);
4364 dialog.add_button (
_(
"Load session anyway"), RESPONSE_ACCEPT);
4365 dialog.set_default_response (RESPONSE_ACCEPT);
4366 dialog.set_position (WIN_POS_CENTER);
4371 switch (dialog.run()) {
4372 case RESPONSE_ACCEPT:
4390 if (AudioEngine::instance()->stop ()) {
4391 MessageDialog msg (*
editor,
_(
"Could not disconnect from Audio/MIDI engine"));
4405 if (AudioEngine::instance()->
start ()) {
4408 MessageDialog msg (*
editor,
_(
"Could not reconnect to the Audio/MIDI engine"));
4411 MessageDialog msg (
_(
"Could not reconnect to the Audio/MIDI engine"));
4433 if (
ui_config->get_primary_clock_delta_edit_cursor()) {
4439 if (
ui_config->get_secondary_clock_delta_edit_cursor()) {
4494 Keyboard::set_can_save_keybindings (
true);
4531 const char *action = 0;
4535 action =
X_(
"Roll");
4538 action =
X_(
"Stop");
4541 action =
X_(
"GotoStart");
4544 action =
X_(
"GotoEnd");
4547 action =
X_(
"Loop");
4550 action =
X_(
"PlaySelection");
4553 action =
X_(
"Record");
4600 if (gdk_screen_width() < 1200 || getenv (
"ARDOUR_NARROW_SCREEN")) {
4604 if (g_getenv (
"ARDOUR_SAE")) {
4609 if (g_getenv (
"TRX")) {
4613 if (g_getenv (
"MIXBUS")) {
4626 int result = dialog.run ();
4690 const char* start_big =
"<span size=\"x-large\" weight=\"bold\">";
4691 const char* end_big =
"</span>";
4692 const char* start_mono =
"<tt>";
4693 const char* end_mono =
"</tt>";
4695 MessageDialog msg (
string_compose (
_(
"%4This is a session from an older version of %3%5\n\n"
4696 "%3 has copied the old session file\n\n%6%1%7\n\nto\n\n%6%2%7\n\n"
4697 "From now on, use the -2000 version with older versions of %3"),
4698 xml_path, backup_path, PROGRAM_NAME,
4700 start_mono, end_mono),
true);
4740 case Gtk::RESPONSE_OK:
4742 case Gtk::RESPONSE_APPLY:
4804 MessageDialog msg (
string_compose (
_(
"This is a free/demo copy of %1. It has just switched to silent mode."), PROGRAM_NAME),
4806 Gtk::MESSAGE_WARNING,
4812 Gtk::Label pay_label (
string_compose (
_(
"Please consider paying for a copy of %1 - you can pay whatever you want."), PROGRAM_NAME));
4813 Gtk::Label subscribe_label (
_(
"Better yet become a subscriber - subscriptions start at US$1 per month."));
4814 Gtk::Button pay_button (
_(
"Pay for a copy (via the web)"));
4815 Gtk::Button subscribe_button (
_(
"Become a subscriber (via the web)"));
4816 Gtk::HBox pay_button_box;
4817 Gtk::HBox subscribe_button_box;
4819 pay_button_box.pack_start (pay_button,
true,
false);
4820 subscribe_button_box.pack_start (subscribe_button,
true,
false);
4824 pay_button.signal_clicked().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (openuri), (
const char*)
"https://ardour.org/download")));
4825 subscribe_button.signal_clicked().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (openuri), (
const char*)
"https://community.ardour.org/s/subscribe")));
4827 msg.get_vbox()->pack_start (pay_label);
4828 msg.get_vbox()->pack_start (pay_button_box);
4829 msg.get_vbox()->pack_start (subscribe_label);
4830 msg.get_vbox()->pack_start (subscribe_button_box);
4832 msg.get_vbox()->show_all ();
4834 msg.add_button (
_(
"Remain silent"), Gtk::RESPONSE_CANCEL);
4835 msg.add_button (
_(
"Save and quit"), Gtk::RESPONSE_NO);
4836 msg.add_button (
_(
"Give me more time"), Gtk::RESPONSE_YES);
4841 case Gtk::RESPONSE_YES:
4842 AudioEngine::instance()->reset_silence_countdown ();
4845 case Gtk::RESPONSE_NO:
4851 case Gtk::RESPONSE_CANCEL:
static Splash * instance()
framepos_t audible_frame() const
bool transport_rolling() const
void set_order_key(uint32_t)
double timecode_frames_per_second() const
framepos_t current_time(framepos_t position=0) const
boost::shared_ptr< RouteList > get_tracks() const
framecnt_t nominal_frame_rate() const
void set_record_enabled(bool yn, void *src)
bool use_session_template()
ARDOUR::ChanCount channels()
unsigned int get_xrun_count() const
sigc::connection second_connection
void goto_editor_window()
WM::ProxyWithConstructor< BundleManager > bundle_manager
void check_memory_locking()
int pending_state_dialog()
void update_transport_clocks(framepos_t pos)
void secondary_clock_value_changed()
int reconnect_to_engine()
void set_state(XMLNode const &)
void transport_forward(int option)
ArdourKeyboard * keyboard
RecentSessionModelColumns recent_session_columns
void announce(const char *appliction_name, const char *capabilities, const char *process_name)
void set_offset(ARDOUR::frameoffset_t offset)
void transport_rec_enable_blink(bool onoff)
void set(framepos_t, bool force=false, ARDOUR::framecnt_t offset=0)
int save_template(std::string template_name)
Gtk::TreeModelColumn< std::string > visible_name
ARDOUR::frameoffset_t get_offset()
dialog-box and controller for importing video-files
void build_session_selector()
WM::ProxyWithConstructor< SessionOptionEditor > session_option_editor
virtual void embed_audio_from_video(std::string, framepos_t n=0, bool lock_position_to_video=true)=0
const char * client_id(void)
ARDOUR_UI(int *argcp, char **argvp[], const char *localedir)
XMLNode * editor_settings() const
Location * auto_loop_location() const
void create_xrun_marker(framepos_t)
const std::string & value() const
WM::Proxy< EngineControl > audio_midi_setup
std::string get_filename()
void xrun_handler(framepos_t)
MainClock * primary_clock
void message(const std::string &msg)
bool first_time_engine_run
sigc::connection point_one_second_connection
bool create_master_bus() const
double transport_speed() const
int get_session_parameters(bool quit_on_cancel, bool should_be_new=false, std::string load_template="")
void maybe_write_autosave()
bool include_media() const
void set_single_package()
const std::string root_path() const
static PBD::Signal2< int, framecnt_t, framecnt_t > AskAboutSampleRateMismatch
std::vector< Glib::RefPtr< Gtk::Action > > engine_opposite_sensitive_actions
int rename(const std::string &)
sigc::signal< void > DPIReset
int unload_session(bool hide_stuff=false)
void clear_meters(bool reset_highlight=true)
static std::vector< AudioClock * > clocks
int sr_mismatch_dialog(ARDOUR::framecnt_t, ARDOUR::framecnt_t)
struct tm * localtime_r(const time_t *const timep, struct tm *p_tm)
AutoConnectOption output_ac
bool actively_recording() const
void reset_peak_display()
const std::string video_path() const
void step_edit_status_change(bool)
WM::ProxyWithConstructor< GlobalPortMatrixWindow > midi_port_matrix
void transport_record(bool roll)
bool get_play_loop() const
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
static PBD::Signal2< int, std::string, std::vector< std::string > > AmbiguousFileName
static ARDOUR_UI * instance()
static PBD::Signal0< void > DiskUnderrun
static void set_constant_heights()
bool save_as_progress_update(float fraction, int64_t cnt, int64_t total, Gtk::Label *label, Gtk::ProgressBar *bar)
void pop_back_splash(Gtk::Window &)
static PBD::Signal1< void, std::string > Dialog
void session_add_audio_route(bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &)
virtual void toggle_ruler_video(bool)=0
virtual void finish_cleanup()=0
virtual void play_selection()=0
bool start_video_server(Gtk::Window *float_window, bool popup_msg)
std::vector< Glib::RefPtr< Gtk::Action > > engine_sensitive_actions
int set_state(const XMLNode &, int version)
static void close_all_dialogs()
void maybe_enable_record()
bool connect_outs_to_master() const
static Manager & instance()
std::deque< std::pair< std::string, std::string > > RecentSessions
LIBGTKMM2EXT_API Glib::RefPtr< Gtk::Action > get_action(const char *group, const char *name)
void export_video(bool range=false)
void audioengine_became_silent()
LIBARDOUR_API PBD::Signal1< void, int > PluginScanTimeout
void toggle_roll(bool with_abort, bool roll_out_of_bounded_mode)
Gtk::Window * get(bool create=false)
void set_record_enabled(boost::shared_ptr< RouteList >, bool, SessionEvent::RTeventCallback after=rt_cleanup, bool group_override=false)
int output_limit_count() const
ARDOUR::SystemExec * video_server_process
void successful_graph_sort()
virtual Timecode::TimecodeFormat apparent_timecode_format() const =0
LIBARDOUR_API int handle_old_configuration_files(boost::function< bool(std::string const &, std::string const &, int)> ui_handler)
bool is_auditioning() const
void transport_goto_start()
LIBPBD_API Transmitter error
LIBPBD_API Transmitter warning
bool get_play_range() const
bool step_editing() const
void toggle_follow_edits()
UIConfiguration * ui_config
RouteList new_route_from_template(uint32_t how_many, const std::string &template_path, const std::string &name)
WM::Proxy< LocationUIWindow > location_ui
static PBD::Signal1< int, uint32_t > AudioEngineSetupRequired
sigc::connection fps_connection
std::ostream & endmsg(std::ostream &ostr)
SessionConfiguration config
Gtk::Label buffer_load_label
boost::shared_ptr< TransportControllable > roll_controllable
const std::string dead_path() const
void request_play_loop(bool yn, bool leave_rolling=false)
#define P_(Singular, Plural, HowMany)
void transport_play_selection()
RecordState record_status() const
void cancel_plugin_scan()
virtual void center_screen(framepos_t)=0
void set_desired_sample_rate(uint32_t)
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > start
PBD::Signal3< bool, float, int64_t, int64_t > Progress
void session_format_mismatch(std::string, std::string)
void show_visible() const
void request_locate(framepos_t frame, bool with_roll=false)
VtlImportOption import_option()
void map_transport_state()
void register_window(ProxyBase *)
framecnt_t frame_rate() const
void flush_videotimeline_cache(bool localcacheonly=false)
XMLNode * instant_xml(const std::string &str)
void disk_overrun_handler()
void map_parameters(boost::function< void(std::string)> &)
float editor_meter_max_peak
#define ENSURE_GUI_THREAD(obj, method,...)
int build_session_from_dialog(SessionDialog &, const std::string &session_name, const std::string &session_path)
GUIObjectState * gui_object_state
LIBARDOUR_API PBD::Signal0< void > GUIIdle
int toggle_file_existence(string const &path)
void set_initial_text(std::string txt)
void reset_group_peak_display(ARDOUR::RouteGroup *)
virtual void set_xjadeo_sensitive(bool onoff)=0
void toggle_auto_return()
static ARDOUR_UI * theArdourUI
std::string get_docroot()
void recent_session_row_activated(const Gtk::TreePath &path, Gtk::TreeViewColumn *col)
TypeWanted type_wanted() const
int ambiguous_file(std::string file, std::vector< std::string > hits)
void every_point_one_seconds()
MainClock * secondary_clock
void set_transport_controllable_state(const XMLNode &)
virtual void queue_visual_videotimeline_update()=0
ArdourButton goto_start_button
XMLNode * mixer_settings() const
virtual bool dragging_playhead() const =0
void update_buffer_load()
dialog box to collect video-server settings
PBD::ScopedConnection halt_connection
LIBARDOUR_API microseconds_t get_microseconds()
ArdourButton auto_loop_button
bool video_file_info(std::string, bool)
void record_state_changed()
bool auto_set_session_fps()
std::string _announce_string
LIBGTKMM2EXT_API void set_sensitive(std::vector< Glib::RefPtr< Gtk::Action > > &actions, bool)
void save_session_at_its_request(std::string)
void start_video_server_menu(Gtk::Window *float_window)
LIBARDOUR_API std::string user_config_directory(int version=-1)
bool connect_outs_to_physical() const
void stop_video_server(bool ask_confirm=false)
void transport_goto_zero()
sigc::signal< void > ShouldQuit
WM::ProxyWithConstructor< BigClockWindow > big_clock_window
static PBD::Signal0< void > FeedbackDetected
void allow_auto_play(bool yn)
void launch_howto_report()
bool caller_is_ui_thread()
void save_state(const std::string &state_name="", bool switch_to_it=false)
void request_stop(bool abort=false, bool clear_state=false)
int load_session(const std::string &path, const std::string &snapshot, std::string mix_template=std::string())
void sync_session_state()
LIBARDOUR_API void init_post_engine()
uint32_t rec_enabled_streams
gboolean configure_handler(GdkEventConfigure *conf)
XMLProperty * property(const char *)
uint32_t order_key() const
LIBARDOUR_API RCConfiguration * Config
void update_timecode_format()
GlobalPortMatrixWindow * create_global_port_matrix(ARDOUR::DataType)
int input_limit_count() const
static const char * localedir
void set_prompt(std::string prompt)
ArdourButton goto_end_button
gint transport_numpad_timeout()
void plugin_scan_dialog(std::string type, std::string plugin, bool)
VideoTimeLine * video_timeline
LIBPBD_API void pthread_cancel_all()
void remove_pending_capture_state()
virtual void first_idle()=0
WM::ProxyWithConstructor< GlobalPortMatrixWindow > audio_port_matrix
Gtk::Label disk_space_label
sigc::connection clock_signal_connection
ArdourButton midi_panic_button
void load_rc_file(bool themechange, bool allow_own=true)
int master_channel_count() const
void display_cleanup_results(ARDOUR::CleanupReport &rep, const gchar *list_title, const bool msg_delete)
void session_add_midi_track(ARDOUR::RouteGroup *route_group, uint32_t how_many, std::string const &name_template, ARDOUR::PluginInfoPtr instrument)
static PBD::Signal0< void > Quit
framepos_t transport_frame() const
void setup_order_hint(AddRouteDialog::InsertAt)
boost::shared_ptr< Route > master_out() const
SaveAsDialog * save_as_dialog
void request_transport_speed(double speed, bool as_default=false)
void big_clock_value_changed()
double get_value(void) const
void check(int timeout=0)
void session_add_midi_route(bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, ARDOUR::PluginInfoPtr)
std::string new_parent_folder
void set_fps_interval(unsigned int interval)
static ProgressBar * scan_pbar
void disk_speed_dialog_gone(int ignored_response, Gtk::MessageDialog *)
void audition_blink(bool)
bool connect_outputs() const
void foreach_route(T *obj, void(T::*func)(Route &), bool sort=true)
boost::shared_ptr< TransportControllable > play_selection_controllable
std::string load_template
bool name_template_is_default() const
boost::shared_ptr< TransportControllable > auto_loop_controllable
AutoConnectOption input_ac
int do_audio_midi_setup(uint32_t)
void toggle_record_enable(uint32_t)
void set_nsm_state(bool state)
void add_controllable(boost::shared_ptr< PBD::Controllable >)
static PBD::Signal2< void, std::string, std::string > VersionMismatch
void disk_underrun_handler()
boost::shared_ptr< RouteList > get_routes() const
VisibilityGroup _status_bar_visibility
bool connect_inputs() const
uint32_t requested_physical_out
TransportControllable(std::string name, ARDOUR_UI &, ToggleType)
std::string get_listenaddr()
bool record_enabled() const
virtual Selection & get_selection() const =0
virtual void play_with_preroll()=0
Gtk::Tooltips & tooltips()
int cleanup_trash_sources(CleanupReport &)
RouteList new_audio_route(int input_channels, int output_channels, RouteGroup *route_group, uint32_t how_many, std::string name_template="")
bool have_disk_speed_dialog_displayed
WM::Proxy< ExportVideoDialog > export_video_dialog
void transport_numpad_decimal()
void maybe_update_session_range(framepos_t, framepos_t)
int init(const char *nsm_url)
ArdourDialog * session_selector_window
LIBARDOUR_API std::vector< std::string > get_file_names_no_extension(const std::vector< std::string > &file_paths)
ChanCount n_inputs() const
void halt_on_xrun_message()
PBD::Signal1< void, std::string > ParameterChanged
void loading_message(const std::string &msg)
LIBPBD_API Transmitter info
std::string get_audiofile()
LIBPBD_API bool open_uri(const char *)
LIBARDOUR_API RuntimeProfile * Profile
WM::Proxy< AddRouteDialog > add_route_dialog
boost::shared_ptr< TransportControllable > stop_controllable
void get_result(std::string &str, bool strip=true)
virtual void toggle_xjadeo_proc(int)=0
void transport_goto_end()
void disable_record(bool rt_context, bool force=false)
static PBD::Signal0< void > SuccessfulGraphSort
void launch_website_dev()
WM::Proxy< SpeakerDialog > speaker_config_window
void set_tip(Gtk::Widget &w, const gchar *tip)
LIBARDOUR_API const char *const statefile_suffix
void feedback_blink(bool)
void call_slot(EventLoop::InvalidationRecord *, const boost::function< void()> &)
void primary_clock_value_changed()
void setup_gtk_ardour_enums()
void set_state(const XMLNode &)
void map_transport_state()
void map_parameters(boost::function< void(std::string)> &)
sigc::connection _numpad_timeout_connection
XMLProperty * add_property(const char *name, const std::string &value)
bool copy_external() const
void add(Location *, bool make_current=false)
sigc::signal< void, const Glib::ustring & > ShouldLoad
LIBPBD_API Glib::ustring basename_nosuffix(Glib::ustring)
boost::shared_ptr< Route > route_by_remote_id(uint32_t id)
static MessageDialog * scan_dlg
std::string snap_name() const
ArdourButton play_selection_button
ARDOUR::framepos_t start()
LIBARDOUR_API void cleanup()
void set_order_hint(int32_t order_hint)
int start(int stderr_mode=1)
void session_add_audio_bus(int input_channels, int32_t output_channels, ARDOUR::RouteGroup *route_group, uint32_t how_many, std::string const &name_template)
void add_child_nocopy(XMLNode &)
void transport_goto_wallclock()
Gtk::TreeModelColumn< std::string > tip
LIBGTKMM2EXT_API void init(const char *)
std::string final_session_folder_name
static sigc::signal< void > CloseAllDialogs
framepos_t current_end_frame() const
LIBARDOUR_API int read_recent_sessions(RecentSessions &rs)
void request_play_range(std::list< AudioRange > *, bool leave_rolling=false)
bool get_smart_mode() const
std::string track_template()
WM::Proxy< KeyEditor > key_editor
bool have_configure_timeout
void redisplay_recent_sessions()
XMLNode * instant_xml(const std::string &str)
framepos_t current_start_frame() const
void count_recenabled_streams(ARDOUR::Route &)
LIBARDOUR_API void get_state_files_in_directory(const std::string &directory_path, std::vector< std::string > &result)
std::string new_parent_folder() const
bool ask_about_loading_existing_session(const std::string &session_path)
uint32_t requested_physical_in
RouteGroup * route_group() const
std::list< boost::shared_ptr< AudioTrack > > new_audio_track(int input_channels, int output_channels, TrackMode mode=Normal, RouteGroup *route_group=0, uint32_t how_many=1, std::string name_template="")
ARDOUR::RouteGroup * route_group()
void remove_property(const std::string &)
void set_requested_return_frame(framepos_t return_to)
static UIConfiguration * config()
void add_instant_xml(XMLNode &, bool write_to_config=true)
The instant xml file is written to the session directory.
void launch_cheat_sheet()
virtual framepos_t get_preferred_edit_position(Editing::EditIgnoreOption=Editing::EDIT_IGNORE_NONE, bool from_context_menu=false, bool from_outside_canvas=false)=0
PBD::ScopedConnectionList forever_connections
void set(DataType t, uint32_t count)
WM::Proxy< RCOptionEditor > rc_option_editor
Gtk::TreeView recent_session_display
LIBARDOUR_API PBD::Signal1< void, std::string > BootMessage
sigc::connection fps_connect(const sigc::slot< void > &slot)
void update_sample_rate(ARDOUR::framecnt_t)
boost::optional< framecnt_t > available_capture_duration()
void session_dialog(std::string)
std::string file_name(bool &local_file)
void engine_halted(const char *reason, bool free_reason)
void cancel_plugin_timeout()
boost::shared_ptr< TransportControllable > rec_controllable
XMLNode * extra_xml(const std::string &str, bool add_if_missing=false)
static void set_connecting_blocked(bool yn)
void session_add_mixed_track(const ARDOUR::ChanCount &input, const ARDOUR::ChanCount &output, ARDOUR::RouteGroup *route_group, uint32_t how_many, std::string const &name_template, ARDOUR::PluginInfoPtr instrument)
LIBARDOUR_API uint64_t MTC
ARDOUR::ProcessThread * _process_thread
bool _numpad_locate_happening
virtual void ensure_float(Gtk::Window &)=0
void set_session(ARDOUR::Session *)
Gtk::TreeModelColumn< std::string > fullpath
void transport_numpad_event(int num)
std::list< std::string > unknown_processors() const
bool have_rec_enabled_track() const
static sigc::signal< void, framepos_t, bool, framepos_t > Clock
uint32_t master_out_channels
boost::shared_ptr< ShuttleControllable > controllable() const
ARDOUR::framecnt_t get_duration()
std::list< boost::shared_ptr< MidiTrack > > new_midi_track(const ChanCount &input, const ChanCount &output, boost::shared_ptr< PluginInfo > instrument=boost::shared_ptr< PluginInfo >(), TrackMode mode=Normal, RouteGroup *route_group=0, uint32_t how_many=1, std::string name_template="")
sigc::signal< void, std::string > ParameterChanged
void parameter_changed(std::string)
LIBARDOUR_API int find_session(std::string str, std::string &path, std::string &snapshot, bool &isnew)
Gtk::FileChooserDialog * open_session_selector
void transport_rewind(int option)
LIBARDOUR_API PBD::Signal3< void, std::string, std::string, bool > PluginScanMessage
void every_point_zero_something_seconds()
WM::Proxy< RouteParams_UI > route_params
ArdourButton editor_meter_peak_display
virtual void set_session(ARDOUR::Session *)
LIBARDOUR_API GQuark capture
void session_add_audio_track(int input_channels, int32_t output_channels, ARDOUR::TrackMode mode, ARDOUR::RouteGroup *route_group, uint32_t how_many, std::string const &name_template)
int save_state(std::string snapshot_name, bool pending=false, bool switch_to_snapshot=false, bool template_only=false)
LIBGTKMM2EXT_API void get_all_actions(std::vector< std::string > &names, std::vector< std::string > &paths, std::vector< std::string > &tooltips, std::vector< std::string > &keys, std::vector< Gtk::AccelKey > &bindings)
std::string session_folder()
std::string immediate_save
std::string name_template() const
int missing_file(ARDOUR::Session *s, std::string str, ARDOUR::DataType type)
ARDOUR::PluginInfoPtr requested_instrument()
XMLNode * keyboard_settings() const
static const framecnt_t max_framecnt
sigc::connection point_zero_something_second_connection
int cleanup_sources(CleanupReport &)
Gtk::Label cpu_load_label
void open_recent_session()
int disconnect_from_engine()
static PBD::Signal3< int, Session *, std::string, DataType > MissingFile
void drop_process_buffers()
const SessionDirectory & session_directory() const
void resize_text_widgets()
int build_session(const std::string &path, const std::string &snapshot, ARDOUR::BusProfile &)
void toggle_session_auto_loop()
void add_state(XMLNode &) const
void add_extra_xml(XMLNode &)
Glib::RefPtr< Gtk::TreeStore > recent_session_model
void remove_nodes_and_delete(const std::string &)
LevelMeterHBox * editor_meter
bool trx_record_enable_all_tracks()
void snapshot_session(bool switch_to_it)
std::string get_exec_path()
LIBARDOUR_API uint64_t LTC
sigc::connection _autosave_connection
#define MISSING_INVALIDATOR
std::string session_name(bool &should_be_new)
void add_instant_xml(XMLNode &)
sigc::connection rapid_connect(const sigc::slot< void > &slot)
std::list< boost::shared_ptr< Route > > RouteList
boost::shared_ptr< TransportControllable > goto_start_controllable
void set_offset_locked(bool v)
int save_state_canfail(std::string state_name="", bool switch_to_it=false)
int ask_about_saving_session(const std::vector< std::string > &actions)
void set_fps_timeout_connection()
void manual_seek_video_monitor(framepos_t pos)
std::string new_name() const
void apply_state(TimeSelection &tme, bool range)
WM::ProxyWithConstructor< AddVideoDialog > add_video_dialog
ARDOUR::microseconds_t last_configure_time
void add_route(Gtk::Window *float_window)
void set_hidden(bool yn, void *src)
ARDOUR::Session * _session
boost::shared_ptr< ARDOUR::Route > route() const
void get_process_buffers()
Editing of options which are obtained from and written back to one of the .rc files.
void add_video(Gtk::Window *float_window)
static PBD::Signal0< int > AskAboutPendingState
Gtk::Label wall_clock_label
std::vector< std::string > paths
boost::shared_ptr< TransportControllable > goto_end_controllable
XMLNode & get_state() const
std::string string_compose(const std::string &fmt, const T1 &o1)
virtual void reset_x_origin(framepos_t frame)=0
Gtk::Label timecode_format_label
void reset_route_peak_display(ARDOUR::Route *)
Gtk::Label sample_rate_label
ShuttleControl * shuttle_box
virtual bool get_smart_mode() const =0
void load_from_application_api(const std::string &path)
void set_update_session_fps(bool v=true)
XMLNode & get_transport_controllable_state()
virtual void goto_nth_marker(int nth)=0
static PBD::Signal0< void > DiskOverrun
void pop_back_for(Gtk::Window &)
void plugin_scan_timeout(int)
VtlTranscodeOption import_option()
void transport_play_preroll()
virtual void prepare_for_cleanup()=0
void popup_error(const std::string &text)
std::string session_template_name()
void check_announcements()
static bool ask_about_configuration_copy(string const &old_dir, string const &new_dir, int version)
void pingback(const string &version, const string &announce_path)
bool check_server_docroot()
std::string failure_message
optional info box regarding video-export