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 {
|
menu: ContextMenu {
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("View jobs")
|
text: qsTr("View jobs")
|
||||||
|
@ -164,9 +168,10 @@ Page {
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: qsTr("Remove printer")
|
text: qsTr("Remove printer")
|
||||||
visible: db.isFavourite(wifi.ssid, model.display)
|
visible: db.isFavourite(wifi.ssid, model.display)
|
||||||
onClicked: {
|
onClicked: {
|
||||||
db.removeFavourite(wifi.ssid, model.display)
|
removeRemorse.execute(delegate, qsTr("Removing printer"),
|
||||||
discovery.favourites = db.getFavourites()
|
function() {db.removeFavourite(wifi.ssid, model.display);
|
||||||
|
discovery.favourites = db.getFavourites()})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,10 @@
|
||||||
<source>Unknown</source>
|
<source>Unknown</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Removing printer</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>JobsPage</name>
|
<name>JobsPage</name>
|
||||||
|
|
|
@ -112,6 +112,10 @@
|
||||||
<source>Unknown</source>
|
<source>Unknown</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Removing printer</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>JobsPage</name>
|
<name>JobsPage</name>
|
||||||
|
|
Loading…
Reference in a new issue