[app] Added "Copied to clipboard" pop-up notification

This commit is contained in:
Slava Monich 2017-12-04 01:24:39 +03:00
parent b16f5e986b
commit f699d3cb34
6 changed files with 39 additions and 1 deletions

View file

@ -32,6 +32,7 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import org.nemomobile.notifications 1.0
import harbour.books 1.0
//import Sailfish.Media 1.0 // Not allowed
@ -116,6 +117,15 @@ SilicaFlickable {
bottomMargin: Theme.itemSizeSmall
}
Notification {
id: notification
//: Pop-up notification
//% "Copied to clipboard"
previewBody: qsTrId("harbour-books-book-view-copied_to_clipboard")
icon: "icon-s-clipboard"
expireTimeout: 2000
}
SilicaListView {
id: bookView
model: bookModel
@ -193,8 +203,11 @@ SilicaFlickable {
}
}
onSelectingChanged: {
globalFeedback.start("push_gesture")
if (currentPage) {
globalFeedback.start("push_gesture")
if (!pageView.selecting) {
notification.publish()
}
root.selecting = pageView.selecting
}
}

View file

@ -35,6 +35,11 @@
<source>Deleting all books</source>
<translation>Alle Bücher löschen</translation>
</message>
<message id="harbour-books-book-view-copied_to_clipboard">
<source>Copied to clipboard</source>
<extracomment>Pop-up notification</extracomment>
<translation>In Zwischenablage kopiert</translation>
</message>
<message id="harbour-books-shelf-view-no_books">
<source>No books</source>
<translation>Keine Bücher</translation>

View file

@ -31,6 +31,11 @@
<source>Cancel</source>
<translation>Peru</translation>
</message>
<message id="harbour-books-book-view-copied_to_clipboard">
<source>Copied to clipboard</source>
<extracomment>Pop-up notification</extracomment>
<translation>Kopioitu leikepöydälle</translation>
</message>
<message id="harbour-books-shelf-view-about_to_delete_all">
<source>Deleting all books</source>
<translation>Poistetaan kaikki kirjat</translation>

View file

@ -31,6 +31,11 @@
<source>Cancel</source>
<translation>Отменить</translation>
</message>
<message id="harbour-books-book-view-copied_to_clipboard">
<source>Copied to clipboard</source>
<extracomment>Pop-up notification</extracomment>
<translation>Скопировано в буфер обмена</translation>
</message>
<message id="harbour-books-shelf-view-about_to_delete_all">
<source>Deleting all books</source>
<translation>Удаляем все книги</translation>

View file

@ -31,6 +31,11 @@
<source>Cancel</source>
<translation>Avbryt</translation>
</message>
<message id="harbour-books-book-view-copied_to_clipboard">
<source>Copied to clipboard</source>
<extracomment>Pop-up notification</extracomment>
<translation>Kopierat till urklipp</translation>
</message>
<message id="harbour-books-shelf-view-about_to_delete_all">
<source>Deleting all books</source>
<translation>Tar bort alla böcker</translation>

View file

@ -31,6 +31,11 @@
<source>Cancel</source>
<translation>Cancel</translation>
</message>
<message id="harbour-books-book-view-copied_to_clipboard">
<source>Copied to clipboard</source>
<extracomment>Pop-up notification</extracomment>
<translation>Copied to clipboard</translation>
</message>
<message id="harbour-books-shelf-view-about_to_delete_all">
<source>Deleting all books</source>
<translation>Deleting all books</translation>