mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-27 16:17:21 -08:00
Auto page relocation for plain text files implemented
This commit is contained in:
parent
4dad8319d2
commit
0abce1970b
1 changed files with 8 additions and 0 deletions
|
@ -395,6 +395,12 @@ reader::reader(QWidget *parent) :
|
||||||
// Get text; no need to do it multiple times for ePUB books
|
// Get text; no need to do it multiple times for ePUB books
|
||||||
if(is_epub != true) {
|
if(is_epub != true) {
|
||||||
setDefaultWorkDir();
|
setDefaultWorkDir();
|
||||||
|
if(global::reader::globalReadingSettings == false) {
|
||||||
|
string_checkconfig_ro(".config/A-page_number/config");
|
||||||
|
if(checkconfig_str_val != "") {
|
||||||
|
split_total = checkconfig_str_val.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
setup_book(book_file, split_total, true);
|
setup_book(book_file, split_total, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1389,6 +1395,7 @@ void reader::writeconfig_pagenumber(bool persistent) {
|
||||||
std::string split_total_str = std::to_string(split_total);
|
std::string split_total_str = std::to_string(split_total);
|
||||||
string_writeconfig("/tmp/inkboxPageNumber", split_total_str);
|
string_writeconfig("/tmp/inkboxPageNumber", split_total_str);
|
||||||
if(persistent == true) {
|
if(persistent == true) {
|
||||||
|
split_total_str.append("\n");
|
||||||
string_writeconfig(".config/A-page_number/config", split_total_str);
|
string_writeconfig(".config/A-page_number/config", split_total_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1396,6 +1403,7 @@ void reader::writeconfig_pagenumber(bool persistent) {
|
||||||
std::string epubPageNumber_str = std::to_string(mupdf::epubPageNumber);
|
std::string epubPageNumber_str = std::to_string(mupdf::epubPageNumber);
|
||||||
string_writeconfig("/tmp/inkboxPageNumber", epubPageNumber_str);
|
string_writeconfig("/tmp/inkboxPageNumber", epubPageNumber_str);
|
||||||
if(persistent == true) {
|
if(persistent == true) {
|
||||||
|
epubPageNumber_str.append("\n");
|
||||||
string_writeconfig(".config/A-page_number/config", epubPageNumber_str);
|
string_writeconfig(".config/A-page_number/config", epubPageNumber_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue