From e9cef118b40c3208b9e0a9e1f1bdd493fc3ac88a Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Mon, 10 Oct 2022 15:43:51 -0400 Subject: [PATCH] apps: Remove Light Maps app It has been replaced by https://github.com/Szybet/inkbox-maps --- src/apps/apps.cpp | 17 -- src/apps/apps.h | 1 - src/apps/apps.ui | 386 ++++++++++++++------------------ src/encfs/encryptionmanager.cpp | 2 +- 4 files changed, 170 insertions(+), 236 deletions(-) diff --git a/src/apps/apps.cpp b/src/apps/apps.cpp index 8d03005..583b33f 100644 --- a/src/apps/apps.cpp +++ b/src/apps/apps.cpp @@ -18,7 +18,6 @@ apps::apps(QWidget *parent) : ui->setupUi(this); ui->koboxAppsOpenButton->setProperty("type", "borderless"); ui->scribbleLaunchBtn->setProperty("type", "borderless"); - ui->lightmapsLaunchBtn->setProperty("type", "borderless"); ui->calendarLaunchBtn->setProperty("type", "borderless"); ui->savedWordsLaunchBtn->setProperty("type", "borderless"); ui->calculatorLaunchBtn->setProperty("type", "borderless"); @@ -30,7 +29,6 @@ apps::apps(QWidget *parent) : ui->label->setStyleSheet("padding-top: 2px; padding-bottom: 5px"); ui->koboxAppsOpenButton->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->scribbleLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); - ui->lightmapsLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->calendarLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->savedWordsLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); ui->calculatorLaunchBtn->setStyleSheet("background: lightGrey; font-size: 9pt; padding: 8px"); @@ -65,13 +63,6 @@ apps::apps(QWidget *parent) : ui->vncLaunchBtn->deleteLater(); } } - // Hiding Light Maps if device doesn't have a working Wi-Fi adapter - if(global::device::isWifiAble == false and global::deviceID != "emu\n") { - ui->label_2->hide(); - ui->lightmapsLaunchBtn->hide(); - ui->label_2->deleteLater(); - ui->lightmapsLaunchBtn->deleteLater(); - } ui->editUserAppsBtn->setProperty("type", "borderless"); ui->editUserAppsBtn->setIcon(QIcon(":/resources/edit.png")); @@ -105,14 +96,6 @@ void apps::on_scribbleLaunchBtn_clicked() qApp->quit(); } -void apps::on_lightmapsLaunchBtn_clicked() -{ - log("Launching external LightMaps app", className); - QProcess process; - process.startDetached("lightmaps", QStringList()); - qApp->quit(); -} - void apps::on_savedWordsLaunchBtn_clicked() { log("Launching Saved Words app", className); diff --git a/src/apps/apps.h b/src/apps/apps.h index cfd9e4f..b738bd1 100644 --- a/src/apps/apps.h +++ b/src/apps/apps.h @@ -26,7 +26,6 @@ public: private slots: void on_scribbleLaunchBtn_clicked(); void exitSlot(); - void on_lightmapsLaunchBtn_clicked(); void on_savedWordsLaunchBtn_clicked(); void on_calendarLaunchBtn_clicked(); void on_calculatorLaunchBtn_clicked(); diff --git a/src/apps/apps.ui b/src/apps/apps.ui index c8044e2..bdde51c 100644 --- a/src/apps/apps.ui +++ b/src/apps/apps.ui @@ -53,8 +53,8 @@ 0 0 - 407 - 612 + 428 + 542 @@ -91,7 +91,6 @@ - 75 true @@ -124,214 +123,11 @@ 10 - - - - - Inter - 75 - false - true - - - - Launch - - - - - - - - 75 - true - - - - VNC viewer - - - - - - - - 75 - true - - - - Qalculate! - - - - - - - - 75 - true - - - - Launch - - - - - - - - Inter - 75 - true - - - - Open - - - - - - - - Inter - 75 - false - true - - - - Launch - - - - - - - - 75 - true - - - - Scribble - - - - - - - - 75 - true - - - - 2048 - - - - - - - - 75 - true - - - - Saved words - - - - - - - - 75 - true - - - - Light Maps - - - - - - - - 75 - true - - - - Reversi - - - - - - - - 75 - true - - - - KoBox apps - - - - - - - - Inter - 75 - true - - - - Launch - - - Inter - 75 - true - - - - Launch - - - - - - - - Inter - 75 - true - - - - Launch - - - - - - - - 75 true @@ -345,7 +141,94 @@ Inter - 75 + true + + + + Launch + + + + + + + + Inter + true + + + + Open + + + + + + + + Inter + true + + + + Launch + + + + + + + + true + + + + Reversi + + + + + + + + true + + + + 2048 + + + + + + + + Inter + true + + + + Launch + + + + + + + + true + + + + Qalculate! + + + + + + + + Inter true @@ -358,7 +241,6 @@ - 75 true @@ -367,25 +249,22 @@ - - + + - 75 true - To-Do + KoBox apps - - + + - Inter - 75 true @@ -394,6 +273,80 @@ + + + + + true + + + + Scribble + + + + + + + + true + + + + Launch + + + + + + + + true + + + + VNC viewer + + + + + + + + true + + + + Saved words + + + + + + + + Inter + false + true + + + + Launch + + + + + + + + true + + + + To-Do + + + @@ -447,7 +400,6 @@ - 75 true diff --git a/src/encfs/encryptionmanager.cpp b/src/encfs/encryptionmanager.cpp index 6e615bd..51e4505 100644 --- a/src/encfs/encryptionmanager.cpp +++ b/src/encfs/encryptionmanager.cpp @@ -258,7 +258,7 @@ void encryptionManager::unlockEncryptedStorage() { string_writeconfig("/inkbox/encryptedStoragePassphraseTries", "3"); unsigned long currentEpoch = QDateTime::currentSecsSinceEpoch(); currentEpoch += 86400; - std::string unlockTime_str = to_string(currentEpoch); + QString unlockTime_str = QString::number(currentEpoch); global::encfs::unlockTime = QDateTime::fromTime_t(currentEpoch).toString(); global::encfs::lockdownMessage = "FATAL: 4 invalid passphrase tries, locking down device until " + global::encfs::unlockTime; writeFile("/external_root/boot/flags/ENCRYPT_LOCK", unlockTime_str + "\n");