From 06d61d78d0f9f33fd13bab5809a112776f0561e3 Mon Sep 17 00:00:00 2001 From: svatantrya Date: Sat, 1 Aug 2026 19:31:28 -0400 Subject: [PATCH] Will toolbar: Export dropdown submenu (All / Valid / Valid NC) Replace the separate Export / Export V-NC toolbar actions with a cascading Export submenu: All exports every will item, Valid exports only valid ones, Valid NC exports valid items that are not yet fully signed. --- bal/gui/qt/lists.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/bal/gui/qt/lists.py b/bal/gui/qt/lists.py index 387251a..d8fce0e 100644 --- a/bal/gui/qt/lists.py +++ b/bal/gui/qt/lists.py @@ -612,7 +612,10 @@ class PreviewList(MyTreeView, MessageBoxMixin): menu.addAction(_("Prepare"), self.build_transactions) menu.addAction(_("Display"), self.bal_window.preview_modal_dialog) menu.addAction(_("Sign"), self.ask_password_and_sign_transactions) - menu.addAction(_("Export"), self.export_will) + export_menu = menu.addMenu(_("Export")) + export_menu.addAction(_("All"), self.export_will) + export_menu.addAction(_("Valid"), self.export_will_valid) + export_menu.addAction(_("Valid NC"), self.export_will_valid_incomplete) menu.addAction(_("Import"), self.import_will_into_details) menu.addAction(_("Merge"), self.merge_will) menu.addAction(_("Broadcast"), self.broadcast) @@ -686,6 +689,32 @@ class PreviewList(MyTreeView, MessageBoxMixin): self.bal_window.export_will() self.update() + def export_will_valid(self): + """Export only the will items that are valid.""" + subset = { + wid: wi + for wid, wi in self.will.items() + if wi.get_status("VALID") + } + if not subset: + self.show_message(_("No valid will item to export")) + return + self.bal_window.export_will(will=subset) + self.update() + + def export_will_valid_incomplete(self): + """Export only the will items that are valid but not yet fully signed (V-NC).""" + subset = { + wid: wi + for wid, wi in self.will.items() + if wi.get_status("VALID") and not wi.get_status("COMPLETE") + } + if not subset: + self.show_message(_("No valid, incomplete will item to export")) + return + self.bal_window.export_will(will=subset) + self.update() + def import_will_into_details(self): self.bal_window.import_will_into_details()