mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-28 08:37:22 -08:00
parent
b1c3fa0924
commit
7c22587370
1 changed files with 24 additions and 16 deletions
16
reader.cpp
16
reader.cpp
|
@ -177,13 +177,16 @@ reader::reader(QWidget *parent) :
|
||||||
stylesheetFile.close();
|
stylesheetFile.close();
|
||||||
book_file = dialog->getOpenFileName(dialog, tr("Open File"), QDir::currentPath());
|
book_file = dialog->getOpenFileName(dialog, tr("Open File"), QDir::currentPath());
|
||||||
|
|
||||||
if(book_file != "") {
|
if(!book_file.isEmpty()) {
|
||||||
setDefaultWorkDir();
|
setDefaultWorkDir();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// User clicked "Cancel" button
|
// User clicked "Cancel" button
|
||||||
|
// Restarting InkBox
|
||||||
setDefaultWorkDir();
|
setDefaultWorkDir();
|
||||||
quit_restart();
|
QProcess process;
|
||||||
|
process.startDetached("inkbox", QStringList());
|
||||||
|
qApp->quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -203,13 +206,16 @@ reader::reader(QWidget *parent) :
|
||||||
stylesheetFile.close();
|
stylesheetFile.close();
|
||||||
book_file = dialog->getOpenFileName(dialog, tr("Open File"), QDir::currentPath());
|
book_file = dialog->getOpenFileName(dialog, tr("Open File"), QDir::currentPath());
|
||||||
|
|
||||||
if(book_file != "") {
|
if(!book_file.isEmpty()) {
|
||||||
setDefaultWorkDir();
|
setDefaultWorkDir();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// User clicked "Cancel" button
|
// User clicked "Cancel" button
|
||||||
|
// Restarting InkBox
|
||||||
setDefaultWorkDir();
|
setDefaultWorkDir();
|
||||||
quit_restart();
|
QProcess process;
|
||||||
|
process.startDetached("inkbox", QStringList());
|
||||||
|
qApp->quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,6 +226,7 @@ reader::reader(QWidget *parent) :
|
||||||
string_writeconfig("/tmp/inkboxBookPath", book_file_str);
|
string_writeconfig("/tmp/inkboxBookPath", book_file_str);
|
||||||
|
|
||||||
// Calling InkBox daemon (ibxd) via FIFO interface to run bookconfig_mount
|
// Calling InkBox daemon (ibxd) via FIFO interface to run bookconfig_mount
|
||||||
|
if(!book_file.isEmpty()) {
|
||||||
if(checkconfig(".config/16-global_reading_settings/config") == false) {
|
if(checkconfig(".config/16-global_reading_settings/config") == false) {
|
||||||
global::reader::globalReadingSettings = false;
|
global::reader::globalReadingSettings = false;
|
||||||
string_writeconfig("/opt/ibxd", "bookconfig_mount\n");
|
string_writeconfig("/opt/ibxd", "bookconfig_mount\n");
|
||||||
|
@ -235,6 +242,7 @@ reader::reader(QWidget *parent) :
|
||||||
else {
|
else {
|
||||||
global::reader::globalReadingSettings = true;
|
global::reader::globalReadingSettings = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Custom settings
|
// Custom settings
|
||||||
// Font
|
// Font
|
||||||
|
|
Loading…
Reference in a new issue