mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-27 16:17:21 -08:00
Even more encfs improvements
This commit is contained in:
parent
bb3ecedd8d
commit
6c6a64881d
5 changed files with 21 additions and 4 deletions
|
@ -95,8 +95,8 @@ namespace global {
|
||||||
inline bool cancelSetup;
|
inline bool cancelSetup;
|
||||||
inline bool cancelUnlock;
|
inline bool cancelUnlock;
|
||||||
inline bool lockdown;
|
inline bool lockdown;
|
||||||
|
inline bool enableStorageEncryptionDialog;
|
||||||
inline bool disableStorageEncryptionDialog;
|
inline bool disableStorageEncryptionDialog;
|
||||||
inline bool disableStorageEncryption;
|
|
||||||
}
|
}
|
||||||
inline QString systemInfoText;
|
inline QString systemInfoText;
|
||||||
inline bool forbidOpenSearchDialog;
|
inline bool forbidOpenSearchDialog;
|
||||||
|
|
|
@ -84,7 +84,7 @@ generalDialog::generalDialog(QWidget *parent) :
|
||||||
else if(global::settings::settingsRebootDialog == true) {
|
else if(global::settings::settingsRebootDialog == true) {
|
||||||
settingsRebootDialog = true;
|
settingsRebootDialog = true;
|
||||||
ui->stackedWidget->setCurrentIndex(1);
|
ui->stackedWidget->setCurrentIndex(1);
|
||||||
if(global::kobox::koboxSettingsRebootDialog == true) {
|
if(global::kobox::koboxSettingsRebootDialog == true or global::encfs::enableStorageEncryptionDialog) {
|
||||||
koboxSettingsRebootDialog = true;
|
koboxSettingsRebootDialog = true;
|
||||||
ui->bodyLabel->setText("The device will reboot now, since the settings you chose require it to work properly.");
|
ui->bodyLabel->setText("The device will reboot now, since the settings you chose require it to work properly.");
|
||||||
}
|
}
|
||||||
|
@ -412,7 +412,7 @@ void generalDialog::on_acceptBtn_clicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
if(settingsRebootDialog == true) {
|
if(settingsRebootDialog == true) {
|
||||||
if(koboxSettingsRebootDialog == true) {
|
if(koboxSettingsRebootDialog == true or global::encfs::enableStorageEncryptionDialog) {
|
||||||
reboot(true);
|
reboot(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -365,6 +365,14 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
// We set the brightness level saved in the config file
|
// We set the brightness level saved in the config file
|
||||||
QTimer::singleShot(2000, this, SLOT(setInitialBrightness()));
|
QTimer::singleShot(2000, this, SLOT(setInitialBrightness()));
|
||||||
|
|
||||||
|
// If new files are found in /mnt/onboard/onboard/encfs-dropbox, ask if user wants to encrypt them
|
||||||
|
if(checkconfig(".config/18-encrypted_storage/status") == true) {
|
||||||
|
QDir encfsDropboxDir("/mnt/onboard/onboard/encfs-dropbox");
|
||||||
|
if(encfsDropboxDir.isEmpty()) {
|
||||||
|
QTimer::singleShot(1000, this, SLOT(openEncfsEncryptDialog()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Display quote if requested; otherwise, display recent books
|
// Display quote if requested; otherwise, display recent books
|
||||||
string_checkconfig(".config/05-quote/config");
|
string_checkconfig(".config/05-quote/config");
|
||||||
if(checkconfig_str_val == "") {
|
if(checkconfig_str_val == "") {
|
||||||
|
@ -1014,3 +1022,7 @@ void MainWindow::checkForUpdate() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::openEncfsEncryptDialog() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -88,6 +88,7 @@ private slots:
|
||||||
void openBookFile(QString book, bool relativePath);
|
void openBookFile(QString book, bool relativePath);
|
||||||
void openReaderFramework();
|
void openReaderFramework();
|
||||||
void checkForUpdate();
|
void checkForUpdate();
|
||||||
|
void openEncfsEncryptDialog();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
|
|
|
@ -290,6 +290,10 @@ settings::settings(QWidget *parent) :
|
||||||
if(checkconfig(".config/18-encrypted_storage/status") == true) {
|
if(checkconfig(".config/18-encrypted_storage/status") == true) {
|
||||||
ui->enableEncryptedStorageCheckBox->click();
|
ui->enableEncryptedStorageCheckBox->click();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Next interaction will be by the user
|
||||||
|
enableEncryptedStorageUserChange = true;
|
||||||
|
}
|
||||||
|
|
||||||
// DPI checkbox
|
// DPI checkbox
|
||||||
string_checkconfig(".config/09-dpi/config");
|
string_checkconfig(".config/09-dpi/config");
|
||||||
|
@ -892,6 +896,7 @@ void settings::on_enableEncryptedStorageCheckBox_toggled(bool checked)
|
||||||
QFile::remove(".config/18-encrypted_storage/storage_list");
|
QFile::remove(".config/18-encrypted_storage/storage_list");
|
||||||
}
|
}
|
||||||
global::settings::settingsRebootDialog = true;
|
global::settings::settingsRebootDialog = true;
|
||||||
|
global::encfs::enableStorageEncryptionDialog = true;
|
||||||
generalDialogWindow = new generalDialog(this);
|
generalDialogWindow = new generalDialog(this);
|
||||||
generalDialogWindow->setAttribute(Qt::WA_DeleteOnClose);
|
generalDialogWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
generalDialogWindow->show();
|
generalDialogWindow->show();
|
||||||
|
@ -926,7 +931,6 @@ void settings::disableStorageEncryption() {
|
||||||
decDir.removeRecursively();
|
decDir.removeRecursively();
|
||||||
|
|
||||||
global::settings::settingsRebootDialog = true;
|
global::settings::settingsRebootDialog = true;
|
||||||
global::encfs::disableStorageEncryption = true;
|
|
||||||
generalDialogWindow = new generalDialog(this);
|
generalDialogWindow = new generalDialog(this);
|
||||||
generalDialogWindow->setAttribute(Qt::WA_DeleteOnClose);
|
generalDialogWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
generalDialogWindow->show();
|
generalDialogWindow->show();
|
||||||
|
|
Loading…
Reference in a new issue