Add remorse timer for removing favourites
This commit is contained in:
parent
f56507c7ad
commit
c7620bfab7
3 changed files with 16 additions and 3 deletions
|
@ -156,6 +156,10 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
RemorseItem {
|
||||
id: removeRemorse
|
||||
}
|
||||
|
||||
menu: ContextMenu {
|
||||
MenuItem {
|
||||
text: qsTr("View jobs")
|
||||
|
@ -165,8 +169,9 @@ Page {
|
|||
text: qsTr("Remove printer")
|
||||
visible: db.isFavourite(wifi.ssid, model.display)
|
||||
onClicked: {
|
||||
db.removeFavourite(wifi.ssid, model.display)
|
||||
discovery.favourites = db.getFavourites()
|
||||
removeRemorse.execute(delegate, qsTr("Removing printer"),
|
||||
function() {db.removeFavourite(wifi.ssid, model.display);
|
||||
discovery.favourites = db.getFavourites()})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,6 +112,10 @@
|
|||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Removing printer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>JobsPage</name>
|
||||
|
|
|
@ -112,6 +112,10 @@
|
|||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Removing printer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>JobsPage</name>
|
||||
|
|
Loading…
Reference in a new issue