GUI / plugin lifecycle:
- Auto-close Electrum's native 'Electrum Plugins' manager dialog after the
BAL plugin is hot-enabled. Electrum 4.7.x no longer calls the old init_qt
hook, so the close is now triggered from the create_status_bar, init_menubar
and load_wallet hooks (fired when reload_windows() recreates the window).
- Robust dialog matching (isinstance / class name / localized window title) to
cope with zipimport module-identity mismatches.
- Robust dismissal of the modal dialog (reject()/done()/close()) with a retry
schedule [400, 800, 1500] ms; if it still cannot be closed, fall back to
bringing it to the front (showNormal/raise_/activateWindow) so it never
lingers hidden in the background. Counting only visible top-levels avoids
treating an already-closed dialog as still open.
Read-only field styling:
- Paint the locked Delivery time / Check Alive date editors and the mining-fee
spinbox with a light-grey background (#f0f0f0) so the user can see at a glance
that they are not editable outside the 'Build your will' wizard; the styling
is cleared when the fields are made editable again.
Pickle/RLock crash on 'Build will':
- heirs.save() now sanitises the heirs mapping via _json_safe() before handing
it to json_db.put(), which deep-copies the value. A live runtime object
(holding a threading.RLock) slipping into an heir value previously raised
'TypeError: cannot pickle _thread.RLock object' and aborted the task; such
values are now coerced to str and logged with their path.
- init_heirs_to_locktime() coerces the locktime to a plain serializable scalar.
- log_error() now accepts both a sys.exc_info() triple and a single exception
instance, fixing the secondary 'TypeError object is not subscriptable' that
masked the real error.