@@ -1081,19 +1081,33 @@ void BitcoinGUI::createIconMenu(QMenu *pmenu)
10811081 // Using QSystemTrayIcon::Context is not reliable.
10821082 // See https://bugreports.qt.io/browse/QTBUG-91697
10831083 pmenu, &QMenu::aboutToShow,
1084- [this , show_hide_action, send_action, cj_send_action, receive_action, sign_action, verify_action, repair_action, backups_action] {
1084+ [this , show_hide_action, send_action, cj_send_action, receive_action, sign_action, verify_action, options_action, node_window_action, quit_action, repair_action, backups_action, info_action, graph_action, peer_action, conf_action ] {
10851085 if (show_hide_action) show_hide_action->setText (
10861086 (!isHidden () && !isMinimized () && !GUIUtil::isObscured (this )) ?
10871087 tr (" &Hide" ) :
10881088 tr (" S&how" ));
1089- if (enableWallet) {
1090- send_action->setEnabled (sendCoinsAction->isEnabled ());
1091- cj_send_action->setEnabled (coinJoinCoinsAction->isEnabled ());
1092- receive_action->setEnabled (receiveCoinsAction->isEnabled ());
1093- sign_action->setEnabled (signMessageAction->isEnabled ());
1094- verify_action->setEnabled (verifyMessageAction->isEnabled ());
1095- repair_action->setEnabled (openRepairAction->isEnabled ());
1096- backups_action->setEnabled (showBackupsAction->isEnabled ());
1089+ if (QApplication::activeModalWidget ()) {
1090+ for (QAction* a : trayIconMenu.get ()->actions ()) {
1091+ a->setEnabled (false );
1092+ }
1093+ } else {
1094+ if (show_hide_action) show_hide_action->setEnabled (true );
1095+ if (enableWallet) {
1096+ send_action->setEnabled (sendCoinsAction->isEnabled ());
1097+ cj_send_action->setEnabled (coinJoinCoinsAction->isEnabled ());
1098+ receive_action->setEnabled (receiveCoinsAction->isEnabled ());
1099+ sign_action->setEnabled (signMessageAction->isEnabled ());
1100+ verify_action->setEnabled (verifyMessageAction->isEnabled ());
1101+ repair_action->setEnabled (openRepairAction->isEnabled ());
1102+ backups_action->setEnabled (showBackupsAction->isEnabled ());
1103+ }
1104+ options_action->setEnabled (optionsAction->isEnabled ());
1105+ info_action->setEnabled (openInfoAction->isEnabled ());
1106+ node_window_action->setEnabled (openRPCConsoleAction->isEnabled ());
1107+ graph_action->setEnabled (openGraphAction->isEnabled ());
1108+ peer_action->setEnabled (openPeersAction->isEnabled ());
1109+ conf_action->setEnabled (openConfEditorAction->isEnabled ());
1110+ if (quit_action) quit_action->setEnabled (true );
10971111 }
10981112 });
10991113}
0 commit comments