[apps/code] The console marks imported script for the var box

After lauching the console, if we fetch a script we mark it as fetched.
When the variable box displays variables from imported scripts, it scans
all the variables from the scripts marked as fetched.
This commit is contained in:
Léa Saviot
2020-04-29 16:54:28 +02:00
committed by Émilie Feral
parent 9e973adbab
commit d1c8bbdaf7
13 changed files with 66 additions and 42 deletions

View File

@@ -65,31 +65,35 @@ bool Script::nameCompliant(const char * name) {
return false;
}
bool Script::importationStatus() const {
bool Script::autoImportationStatus() const {
assert(!isNull());
Data d = value();
return (((char *)d.buffer)[0] == 1);
}
void Script::toggleImportationStatus() {
void Script::toggleAutoimportationStatus() {
assert(!isNull());
Data d = value();
((char *)d.buffer)[0] = (((char *)d.buffer)[0] == 1 ? 0 : 1);
setValue(d);
}
const char * Script::scriptContent() const {
assert(!isNull());
Data d = value();
return (const char *)d.buffer + k_autoimportationStatusSize + k_currentImportationStatusSize;
return ((const char *)d.buffer) + InformationSize();
}
bool Script::contentFetchedFromConsole() const {
assert(!isNull());
Data d = value();
return (((char *)d.buffer)[k_autoImportationStatusSize] == 1);
}
void Script::setContentFetchedFromConsole(bool fetch) const {
}
//TODO TODO LEA
void Script::setContentFetchedFromConsole(bool fetch) {
assert(!isNull());
Data d = value();
((char *)d.buffer)[k_autoImportationStatusSize] = fetch;
setValue(d);
}
}