mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 07:37:21 -08:00
GUI user applications: Fixes
This commit is contained in:
parent
3c75c64cf4
commit
9e5ac2102c
3 changed files with 23 additions and 4 deletions
|
@ -211,7 +211,7 @@ generalDialog::generalDialog(QWidget *parent) :
|
|||
}
|
||||
else {
|
||||
// We shouldn't be there ;)
|
||||
log("generalDialog launched without settings", className);
|
||||
log("Launched without settings", className);
|
||||
}
|
||||
|
||||
// Centering dialog
|
||||
|
|
23
main.cpp
23
main.cpp
|
@ -38,6 +38,9 @@ int main(int argc, char *argv[])
|
|||
global::deviceID = readFile("/opt/inkbox_device");
|
||||
log("Running on device " + global::deviceID, "main", true);
|
||||
|
||||
// Tell the OS that we're currently running
|
||||
string_writeconfig("/tmp/inkbox_running", "true");
|
||||
|
||||
setDefaultWorkDir();
|
||||
if(checkconfig("/run/wifi_able") == true) {
|
||||
log("Device has Wi-Fi capabilities", "main");
|
||||
|
@ -51,6 +54,23 @@ int main(int argc, char *argv[])
|
|||
if(QFile::exists("/tmp/rescan_userapps")) {
|
||||
QFile::remove("/tmp/rescan_userapps");
|
||||
log("Re-scanning user applications from explicit request", "main");
|
||||
string_writeconfig("/opt/ibxd", "gui_apps_stop\n");
|
||||
QThread::msleep(1000);
|
||||
string_writeconfig("/opt/ibxd", "gui_apps_start\n");
|
||||
while(true) {
|
||||
if(QFile::exists("/tmp/gui_apps_started")) {
|
||||
if(checkconfig("/tmp/gui_apps_started") == true) {
|
||||
QFile::remove("/tmp/gui_apps_started");
|
||||
updateUserAppsMainJsonFile();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
log("GUI apps service failed to start", "main");
|
||||
QFile::remove("/tmp/gui_apps_started");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
updateUserAppsMainJsonFile();
|
||||
}
|
||||
|
||||
|
@ -73,9 +93,6 @@ int main(int argc, char *argv[])
|
|||
return a.exec();
|
||||
}
|
||||
else {
|
||||
// Tell scripts that we're currently running
|
||||
string_writeconfig("/tmp/inkbox_running", "true");
|
||||
|
||||
// Variables
|
||||
global::reader::startBatteryWatchdog = false;
|
||||
global::reader::startUsbmsPrompt = false;
|
||||
|
|
|
@ -161,6 +161,8 @@ void userapps::on_launchBtn_clicked()
|
|||
QString message = "Launching user application at: ";
|
||||
message.append(appDir.path() + execPath.fileName());
|
||||
log(message, className);
|
||||
// Tell the OS that we're not running anymore
|
||||
string_writeconfig("/tmp/inkbox_running", "false");
|
||||
|
||||
QProcess process;
|
||||
QStringList args;
|
||||
|
|
Loading…
Reference in a new issue