GUI user applications: Miscellanous fixes

This commit is contained in:
Nicolas Mailloux 2022-06-23 00:26:49 -04:00
parent 4ae4341819
commit e8010300c7
3 changed files with 6 additions and 6 deletions

View file

@ -187,7 +187,7 @@ bool apps::parseJson() {
bool jsonCheckSuccess = true; bool jsonCheckSuccess = true;
if(jsonFile.exists() == false) { if(jsonFile.exists() == false) {
log("GUI user applications' main JSON file is missing, creating it", className); log("GUI user applications' main JSON file is missing", className);
jsonCheckSuccess = false; jsonCheckSuccess = false;
} }
else { else {

View file

@ -54,7 +54,7 @@
<x>0</x> <x>0</x>
<y>-30</y> <y>-30</y>
<width>407</width> <width>407</width>
<height>539</height> <height>541</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
@ -449,7 +449,7 @@
<item> <item>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<property name="topMargin"> <property name="topMargin">
<number>10</number> <number>12</number>
</property> </property>
</layout> </layout>
</item> </item>

View file

@ -55,7 +55,7 @@ void userapps::provideInfo(QJsonObject jsonInfo)
ui->gridLayout->deleteLater(); ui->gridLayout->deleteLater();
} }
execPath.setFileName("/" + jsonInfo["ExecPath"].toString()); execPath.setFileName(jsonInfo["ExecPath"].toString());
userAppEnabled = jsonInfo["Enabled"].toBool(); userAppEnabled = jsonInfo["Enabled"].toBool();
if(userAppEnabled == true) { if(userAppEnabled == true) {
@ -141,7 +141,7 @@ void userapps::on_launchBtn_clicked()
// This will work even if we are looking for 'n306' and there is a device named 'n306b' because QJsonArray::contains() works that way // This will work even if we are looking for 'n306' and there is a device named 'n306b' because QJsonArray::contains() works that way
if(supportedDevices.contains("all") == false and supportedDevices.contains(global::deviceID.trimmed()) == false) { if(supportedDevices.contains("all") == false and supportedDevices.contains(global::deviceID.trimmed()) == false) {
log("Warning: User app does not support this device", className); log("Warning: User application '" + appName + "' does not support this device", className);
global::userApps::appCompatibilityDialog = true; global::userApps::appCompatibilityDialog = true;
global::userApps::appCompatibilityText = "<font face='u001'>Your device is not compatible with this app.<br>Continue anyway</font><font face='Inter'>?</font>"; global::userApps::appCompatibilityText = "<font face='u001'>Your device is not compatible with this app.<br>Continue anyway</font><font face='Inter'>?</font>";
generalDialogWindow = new generalDialog(); generalDialogWindow = new generalDialog();
@ -157,7 +157,7 @@ void userapps::on_launchBtn_clicked()
if(global::userApps::launchApp == true) { if(global::userApps::launchApp == true) {
global::userApps::launchApp = false; global::userApps::launchApp = false;
QString message = "Launching user application at: "; QString message = "Launching user application at: ";
message.append(appDir.path() + execPath.fileName()); message.append("[" + appDir.path() + "]" + execPath.fileName());
log(message, className); log(message, className);
// Tell the OS that we're not running anymore // Tell the OS that we're not running anymore
string_writeconfig("/tmp/inkbox_running", "false"); string_writeconfig("/tmp/inkbox_running", "false");