From c7620bfab704745ff275daba4ae17e228b3dbe00 Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Sun, 15 Dec 2019 11:29:07 +0100 Subject: [PATCH] Add remorse timer for removing favourites --- qml/pages/FirstPage.qml | 11 ++++++++--- translations/harbour-seaprint-de.ts | 4 ++++ translations/harbour-seaprint.ts | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index 526dca4..031bcdf 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -156,6 +156,10 @@ Page { } } + RemorseItem { + id: removeRemorse + } + menu: ContextMenu { MenuItem { text: qsTr("View jobs") @@ -164,9 +168,10 @@ Page { MenuItem { text: qsTr("Remove printer") visible: db.isFavourite(wifi.ssid, model.display) - onClicked: { - db.removeFavourite(wifi.ssid, model.display) - discovery.favourites = db.getFavourites() + onClicked: { + removeRemorse.execute(delegate, qsTr("Removing printer"), + function() {db.removeFavourite(wifi.ssid, model.display); + discovery.favourites = db.getFavourites()}) } } } diff --git a/translations/harbour-seaprint-de.ts b/translations/harbour-seaprint-de.ts index 8da74a3..ca65cf1 100644 --- a/translations/harbour-seaprint-de.ts +++ b/translations/harbour-seaprint-de.ts @@ -112,6 +112,10 @@ Unknown + + Removing printer + + JobsPage diff --git a/translations/harbour-seaprint.ts b/translations/harbour-seaprint.ts index 8da74a3..ca65cf1 100644 --- a/translations/harbour-seaprint.ts +++ b/translations/harbour-seaprint.ts @@ -112,6 +112,10 @@ Unknown + + Removing printer + + JobsPage