Merge #8302: 0.12.2: [Qt] Disable some menu items during splashscreen/verification state
fe98533
[Qt] Disable some menu items during splashscreen/verification state (Jonas Schnelli)
This commit is contained in:
commit
1233cb42dd
@ -316,12 +316,14 @@ void BitcoinGUI::createActions()
|
||||
aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&About Bitcoin Core"), this);
|
||||
aboutAction->setStatusTip(tr("Show information about Bitcoin Core"));
|
||||
aboutAction->setMenuRole(QAction::AboutRole);
|
||||
aboutAction->setEnabled(false);
|
||||
aboutQtAction = new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this);
|
||||
aboutQtAction->setStatusTip(tr("Show information about Qt"));
|
||||
aboutQtAction->setMenuRole(QAction::AboutQtRole);
|
||||
optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), tr("&Options..."), this);
|
||||
optionsAction->setStatusTip(tr("Modify configuration options for Bitcoin Core"));
|
||||
optionsAction->setMenuRole(QAction::PreferencesRole);
|
||||
optionsAction->setEnabled(false);
|
||||
toggleHideAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&Show / Hide"), this);
|
||||
toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
|
||||
|
||||
@ -339,6 +341,8 @@ void BitcoinGUI::createActions()
|
||||
|
||||
openRPCConsoleAction = new QAction(platformStyle->TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this);
|
||||
openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console"));
|
||||
// initially disable the debug window menu item
|
||||
openRPCConsoleAction->setEnabled(false);
|
||||
|
||||
usedSendingAddressesAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
|
||||
usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
|
||||
@ -887,6 +891,14 @@ void BitcoinGUI::closeEvent(QCloseEvent *event)
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
void BitcoinGUI::showEvent(QShowEvent *event)
|
||||
{
|
||||
// enable the debug window when the main window shows up
|
||||
openRPCConsoleAction->setEnabled(true);
|
||||
aboutAction->setEnabled(true);
|
||||
optionsAction->setEnabled(true);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address, const QString& label)
|
||||
{
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void showEvent(QShowEvent *event);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void dropEvent(QDropEvent *event);
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
|
Loading…
Reference in New Issue
Block a user