no heirs message

This commit is contained in:
2026-05-10 00:26:19 -04:00
parent 397da520c9
commit cccd3cc984

43
qt.py
View File

@@ -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,8 +2754,11 @@ class BalBuildWillDialog(BalDialog):
def msg_warning(self, e):
return "<font color='{}'>{}</font".format(self.COLOR_WARNING, e)
def msg_set_status(self, msg, row=None, status=None, color="#000000"):
def msg_set_status(self, msg, row=None, status=None, color=None):
status = "Wait" if status is None else status
if color is None:
line = f"{_(msg)}:\t{status}"
else:
line = "<font color={}>{}:\t{}</font>".format(color, _(msg), status)
return self.msg_edit_row(line, row)
@@ -3696,6 +3696,7 @@ class WillExecutorListWidget(MyTreeView):
wout[k] = self.parent.willexecutors_list[k]
self.parent.update_willexecutors(wout)
self.parent.save_willexecutors()
self.update()
def get_edit_key_from_coordinate(self, row, col):
@@ -3706,18 +3707,22 @@ class WillExecutorListWidget(MyTreeView):
def delete(self, selected_keys):
for key in selected_keys:
del self.parent.willexecutors_list[key]
self.parent.save_willexecutors()
self.update()
def select(self, selected_keys):
for wid, w in self.parent.willexecutors_list.items():
if wid in selected_keys:
w["selected"] = True
self.parent.save_willexecutors()
self.update()
def deselect(self, selected_keys):
for wid, w in self.parent.willexecutors_list.items():
if wid in selected_keys:
w["selected"] = False
self.parent.save_willexecutors()
self.update()
def on_edited(self, idx, edit_key, *, text):