HomePhabricator

qt: make synchronous dialogs behave nice during shutdown

Description

qt: make synchronous dialogs behave nice during shutdown

Summary:

qt, refactor: Replace BitcoinGUI::macosDockIconActivated with a lambda

https://github.com/bitcoin-core/gui/pull/509/commits/c3ca8364b2a8de8c73ecc0c7eed9608bd30e7e02

qt, refactor: Replace BitcoinGUI::trayIconActivated with a lambda

https://github.com/bitcoin-core/gui/pull/509/commits/66afa286e519deda2fcfd580f190b7af13407e72

qt, refactor: Fill up trayIconMenu before connections

This change is required for the following commits.

https://github.com/bitcoin-core/gui/pull/509/commits/78189daac8d13870ab6ed8421b9ed067cf7ebac5

qt: Drop BitcoinGUI::toggleHideAction member

Also dropped useless tooltip.

https://github.com/bitcoin-core/gui/pull/509/commits/ee151d032789fa03daa44ab44dd0fd70e51b145c

qt: Make show_hide_action dependent on the main window actual state

https://github.com/bitcoin-core/gui/pull/509/commits/fd667e73cd109bbfc14011f8c2c08556648b4c50

qt, refactor: Drop BitcoinGUI::{send,receive}CoinsMenuAction members

https://github.com/bitcoin-core/gui/pull/509/commits/58e16035c1fc513fce0b09e02c7d863c63ec990d

qt, refactor: Use local QAction instances for the tray icon menu

This change is required for the following commit.

https://github.com/bitcoin-core/gui/pull/509/commits/92427354dd5f80cb5c042e7afbcd386968161be4

qt: Disable tray icon menu when a modal dialog is active

https://github.com/bitcoin-core/gui/pull/509/commits/8c0eb80f41bca7b08c94de0f08692fac23e3e9f0

qt: Delay shutdown while a modal dialog is active

https://github.com/bitcoin-core/gui/pull/509/commits/5d7666b15164a16aaf3af49af8f73ff4bd392f6a

The two missing commits were included in D18149, as they are a bugfix for this backport

This concludes backport of core-gui#509

Depends on D18184

Test Plan:
run bitcoin-qt. With no wallet loaded, check that "Send", "receive"... buttons are disabled. When loading a wallet, they are enabled.
Check that when pressing Ctrl + C in the terminal the software is not shut down before all modal dialogs are closed (use the coin selection dialog for instance)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18185

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Feb 8 2022, 14:19
PiRKCommitted on Jun 3 2025, 15:26
PiRKPushed on Jun 3 2025, 15:26
Reviewer
Restricted Project
Differential Revision
D18185: qt: make synchronous dialogs behave nice during shutdown
Parents
rABCf4c133fdd976: [e.cash] Trusted by section
Branches
Unknown
Tags
Unknown