Index: src/FilterEngine.cpp |
=================================================================== |
--- a/src/FilterEngine.cpp |
+++ b/src/FilterEngine.cpp |
@@ -134,7 +134,7 @@ |
return GetProperty("url")->AsString() == subscription.GetProperty("url")->AsString(); |
} |
-FilterEngine::FilterEngine(JsEnginePtr jsEngine) |
+FilterEngine::FilterEngine(JsEnginePtr jsEngine, bool firstRunDisabled, bool autoUpdatesDisabled) |
: jsEngine(jsEngine), initialized(false), firstRun(false), updateCheckId(0) |
{ |
jsEngine->SetEventCallback("init", std::tr1::bind(&FilterEngine::InitDone, |
@@ -144,6 +144,9 @@ |
// Lock the JS engine while we are loading scripts, no timeouts should fire |
// until we are done. |
const JsContext context(jsEngine); |
+ jsEngine->Evaluate(std::string("var firstRunDisabled = ") + (firstRunDisabled ? "true;" : "false;")); |
sergei
2015/04/21 12:35:24
Would it be better to add them at least as members
Eric
2015/05/15 19:36:13
Not particularly. Application info is a descriptio
|
+ jsEngine->Evaluate(std::string("var autoupdatesDisabled = ") + (autoUpdatesDisabled ? "true;" : "false;")); |
Eric
2015/05/15 19:36:13
My suggestion to use name value pairs would change
|
+ |
for (int i = 0; !jsSources[i].empty(); i += 2) |
jsEngine->Evaluate(jsSources[i + 1], jsSources[i]); |
} |