From 252322997c14001b8d7676cd562d6f3e3be802a8 Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 5 Jul 2015 02:27:20 +0200 Subject: [PATCH 1/2] User configurable Wallet Window Title --- src/init.cpp | 1 + src/qt/bitcoingui.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index a11da2872..ad4e498d3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -356,6 +356,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += " -upgradewallet " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n"; strUsage += " -wallet= " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n"; strUsage += " -walletnotify= " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n"; + strUsage += " -windowtitle= " + _("Wallet window title") + "\n"; strUsage += " -zapwallettxes= " + _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + "\n"; strUsage += " " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n"; #endif diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 120e4776c..a7434b0d6 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -113,7 +113,13 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) : #endif // ENABLE_WALLET if(enableWallet) { - windowTitle += tr("Wallet"); + QString userWindowTitle = QString::fromStdString(GetArg("-windowtitle", "")); + if(userWindowTitle.isEmpty()){ + windowTitle += tr("Wallet"); + } + else{ + windowTitle += userWindowTitle; + } } else { windowTitle += tr("Node"); } From c990c5a011122f83737b99023fc4c7b2652db351 Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 5 Jul 2015 03:11:58 +0200 Subject: [PATCH 2/2] Wallet Window Title: minor changes --- src/init.cpp | 3 ++- src/qt/bitcoingui.cpp | 10 +++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index ad4e498d3..509bb1007 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -356,7 +356,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += " -upgradewallet " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n"; strUsage += " -wallet= " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n"; strUsage += " -walletnotify= " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n"; - strUsage += " -windowtitle= " + _("Wallet window title") + "\n"; + if (mode == HMM_BITCOIN_QT) + strUsage += " -windowtitle= " + _("Wallet window title") + "\n"; strUsage += " -zapwallettxes= " + _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + "\n"; strUsage += " " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n"; #endif diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index a7434b0d6..4640e1f15 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -113,16 +113,12 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) : #endif // ENABLE_WALLET if(enableWallet) { - QString userWindowTitle = QString::fromStdString(GetArg("-windowtitle", "")); - if(userWindowTitle.isEmpty()){ - windowTitle += tr("Wallet"); - } - else{ - windowTitle += userWindowTitle; - } + windowTitle += tr("Wallet"); } else { windowTitle += tr("Node"); } + QString userWindowTitle = QString::fromStdString(GetArg("-windowtitle", "")); + if(!userWindowTitle.isEmpty()) windowTitle += " - " + userWindowTitle; windowTitle += " " + networkStyle->getTitleAddText(); #ifndef Q_OS_MAC QApplication::setWindowIcon(networkStyle->getAppIcon());