#include "actions.h"
#include "add_route_dialog.h"
#include "ambiguous_file_dialog.h"
+#include "ardour_message.h"
#include "ardour_ui.h"
#include "audio_clock.h"
#include "audio_region_view.h"
static bool
ask_about_configuration_copy (string const & old_dir, string const & new_dir, int version)
{
- MessageDialog msg (string_compose (_("%1 %2.x has discovered configuration files from %1 %3.x.\n\n"
- "Would you like these files to be copied and used for %1 %2.x?\n\n"
- "(This will require you to restart %1.)"),
- PROGRAM_NAME, PROGRAM_VERSION, version),
- false, /* no markup */
- Gtk::MESSAGE_INFO,
- Gtk::BUTTONS_YES_NO,
- true /* modal, though it hardly matters since it is the only window */
+ ArdourMessageDialog msg (string_compose (
+ _("%1 %2.x has discovered configuration files from %1 %3.x.\n\n"
+ "Would you like these files to be copied and used for %1 %2.x?\n\n"
+ "(This will require you to restart %1.)"),
+ PROGRAM_NAME, PROGRAM_VERSION, version),
+ false, /* no markup */
+ Gtk::MESSAGE_INFO,
+ Gtk::BUTTONS_YES_NO,
+ true /* modal, though it hardly matters since it is the only window */
);
msg.set_default_response (Gtk::RESPONSE_YES);
/* "touch" the been-here-before path now that config has been migrated */
PBD::ScopedFileDescriptor fout (g_open (been_here_before_path ().c_str(), O_CREAT|O_TRUNC|O_RDWR, 0666));
}
- MessageDialog msg (string_compose (_("Your configuration files were copied. You can now restart %1."), PROGRAM_NAME), true);
+ ArdourMessageDialog msg (string_compose (_("Your configuration files were copied. You can now restart %1."), PROGRAM_NAME), true);
msg.run ();
/* configuration was modified, exit immediately */
_exit (EXIT_SUCCESS);
the audio backend and save the session."), PROGRAM_NAME);
}
- MessageDialog msg (_main_window, msgstr);
- pop_back_splash (msg);
+ ArdourMessageDialog msg (_main_window, msgstr);
msg.run ();
if (free_reason) {
#endif
}
-void
-ARDOUR_UI::pop_back_splash (Gtk::Window& win)
-{
- if (Splash::exists()) {
- Splash::instance()->pop_back_for (win);
- }
-}
-
gint
ARDOUR_UI::configure_timeout ()
{
/* use the default name */
if (save_state_canfail ("")) {
/* failed - don't quit */
- MessageDialog msg (_main_window,
+ ArdourMessageDialog msg (_main_window,
string_compose (_("\
%1 was unable to save your session.\n\n\
If you still wish to quit, please use the\n\n\
\"Just quit\" option."), PROGRAM_NAME));
- pop_back_splash(msg);
msg.run ();
return;
}
if (!opt_samples) {
/* Available space is unknown */
format_disk_space_label (-1);
- } else if (opt_samples.get_value_or (0) == max_samplecnt) {
+ } else if (opt_samples.value_or (0) == max_samplecnt) {
format_disk_space_label (max_samplecnt);
} else {
rec_enabled_streams = 0;
_session->foreach_route (this, &ARDOUR_UI::count_recenabled_streams, false);
- samplecnt_t samples = opt_samples.get_value_or (0);
+ samplecnt_t samples = opt_samples.value_or (0);
if (rec_enabled_streams) {
samples /= rec_enabled_streams;
void
ARDOUR_UI::display_insufficient_ports_message ()
{
- MessageDialog msg (_main_window,
+ ArdourMessageDialog msg (_main_window,
string_compose (_("There are insufficient ports available\n\
to create a new track or bus.\n\
You should save %1, exit and\n\
restart with more ports."), PROGRAM_NAME));
- pop_back_splash (msg);
msg.run ();
}
switch (_session->record_status()) {
case Session::Disabled:
if (_session->ntracks() == 0) {
- MessageDialog msg (_main_window, _("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."));
+ ArdourMessageDialog msg (_main_window, _("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."));
msg.run ();
return;
}
break;
case Session::Enabled:
- _session->disable_record (false, true);
+ if (roll) {
+ transport_roll();
+ } else {
+ _session->disable_record (false, true);
+ }
}
}
}
{
if (!_session) {
layered_button.set_sensitive (false);
+ if (UIConfiguration::instance().get_screen_saver_mode () == InhibitWhileRecording) {
+ inhibit_screensaver (false);
+ }
return;
}
removed = rep.paths.size();
if (removed == 0) {
- MessageDialog msgd (_main_window,
- _("No files were ready for clean-up"),
- true,
- Gtk::MESSAGE_INFO,
- Gtk::BUTTONS_OK);
+ ArdourMessageDialog msgd (_main_window,
+ _("No files were ready for clean-up"),
+ true,
+ Gtk::MESSAGE_INFO,
+ Gtk::BUTTONS_OK);
msgd.set_title (_("Clean-up"));
msgd.set_secondary_text (_("If this seems surprising, \n\
check for any existing snapshots.\n\
}
- MessageDialog checker (_("Are you sure you want to clean-up?"),
- true,
- Gtk::MESSAGE_QUESTION,
- Gtk::BUTTONS_NONE);
+ ArdourMessageDialog checker (_("Are you sure you want to clean-up?"),
+ true,
+ Gtk::MESSAGE_QUESTION,
+ Gtk::BUTTONS_NONE);
checker.set_title (_("Clean-up"));
if (!have_disk_speed_dialog_displayed) {
have_disk_speed_dialog_displayed = true;
- MessageDialog* msg = new MessageDialog (_main_window, string_compose (_("\
+ ArdourMessageDialog* msg = new ArdourMessageDialog (_main_window, string_compose (_("\
The disk system on your computer\n\
was not able to keep up with %1.\n\
\n\
if (!have_disk_speed_dialog_displayed) {
have_disk_speed_dialog_displayed = true;
- MessageDialog* msg = new MessageDialog (
+ ArdourMessageDialog* msg = new ArdourMessageDialog (
_main_window, string_compose (_("The disk system on your computer\n\
was not able to keep up with %1.\n\
\n\
ARDOUR_UI::session_dialog (std::string msg)
{
ENSURE_GUI_THREAD (*this, &ARDOUR_UI::session_dialog, msg)
-
- MessageDialog* d;
-
- d = new MessageDialog (msg, false, MESSAGE_INFO, BUTTONS_OK, true);
- d->show_all ();
- d->run ();
- delete d;
+ ArdourMessageDialog d (msg, false, MESSAGE_INFO, BUTTONS_OK, true);
+ d.run ();
}
int