Consolidate PinDialog Session/recording checks
[ardour.git] / gtk2_ardour / luainstance.cc
index 36436af285f14ce9b9b19ac98b6b3b9b58f45665..f184368f1d07adf05a6d42a54e91106d0129fa90 100644 (file)
@@ -363,6 +363,8 @@ const char *luasignalstr[] = {
 }; // namespace
 
 
+static std::string http_get_unlogged (const std::string& url) { return ArdourCurl::http_get (url, false); }
+
 /** special cases for Ardour's Mixer UI */
 namespace LuaMixer {
 
@@ -744,7 +746,7 @@ LuaInstance::register_classes (lua_State* L)
        luabridge::getGlobalNamespace (L)
                .beginNamespace ("ArdourUI")
 
-               .addFunction ("http_get", (std::string (*)(const std::string&))&ArdourCurl::http_get)
+               .addFunction ("http_get", &http_get_unlogged)
 
                .addFunction ("processor_selection", &LuaMixer::processor_selection)
 
@@ -1288,7 +1290,7 @@ LuaInstance::session_going_away ()
        point_one_second_connection.disconnect ();
 
        (*_lua_clear)();
-       for (int i = 0; i < 9; ++i) {
+       for (int i = 0; i < MAX_LUA_ACTION_SCRIPTS; ++i) {
                ActionChanged (i, ""); /* EMIT SIGNAL */
        }
        SessionHandlePtr::session_going_away ();
@@ -1320,7 +1322,7 @@ LuaInstance::set_state (const XMLNode& node)
                        } catch (luabridge::LuaException const& e) {
                                cerr << "LuaException:" << e.what () << endl;
                        } catch (...) { }
-                       for (int i = 0; i < 9; ++i) {
+                       for (int i = 0; i < MAX_LUA_ACTION_SCRIPTS; ++i) {
                                std::string name;
                                if (lua_action_name (i, name)) {
                                        ActionChanged (i, name); /* EMIT SIGNAL */
@@ -1578,7 +1580,7 @@ std::vector<std::string>
 LuaInstance::lua_action_names ()
 {
        std::vector<std::string> rv;
-       for (int i = 0; i < 9; ++i) {
+       for (int i = 0; i < MAX_LUA_ACTION_SCRIPTS; ++i) {
                std::string name;
                if (lua_action_name (i, name)) {
                        rv.push_back (name);