diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-01-21 16:48:14 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-01-21 16:49:27 +0100 |
commit | 7455ca2ae687b9b310e3ec580fe700fc003f2aa0 (patch) | |
tree | 0af1a9cc5f79f4289636651754399eb602c6a36c /src | |
parent | 978682b9dccfb48425c0129431bb108e78e33e4e (diff) | |
parent | 1ed425ea17639c20ad3b3e3ef4b34d669b2fd2a4 (diff) |
Merge #15210: gui: Fix window title update
1ed425ea17639c20ad3b3e3ef4b34d669b2fd2a4 gui: Fix window title update (João Barbosa)
Pull request description:
Removes trailing `-` from window title when running on mainnet.
Reported by @Sjors in https://github.com/bitcoin/bitcoin/pull/15149#issuecomment-455787938.
Tree-SHA512: 22f13c361496720f30a4926d928851ed74456c0d70bd313b0ebaca91a9ebfde96991091ac3d1b094f33d3ce9afafd709eb1917f00d96fa3ca69751b6b14e1d2b
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoingui.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index d424c1ef2d..37e3b5e43c 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1225,16 +1225,18 @@ void BitcoinGUI::updateProxyIcon() void BitcoinGUI::updateWindowTitle() { - QString window_title = tr(PACKAGE_NAME) + " - "; + QString window_title = tr(PACKAGE_NAME); #ifdef ENABLE_WALLET if (walletFrame) { WalletModel* const wallet_model = walletFrame->currentWalletModel(); if (wallet_model && !wallet_model->getWalletName().isEmpty()) { - window_title += wallet_model->getDisplayName() + " - "; + window_title += " - " + wallet_model->getDisplayName(); } } #endif - window_title += m_network_style->getTitleAddText(); + if (!m_network_style->getTitleAddText().isEmpty()) { + window_title += " - " + m_network_style->getTitleAddText(); + } setWindowTitle(window_title); } |