[app] Allow to access settings from the book view

... at least in the Jolla store version. Most of those settings are
related to the book view, it may be quite convenient to access them
without closing the book.
This commit is contained in:
Slava Monich 2020-09-28 02:54:49 +03:00
parent 04e5a721e8
commit f1f9dc226e
13 changed files with 76 additions and 56 deletions

View file

@ -77,6 +77,7 @@ SilicaFlickable {
property var linkMenu property var linkMenu
property var imageView property var imageView
property var footnoteView property var footnoteView
property var settingsComponent
function hideViews() { function hideViews() {
if (linkMenu) linkMenu.hide() if (linkMenu) linkMenu.hide()
@ -132,6 +133,25 @@ SilicaFlickable {
} }
PullDownMenu { PullDownMenu {
MenuItem {
//: Pulley menu item
//% "Settings"
text: qsTrId("harbour-books-menu-settings")
visible: !editMode && BooksSettingsMenu
onClicked: {
if (!settingsComponent) {
settingsComponent = Qt.createComponent("../settings/BooksSettings.qml")
if (settingsComponent.status !== Component.Ready) {
console.log(settingsComponent.errorString())
}
}
pageStack.push(settingsComponent, {
"title" : text,
"allowedOrientations": window.allowedOrientations,
"followOrientationChanges": true
})
}
}
MenuItem { MenuItem {
//% "Back to library" //% "Back to library"
text: qsTrId("harbour-books-book-view-back") text: qsTrId("harbour-books-book-view-back")

View file

@ -95,7 +95,7 @@ SilicaFlickable {
MenuItem { MenuItem {
//: Pulley menu item //: Pulley menu item
//% "Settings" //% "Settings"
text: qsTrId("harbour-books-storage-menu-settings") text: qsTrId("harbour-books-menu-settings")
visible: !editMode && BooksSettingsMenu visible: !editMode && BooksSettingsMenu
onClicked: { onClicked: {
if (!_settingsComponent) { if (!_settingsComponent) {

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Bücher</translation> <translation>Bücher</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Einstellungen</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Zur Bibliothek</translation> <translation>Zur Bibliothek</translation>
@ -67,11 +72,6 @@
<numerusform>%0 Bücher</numerusform> <numerusform>%0 Bücher</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Einstellungen</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Libros</translation> <translation>Libros</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Configuración</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Regresar a la librería</translation> <translation>Regresar a la librería</translation>
@ -67,11 +72,6 @@
<numerusform>%0 libros</numerusform> <numerusform>%0 libros</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Configuración</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Kirjat</translation> <translation>Kirjat</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Asetukset</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Takaisin kirjalistaan</translation> <translation>Takaisin kirjalistaan</translation>
@ -67,11 +72,6 @@
<numerusform>%0 kirjaa</numerusform> <numerusform>%0 kirjaa</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Asetukset</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Könyvek</translation> <translation>Könyvek</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Beállítások</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Vissza a könyvtárhoz</translation> <translation>Vissza a könyvtárhoz</translation>
@ -66,11 +71,6 @@
<numerusform>%0 könyv</numerusform> <numerusform>%0 könyv</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Beállítások</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Boeken</translation> <translation>Boeken</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Instellingen</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Terug naar bibliotheek</translation> <translation>Terug naar bibliotheek</translation>
@ -67,11 +72,6 @@
<numerusform>%0 boeken</numerusform> <numerusform>%0 boeken</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Instellingen</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Książki</translation> <translation>Książki</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Ustawienia</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Wróć do biblioteki</translation> <translation>Wróć do biblioteki</translation>
@ -68,11 +73,6 @@
<numerusform>%0 książek</numerusform> <numerusform>%0 książek</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Ustawienia</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Livros</translation> <translation>Livros</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Configurações</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Voltar à biblioteca</translation> <translation>Voltar à biblioteca</translation>
@ -67,11 +72,6 @@
<numerusform>%0 Livros</numerusform> <numerusform>%0 Livros</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Configurações</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Книги</translation> <translation>Книги</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Настройки</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Вернуться в библиотеку</translation> <translation>Вернуться в библиотеку</translation>
@ -68,11 +73,6 @@
<numerusform>%0 книг</numerusform> <numerusform>%0 книг</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Настройки</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Böcker</translation> <translation>Böcker</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Inställningar</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Tillbaka till biblioteket</translation> <translation>Tillbaka till biblioteket</translation>
@ -67,11 +72,6 @@
<numerusform>%0 böcker</numerusform> <numerusform>%0 böcker</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Inställningar</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation></translation> <translation></translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation></translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation></translation> <translation></translation>
@ -66,11 +71,6 @@
<numerusform>%0 </numerusform> <numerusform>%0 </numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation></translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source> <source>Books</source>
<translation>Books</translation> <translation>Books</translation>
</message> </message>
<message id="harbour-books-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Settings</translation>
</message>
<message id="harbour-books-book-view-back"> <message id="harbour-books-book-view-back">
<source>Back to library</source> <source>Back to library</source>
<translation>Back to library</translation> <translation>Back to library</translation>
@ -67,11 +72,6 @@
<numerusform>%0 books</numerusform> <numerusform>%0 books</numerusform>
</translation> </translation>
</message> </message>
<message id="harbour-books-storage-menu-settings">
<source>Settings</source>
<extracomment>Pulley menu item</extracomment>
<translation>Settings</translation>
</message>
<message id="harbour-books-storage-menu-scan_downloads"> <message id="harbour-books-storage-menu-scan_downloads">
<source>Scan downloads</source> <source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment> <extracomment>Pulley menu item</extracomment>