NO-OP: Clarify function name
authorRobin Gareus <robin@gareus.org>
Wed, 28 Nov 2018 13:56:04 +0000 (14:56 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 28 Nov 2018 14:16:25 +0000 (15:16 +0100)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/editor_canvas.cc
gtk2_ardour/editor_drag.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/processor_box.cc
gtk2_ardour/route_ui.cc
gtk2_ardour/sfdb_ui.cc
gtk2_ardour/utils.cc
gtk2_ardour/utils.h

index 148bf0317e6b729a62199be96ec81b4bdb7f6707..a86d9ac9b58589ceb06f7a25df8c2603b85bc9ca 100644 (file)
@@ -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;
        }
 
index 1f8e81e7aa63a4b20a7a7643838522eb6aef8219..2e92a374804a99ad06e6624d7296ac38b29f0d3a 100644 (file)
@@ -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") {
index 7b8ffca7502c7d4890cccec4fa70ee44e83a26a8..0b6b1e34b328b90d82af22acd1256730e7457060 100644 (file)
@@ -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;
        }
 
index e73ea5fab023e61aeac91639f4c2a94f974ab088..7a528929a8143453a4b759e6cee6f71d6c30ce3f 100644 (file)
@@ -7421,7 +7421,7 @@ Editor::_remove_tracks ()
                return;
        }
 
-       if (ARDOUR_UI_UTILS::no_engine_notify ()) {
+       if (!ARDOUR_UI_UTILS::engine_is_running ()) {
                return;
        }
 
index d0404058e280a479bf82f7ee6792313f8f711b09..43ad8a2828e259db571cd1c857789ee9bb6f95bd 100644 (file)
@@ -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;
        }
 
index c4da1760e14252218587aa8146364b1d213aaa8a..4448443136a1bf7d4499ff192fbfafdaecacf2a7 100644 (file)
@@ -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;
        }
 
index 157bb40a308b7646bc5b5a0b8fdf47dc1a93600b..68afc7a6c55201970c34fa8c0c1bd15ed4933100 100644 (file)
@@ -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;
        }
 
index 9e473e3cc701335d79ef2cbbcce6d6125d2f9bdb..37a9126a8ca6916f419639bf1f683f992982740e 100644 (file)
@@ -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;
        }
index b1b6870ada8cd9f4e8f321b2350dda3f37b3740a..5ddd044b801bdfd0c1a02aae5782030efe48e551 100644 (file)
@@ -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;
 }
 
 
index 47967ae3b5f5938fe84d7783defd0ce9aa99e10e..d1897a7bd2c2d5833379305009c41862d78d8cc0 100644 (file)
@@ -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);