From cccd3cc984f2b0167a84a07881d9c596a7d5c5a9 Mon Sep 17 00:00:00 2001 From: svatantrya Date: Sun, 10 May 2026 00:26:19 -0400 Subject: [PATCH] no heirs message --- qt.py | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/qt.py b/qt.py index 4d6773d..6b946f4 100644 --- a/qt.py +++ b/qt.py @@ -2245,8 +2245,6 @@ class BalWaitingDialog(BalDialog): def finished(self): _logger.info("finished") - def wait(self): - self.thread.wait() def on_accepted(self): self.thread.stop() @@ -2337,7 +2335,7 @@ class BalBuildWillDialog(BalDialog): self.labelsbox = QVBoxLayout(self.qwidget) self.setMinimumWidth(600) self.setMinimumHeight(100) - self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred) + self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) self.labels = [] self.check_row = None self.inval_row = None @@ -2378,15 +2376,14 @@ class BalBuildWillDialog(BalDialog): _logger.debug( "during phase1 CAE: {}, Continue to invalidate".format(cae) ) - self.msg_set_checking( - self.msg_warning( - "Check Alive Threshold Passed: you have to Invalidate your old Will" - ) - ) + self.msg_set_status("checking variables",varrow, "Check Alive Threshold Passed: you have to Invalidate your old Will",self.COLOR_ERROR) else: raise cae return None, tx - + except NoHeirsException: + self.msg_set_status("checking variables", varrow,"No Heirs",self.COLOR_ERROR) + #self.msg_set_checking("No Heirs") + return False, None except Exception as e: raise e try: @@ -2424,7 +2421,6 @@ class BalBuildWillDialog(BalDialog): except NoHeirsException as e: _logger.debug("no heirs") self.msg_set_checking("No Heirs") - raise e except NotCompleteWillException as e: _logger.debug(f"not complete {e} true") message = False @@ -2450,11 +2446,9 @@ class BalBuildWillDialog(BalDialog): try: txs = self.bal_window.build_will() if not txs: - self.msg_set_status( - _("Balance is too low. No transaction was built"), - None, - _("Skipped"), - self.COLOR_ERROR, + self.msg_set_building( + _("Balance is too low, or CheckAlive is in the past.Skipped"), + color = self.COLOR_ERROR, ) return False, None @@ -2711,7 +2705,10 @@ class BalBuildWillDialog(BalDialog): a, b, c = error self.msg_edit_row(self.msg_error(f"Error: {b}")) _logger.error(f"error phase1: {b}") - + button=QPushButton(_("Close")) + button.clicked.connect(self.close) + self.vbox.addWidget(button) + self.resize(self.vbox.sizeHint()+button.sizeHint()*2) def on_error_phase2(self, error): self.bal_window.upade_all() a, b, c = error @@ -2728,10 +2725,10 @@ class BalBuildWillDialog(BalDialog): _("Invalidating old will"), self.inval_row, status ) - def msg_set_building(self, status=None, row=None): + def msg_set_building(self, status=None, row=None,color=None): row = self.build_row if row is None else row self.build_row = self.msg_set_status( - "Building your will", self.build_row, status + "Building your will", self.build_row, status, color ) def msg_set_signing(self, status=None, row=None): @@ -2757,9 +2754,12 @@ class BalBuildWillDialog(BalDialog): def msg_warning(self, e): return "{}