1
0

Clean up WaitingDialog

Prevent GC so callers don't have to.
This commit is contained in:
Neil Booth
2015-12-23 22:10:11 +09:00
parent 64887f7a74
commit ffd081ac21
4 changed files with 68 additions and 83 deletions

View File

@@ -92,9 +92,8 @@ class Plugin(TrustedCoinPlugin):
if wallet.billing_info is None:
# request billing info before forming the transaction
task = partial(self.request_billing_info, wallet)
waiting_dialog = WaitingDialog(window, 'please wait...', task)
waiting_dialog.start()
waiting_dialog.wait()
dialog = WaitingDialog(window, 'please wait...', task)
dialog.wait()
if wallet.billing_info is None:
window.show_message('Could not contact server')
return True
@@ -103,8 +102,8 @@ class Plugin(TrustedCoinPlugin):
def settings_dialog(self, window):
task = partial(self.request_billing_info, window.wallet)
self.waiting_dialog = WaitingDialog(window, 'please wait...', task, partial(self.show_settings_dialog, window))
self.waiting_dialog.start()
WaitingDialog(window, 'please wait...', task,
on_success=partial(self.show_settings_dialog, window))
def show_settings_dialog(self, window, success):
if not success: