From 960d4461049d0f7ab43ca68df4c2d29f4a0ae711 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Thu, 19 Nov 2015 19:28:32 +0100 Subject: [PATCH] Ask before deleting a subscription Fixes #120 --- src/bitmessageqt/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ecce20f3..03ebd2a3 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -3392,6 +3392,8 @@ class MyForm(settingsmixin.SMainWindow): self.click_pushButtonAddSubscription() def on_action_SubscriptionsDelete(self): + if QtGui.QMessageBox.question(self, "Delete subscription?", _translate("MainWindow", "If you delete the subscription, messages that you already received will become inaccessible. Maybe you can consider disabling the subscription instead. Disabled subscriptions will not receive new messages, but you can still view messages you already received.\n\nAre you sure you want to delete the subscription?"), QMessageBox.Yes|QMessageBox.No) != QMessageBox.Yes: + return address = self.getCurrentAccount() sqlExecute('''DELETE FROM subscriptions WHERE address=?''', address)