From 2947462d45d405f830065c681beec83bc496e000 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Tue, 10 Nov 2015 13:15:07 +0100 Subject: [PATCH] Unregistering of unregeistered accounts Since it's unregistered, we don't know where to unregister from. Fixes #91. --- src/bitmessageqt/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index f73f8243..73d1fc2b 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2802,7 +2802,7 @@ class MyForm(settingsmixin.SMainWindow): # no chans / mailinglists if acct.type != 'normal': return - if self.dialog.ui.radioButtonUnregister.isChecked(): + if self.dialog.ui.radioButtonUnregister.isChecked() and isinstance(acct, GatewayAccount): print "unregister" acct.unregister() shared.config.remove_option(addressAtCurrentRow, 'gateway') @@ -4243,7 +4243,10 @@ class EmailGatewayDialog(QtGui.QDialog): self.parent = parent addressAtCurrentRow = parent.getCurrentAccount() acct = accountClass(addressAtCurrentRow) -# if isinstance(acct, GatewayAccount): + if isinstance(acct, GatewayAccount): + self.ui.radioButtonUnregister.setEnabled(True) + else: + self.ui.radioButtonUnregister.setEnabled(False) label = shared.config.get(addressAtCurrentRow, 'label') if label.find("@mailchuck.com") > -1: self.ui.lineEditEmail.setText(label)