mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 19:22:36 +02:00
gui: Update Node window title with chain type
Update Node window with the chain type except for mainnet. This replicates the behaviour of the main window.
This commit is contained in:
@ -571,6 +571,8 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
||||
clear();
|
||||
|
||||
GUIUtil::handleCloseWindowShortcut(this);
|
||||
|
||||
updateWindowTitle();
|
||||
}
|
||||
|
||||
RPCConsole::~RPCConsole()
|
||||
@ -1368,3 +1370,13 @@ void RPCConsole::updateAlerts(const QString& warnings)
|
||||
this->ui->label_alerts->setVisible(!warnings.isEmpty());
|
||||
this->ui->label_alerts->setText(warnings);
|
||||
}
|
||||
|
||||
void RPCConsole::updateWindowTitle()
|
||||
{
|
||||
const ChainType chain = Params().GetChainType();
|
||||
if (chain == ChainType::MAIN) return;
|
||||
|
||||
const QString chainType = QString::fromStdString(Params().GetChainTypeString());
|
||||
const QString title = tr("Node window - [%1]").arg(chainType);
|
||||
this->setWindowTitle(title);
|
||||
}
|
@ -189,6 +189,8 @@ private:
|
||||
return time_at_event.count() ? GUIUtil::formatDurationStr(time_now - time_at_event) : tr("Never");
|
||||
}
|
||||
|
||||
void updateWindowTitle();
|
||||
|
||||
private Q_SLOTS:
|
||||
void updateAlerts(const QString& warnings);
|
||||
};
|
||||
|
Reference in New Issue
Block a user