return;
}
add_route_dialog->ArdourDialog::on_response (r);
- MessageDialog msg (_("Not connected to audio engine - Adding Tracks/Busses is not possible"));
- msg.run ();
+ ARDOUR_UI_UTILS::no_engine_notify ();
return;
}
const SelectionData& data,
guint info, guint time)
{
+ if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ return;
+ }
if (data.get_target() == "regions") {
drop_regions (context, x, y, data, info, time);
} else {
RouteTimeAxisView*
RegionMoveDrag::create_destination_time_axis (boost::shared_ptr<Region> region, TimeAxisView* original)
{
- if (!AudioEngine::instance()->running ()) {
- error << _("Not connected to audio engine - Could not create new track after region placed in the drop zone") << endmsg;
+ if (ARDOUR_UI_UTILS::no_engine_notify ()) {
return NULL;
}
#include "widgets/prompter.h"
#include "ardour/audio_track.h"
-#include "ardour/audioengine.h"
#include "ardour/audioregion.h"
#include "ardour/boost_debug.h"
#include "ardour/dB.h"
#include "transpose_dialog.h"
#include "transform_dialog.h"
#include "ui_config.h"
+#include "utils.h"
#include "vca_time_axis.h"
#include "pbd/i18n.h"
return;
}
- if (!AudioEngine::instance()->running ()) {
- MessageDialog msg (_("Not connected to audio engine - Removing Tracks/Busses is not possible"));
- msg.run ();
+ if (ARDOUR_UI_UTILS::no_engine_notify ()) {
return;
}
MixerStrip::output_press (GdkEventButton *ev)
{
using namespace Menu_Helpers;
- if (!_session->engine().connected()) {
- MessageDialog msg (_("Not connected to audio engine - no I/O changes are possible"));
- msg.run ();
+ if (ARDOUR_UI_UTILS::no_engine_notify ()) {
return true;
}
input_menu.set_name ("ArdourContextMenu");
citems.clear();
- if (!_session->engine().connected()) {
- MessageDialog msg (_("Not connected to audio engine - no I/O changes are possible"));
- msg.run ();
+ if (ARDOUR_UI_UTILS::no_engine_notify ()) {
return true;
}
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (processor)) != 0) {
- if (!_session->engine().connected()) {
- MessageDialog msg ( _("Not connected to audio engine - no I/O changes are possible"));
- msg.run ();
+ if (ARDOUR_UI_UTILS::no_engine_notify ()) {
return 0;
}
void
RouteUI::fan_out (bool to_busses, bool group)
{
- if (!AudioEngine::instance()->running ()) {
- MessageDialog msg (_("Not connected to audio engine - Fanning out to Tracks/Busses is not possible"));
- msg.run ();
+ if (ARDOUR_UI_UTILS::no_engine_notify ()) {
return;
}
{
SoundFileBrowser::do_something (action);
- if (action == RESPONSE_CLOSE) {
+ if (action == RESPONSE_CLOSE || ARDOUR_UI_UTILS::no_engine_notify ()) {
hide ();
return;
}