Skip to content

Commit ca52d6f

Browse files
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.
1 parent f01416e commit ca52d6f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/qt/rpcconsole.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
571571
clear();
572572

573573
GUIUtil::handleCloseWindowShortcut(this);
574+
575+
updateWindowTitle();
574576
}
575577

576578
RPCConsole::~RPCConsole()
@@ -1368,3 +1370,13 @@ void RPCConsole::updateAlerts(const QString& warnings)
13681370
this->ui->label_alerts->setVisible(!warnings.isEmpty());
13691371
this->ui->label_alerts->setText(warnings);
13701372
}
1373+
1374+
void RPCConsole::updateWindowTitle()
1375+
{
1376+
const ChainType chain = Params().GetChainType();
1377+
if (chain == ChainType::MAIN) return;
1378+
1379+
const QString chainType = QString::fromStdString(Params().GetChainTypeString());
1380+
const QString title = tr("Node window - [%1]").arg(chainType);
1381+
this->setWindowTitle(title);
1382+
}

src/qt/rpcconsole.h

+2
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ public Q_SLOTS:
189189
return time_at_event.count() ? GUIUtil::formatDurationStr(time_now - time_at_event) : tr("Never");
190190
}
191191

192+
void updateWindowTitle();
193+
192194
private Q_SLOTS:
193195
void updateAlerts(const QString& warnings);
194196
};

0 commit comments

Comments
 (0)