Use central method to check for engine where required
These are generally places where tracks/busses are created or port connections change.
This commit is contained in:
parent
415721fa5b
commit
f150f6c074
|
@ -4362,8 +4362,7 @@ ARDOUR_UI::add_route_dialog_response (int r)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
add_route_dialog->ArdourDialog::on_response (r);
|
add_route_dialog->ArdourDialog::on_response (r);
|
||||||
MessageDialog msg (_("Not connected to audio engine - Adding Tracks/Busses is not possible"));
|
ARDOUR_UI_UTILS::no_engine_notify ();
|
||||||
msg.run ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -373,6 +373,9 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context
|
||||||
const SelectionData& data,
|
const SelectionData& data,
|
||||||
guint info, guint time)
|
guint info, guint time)
|
||||||
{
|
{
|
||||||
|
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (data.get_target() == "regions") {
|
if (data.get_target() == "regions") {
|
||||||
drop_regions (context, x, y, data, info, time);
|
drop_regions (context, x, y, data, info, time);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1428,8 +1428,7 @@ RegionMoveDrag::finished (GdkEvent* ev, bool movement_occurred)
|
||||||
RouteTimeAxisView*
|
RouteTimeAxisView*
|
||||||
RegionMoveDrag::create_destination_time_axis (boost::shared_ptr<Region> region, TimeAxisView* original)
|
RegionMoveDrag::create_destination_time_axis (boost::shared_ptr<Region> region, TimeAxisView* original)
|
||||||
{
|
{
|
||||||
if (!AudioEngine::instance()->running ()) {
|
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
error << _("Not connected to audio engine - Could not create new track after region placed in the drop zone") << endmsg;
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "widgets/prompter.h"
|
#include "widgets/prompter.h"
|
||||||
|
|
||||||
#include "ardour/audio_track.h"
|
#include "ardour/audio_track.h"
|
||||||
#include "ardour/audioengine.h"
|
|
||||||
#include "ardour/audioregion.h"
|
#include "ardour/audioregion.h"
|
||||||
#include "ardour/boost_debug.h"
|
#include "ardour/boost_debug.h"
|
||||||
#include "ardour/dB.h"
|
#include "ardour/dB.h"
|
||||||
|
@ -111,6 +110,7 @@
|
||||||
#include "transpose_dialog.h"
|
#include "transpose_dialog.h"
|
||||||
#include "transform_dialog.h"
|
#include "transform_dialog.h"
|
||||||
#include "ui_config.h"
|
#include "ui_config.h"
|
||||||
|
#include "utils.h"
|
||||||
#include "vca_time_axis.h"
|
#include "vca_time_axis.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
@ -7421,9 +7421,7 @@ Editor::_remove_tracks ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AudioEngine::instance()->running ()) {
|
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
MessageDialog msg (_("Not connected to audio engine - Removing Tracks/Busses is not possible"));
|
|
||||||
msg.run ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -873,9 +873,7 @@ gint
|
||||||
MixerStrip::output_press (GdkEventButton *ev)
|
MixerStrip::output_press (GdkEventButton *ev)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
if (!_session->engine().connected()) {
|
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
MessageDialog msg (_("Not connected to audio engine - no I/O changes are possible"));
|
|
||||||
msg.run ();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -989,9 +987,7 @@ MixerStrip::input_press (GdkEventButton *ev)
|
||||||
input_menu.set_name ("ArdourContextMenu");
|
input_menu.set_name ("ArdourContextMenu");
|
||||||
citems.clear();
|
citems.clear();
|
||||||
|
|
||||||
if (!_session->engine().connected()) {
|
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
MessageDialog msg (_("Not connected to audio engine - no I/O changes are possible"));
|
|
||||||
msg.run ();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3720,9 +3720,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr<Processor> processor, bool us
|
||||||
|
|
||||||
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (processor)) != 0) {
|
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (processor)) != 0) {
|
||||||
|
|
||||||
if (!_session->engine().connected()) {
|
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
MessageDialog msg ( _("Not connected to audio engine - no I/O changes are possible"));
|
|
||||||
msg.run ();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2323,9 +2323,7 @@ RouteUI::manage_pins ()
|
||||||
void
|
void
|
||||||
RouteUI::fan_out (bool to_busses, bool group)
|
RouteUI::fan_out (bool to_busses, bool group)
|
||||||
{
|
{
|
||||||
if (!AudioEngine::instance()->running ()) {
|
if (ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
MessageDialog msg (_("Not connected to audio engine - Fanning out to Tracks/Busses is not possible"));
|
|
||||||
msg.run ();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2057,7 +2057,7 @@ SoundFileOmega::do_something (int action)
|
||||||
{
|
{
|
||||||
SoundFileBrowser::do_something (action);
|
SoundFileBrowser::do_something (action);
|
||||||
|
|
||||||
if (action == RESPONSE_CLOSE) {
|
if (action == RESPONSE_CLOSE || ARDOUR_UI_UTILS::no_engine_notify ()) {
|
||||||
hide ();
|
hide ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user