summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/ardour_ui.cc2
-rw-r--r--gtk2_ardour/editor_canvas.cc2
-rw-r--r--gtk2_ardour/editor_drag.cc2
-rw-r--r--gtk2_ardour/editor_ops.cc2
-rw-r--r--gtk2_ardour/mixer_strip.cc4
-rw-r--r--gtk2_ardour/processor_box.cc14
-rw-r--r--gtk2_ardour/route_ui.cc2
-rw-r--r--gtk2_ardour/sfdb_ui.cc2
-rw-r--r--gtk2_ardour/utils.cc6
-rw-r--r--gtk2_ardour/utils.h5
10 files changed, 19 insertions, 22 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 148bf0317e..a86d9ac9b5 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -4362,7 +4362,7 @@ ARDOUR_UI::add_route_dialog_response (int r)
return;
}
add_route_dialog->ArdourDialog::on_response (r);
- ARDOUR_UI_UTILS::no_engine_notify ();
+ ARDOUR_UI_UTILS::engine_is_running ();
return;
}
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 1f8e81e7aa..2e92a37480 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -373,7 +373,7 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context
const SelectionData& data,
guint info, guint time)
{
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return;
}
if (data.get_target() == "regions") {
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 7b8ffca750..0b6b1e34b3 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -1428,7 +1428,7 @@ RegionMoveDrag::finished (GdkEvent* ev, bool movement_occurred)
RouteTimeAxisView*
RegionMoveDrag::create_destination_time_axis (boost::shared_ptr<Region> region, TimeAxisView* original)
{
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return NULL;
}
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index e73ea5fab0..7a528929a8 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -7421,7 +7421,7 @@ Editor::_remove_tracks ()
return;
}
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return;
}
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index d0404058e2..43ad8a2828 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -873,7 +873,7 @@ gint
MixerStrip::output_press (GdkEventButton *ev)
{
using namespace Menu_Helpers;
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return true;
}
@@ -987,7 +987,7 @@ MixerStrip::input_press (GdkEventButton *ev)
input_menu.set_name ("ArdourContextMenu");
citems.clear();
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return true;
}
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index c4da1760e1..4448443136 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -2427,7 +2427,7 @@ ProcessorBox::processor_button_press_event (GdkEventButton *ev, ProcessorEntry*
if (!one_processor_can_be_edited ()) {
return true;
}
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return true;
}
@@ -2534,7 +2534,7 @@ ProcessorBox::use_plugins (const SelectedPlugins& plugins)
; /* only show inline display */
}
else if (processor_can_be_edited (processor)) {
- if (ARDOUR_UI_UTILS::no_engine_notify()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running()) {
return true;
} else if ((*p)->has_editor ()) {
edit_processor (processor);
@@ -3663,7 +3663,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr<Processor> processor, bool us
} else if ((send = boost::dynamic_pointer_cast<Send> (processor)) != 0) {
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return 0;
}
@@ -3679,7 +3679,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr<Processor> processor, bool us
return 0;
}
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return 0;
}
@@ -3721,7 +3721,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr<Processor> processor, bool us
} else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (processor)) != 0) {
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return 0;
}
@@ -4089,7 +4089,7 @@ ProcessorBox::edit_processor (boost::shared_ptr<Processor> processor)
if (edit_aux_send (processor)) {
return;
}
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return;
}
@@ -4110,7 +4110,7 @@ ProcessorBox::generic_edit_processor (boost::shared_ptr<Processor> processor)
if (edit_aux_send (processor)) {
return;
}
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return;
}
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 157bb40a30..68afc7a6c5 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -2323,7 +2323,7 @@ RouteUI::manage_pins ()
void
RouteUI::fan_out (bool to_busses, bool group)
{
- if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (!ARDOUR_UI_UTILS::engine_is_running ()) {
return;
}
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 9e473e3cc7..37a9126a8c 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -2057,7 +2057,7 @@ SoundFileOmega::do_something (int action)
{
SoundFileBrowser::do_something (action);
- if (action == RESPONSE_CLOSE || ARDOUR_UI_UTILS::no_engine_notify ()) {
+ if (action == RESPONSE_CLOSE || !ARDOUR_UI_UTILS::engine_is_running ()) {
hide ();
return;
}
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index b1b6870ada..5ddd044b80 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -124,13 +124,13 @@ idle_notify_engine_stopped ()
}
bool
-ARDOUR_UI_UTILS::no_engine_notify ()
+ARDOUR_UI_UTILS::engine_is_running ()
{
if (ARDOUR::AudioEngine::instance()->running ()) {
- return false; // 0 == OK
+ return true;
}
Glib::signal_idle().connect (sigc::ptr_fun (&idle_notify_engine_stopped));
- return true;
+ return false;
}
diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h
index 47967ae3b5..d1897a7bd2 100644
--- a/gtk2_ardour/utils.h
+++ b/gtk2_ardour/utils.h
@@ -52,10 +52,7 @@ namespace ARDOUR_UI_UTILS {
gint just_hide_it (GdkEventAny*, Gtk::Window*);
void add_item_with_sensitivity (Gtk::Menu_Helpers::MenuList &, Gtk::Menu_Helpers::MenuElem, bool);
-/* return 0 (false) if there is no error (engine runs).
- * otherwise queue an idle user-notificaion and return true.
- */
-bool no_engine_notify ();
+bool engine_is_running ();
unsigned char* xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h);
unsigned char* xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h);