Skip to content

Commit 7455ca2

Browse files
committed
Merge #15210: gui: Fix window title update
1ed425e gui: Fix window title update (João Barbosa) Pull request description: Removes trailing `-` from window title when running on mainnet. Reported by @Sjors in bitcoin/bitcoin#15149 (comment). Tree-SHA512: 22f13c361496720f30a4926d928851ed74456c0d70bd313b0ebaca91a9ebfde96991091ac3d1b094f33d3ce9afafd709eb1917f00d96fa3ca69751b6b14e1d2b
2 parents 978682b + 1ed425e commit 7455ca2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/qt/bitcoingui.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,16 +1225,18 @@ void BitcoinGUI::updateProxyIcon()
12251225

12261226
void BitcoinGUI::updateWindowTitle()
12271227
{
1228-
QString window_title = tr(PACKAGE_NAME) + " - ";
1228+
QString window_title = tr(PACKAGE_NAME);
12291229
#ifdef ENABLE_WALLET
12301230
if (walletFrame) {
12311231
WalletModel* const wallet_model = walletFrame->currentWalletModel();
12321232
if (wallet_model && !wallet_model->getWalletName().isEmpty()) {
1233-
window_title += wallet_model->getDisplayName() + " - ";
1233+
window_title += " - " + wallet_model->getDisplayName();
12341234
}
12351235
}
12361236
#endif
1237-
window_title += m_network_style->getTitleAddText();
1237+
if (!m_network_style->getTitleAddText().isEmpty()) {
1238+
window_title += " - " + m_network_style->getTitleAddText();
1239+
}
12381240
setWindowTitle(window_title);
12391241
}
12401242

0 commit comments

Comments
 (0)