mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Reader framework: Fixes for bookconfig_mount
This commit is contained in:
parent
7ec8e3afb2
commit
ae25446924
2 changed files with 8 additions and 30 deletions
34
reader.cpp
34
reader.cpp
|
@ -35,6 +35,7 @@ reader::reader(QWidget *parent) :
|
|||
}
|
||||
mupdf::convertRelativeValues = false;
|
||||
wordwidgetLock = false;
|
||||
goToSavedPageDone = false;
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->brightnessStatus->setFont(QFont("u001"));
|
||||
|
@ -423,7 +424,7 @@ reader::reader(QWidget *parent) :
|
|||
t->start();
|
||||
}
|
||||
|
||||
// Checking if we're waking from sleep; if so, do nothing there because the book should already have been parsed
|
||||
// Checking if we're waking from sleep and have lockscreen enabled; if so, do nothing there because the book should already have been parsed
|
||||
if(wakeFromSleep != true) {
|
||||
// Remount tmpfs
|
||||
string_writeconfig("/inkbox/remount", "true");
|
||||
|
@ -723,12 +724,10 @@ reader::reader(QWidget *parent) :
|
|||
}
|
||||
|
||||
// Pages number info label
|
||||
if(is_epub == true) {
|
||||
getTotalEpubPagesNumber();
|
||||
}
|
||||
else if(is_pdf == true) {
|
||||
if(is_pdf == true) {
|
||||
getTotalPdfPagesNumber();
|
||||
}
|
||||
// The total pages number is already known for ePUBs at this point
|
||||
setupPageWidget();
|
||||
|
||||
// Reading settings auto-save timer
|
||||
|
@ -773,15 +772,7 @@ int reader::setup_book(QString book, int i, bool run_parser) {
|
|||
QFile::remove("/run/book.epub");
|
||||
QFile::copy(book, "/run/book.epub");
|
||||
|
||||
// Parsing ePUBs with `mutool'
|
||||
QString epubProg ("sh");
|
||||
QStringList epubArgs;
|
||||
convertMuPdfVars(0, false);
|
||||
epubArgs << "/mnt/onboard/.adds/inkbox/epub.sh" << "0" << "0" << "0" << mupdf::epub::epubPageNumber_qstr;
|
||||
QProcess * epubProc = new QProcess();
|
||||
epubProc->start(epubProg, epubArgs);
|
||||
epubProc->waitForFinished();
|
||||
epubProc->deleteLater();
|
||||
getTotalEpubPagesNumber();
|
||||
|
||||
filematch_ran = true;
|
||||
is_epub = true;
|
||||
|
@ -862,12 +853,6 @@ int reader::setup_book(QString book, int i, bool run_parser) {
|
|||
epubProc->waitForFinished();
|
||||
epubProc->deleteLater();
|
||||
}
|
||||
else {
|
||||
;
|
||||
}
|
||||
}
|
||||
else {
|
||||
;
|
||||
}
|
||||
}
|
||||
else if(is_pdf == true) {
|
||||
|
@ -882,12 +867,6 @@ int reader::setup_book(QString book, int i, bool run_parser) {
|
|||
pdfProc->waitForFinished();
|
||||
pdfProc->deleteLater();
|
||||
}
|
||||
else {
|
||||
;
|
||||
}
|
||||
}
|
||||
else {
|
||||
;
|
||||
}
|
||||
}
|
||||
else if(is_image == true) {
|
||||
|
@ -1693,8 +1672,7 @@ void reader::convertMuPdfVars(int fileType, bool convertAll) {
|
|||
}
|
||||
if(global::reader::globalReadingSettings == false) {
|
||||
if(goToSavedPageDone == false) {
|
||||
string_checkconfig_ro(".config/A-page_number/config");
|
||||
mupdf::epub::epubPageNumber = checkconfig_str_val.toInt();
|
||||
mupdf::epub::epubPageNumber = readFile(".config/A-page_number/config").toInt();
|
||||
goToSavedPageDone = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>630</width>
|
||||
<width>644</width>
|
||||
<height>851</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -914,7 +914,7 @@
|
|||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>4</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
|
Loading…
Reference in a new issue