From 9d37886a3b6ce24f4a4a05193eb0d071655a8457 Mon Sep 17 00:00:00 2001 From: pablomartin4btc Date: Sun, 17 Sep 2023 12:15:36 -0300 Subject: 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. --- src/qt/rpcconsole.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/qt/rpcconsole.cpp') diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index cb4ecfb6fb..c5a8d628e6 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -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); +} \ No newline at end of file -- cgit v1.2.3