[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 imageView
property var footnoteView
property var settingsComponent
function hideViews() {
if (linkMenu) linkMenu.hide()
@ -132,6 +133,25 @@ SilicaFlickable {
}
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 {
//% "Back to library"
text: qsTrId("harbour-books-book-view-back")

View file

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

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Bücher</translation>
</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">
<source>Back to library</source>
<translation>Zur Bibliothek</translation>
@ -67,11 +72,6 @@
<numerusform>%0 Bücher</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Libros</translation>
</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">
<source>Back to library</source>
<translation>Regresar a la librería</translation>
@ -67,11 +72,6 @@
<numerusform>%0 libros</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Kirjat</translation>
</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">
<source>Back to library</source>
<translation>Takaisin kirjalistaan</translation>
@ -67,11 +72,6 @@
<numerusform>%0 kirjaa</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Könyvek</translation>
</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">
<source>Back to library</source>
<translation>Vissza a könyvtárhoz</translation>
@ -66,11 +71,6 @@
<numerusform>%0 könyv</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Boeken</translation>
</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">
<source>Back to library</source>
<translation>Terug naar bibliotheek</translation>
@ -67,11 +72,6 @@
<numerusform>%0 boeken</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Książki</translation>
</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">
<source>Back to library</source>
<translation>Wróć do biblioteki</translation>
@ -68,11 +73,6 @@
<numerusform>%0 książek</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Livros</translation>
</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">
<source>Back to library</source>
<translation>Voltar à biblioteca</translation>
@ -67,11 +72,6 @@
<numerusform>%0 Livros</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Книги</translation>
</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">
<source>Back to library</source>
<translation>Вернуться в библиотеку</translation>
@ -68,11 +73,6 @@
<numerusform>%0 книг</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Böcker</translation>
</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">
<source>Back to library</source>
<translation>Tillbaka till biblioteket</translation>
@ -67,11 +72,6 @@
<numerusform>%0 böcker</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation></translation>
</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">
<source>Back to library</source>
<translation></translation>
@ -66,11 +71,6 @@
<numerusform>%0 </numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>

View file

@ -7,6 +7,11 @@
<source>Books</source>
<translation>Books</translation>
</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">
<source>Back to library</source>
<translation>Back to library</translation>
@ -67,11 +72,6 @@
<numerusform>%0 books</numerusform>
</translation>
</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">
<source>Scan downloads</source>
<extracomment>Pulley menu item</extracomment>