aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2018-03-06 12:26:40 +0800
committerJonas Schnelli <dev@jonasschnelli.ch>2018-03-26 18:40:26 +0700
commit12d8d2681e34a191f5d82f15448f8c4c9a14f6d0 (patch)
tree8845e3ca6c3abab36ae926f6385b20581960cc2d /src/qt/walletmodel.cpp
parentd1ec34a761d1d99b84e792fb6a6e62dbd8b5bdde (diff)
downloadbitcoin-12d8d2681e34a191f5d82f15448f8c4c9a14f6d0.tar.xz
Qt: When multiple wallets are used, include in notifications the name
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r--src/qt/walletmodel.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index df1a996af0..a1294998e8 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -744,3 +744,18 @@ int WalletModel::getDefaultConfirmTarget() const
{
return nTxConfirmTarget;
}
+
+QString WalletModel::getWalletName() const
+{
+ LOCK(wallet->cs_wallet);
+ QString walletName = QString::fromStdString(wallet->GetName());
+ if (walletName.endsWith(".dat")) {
+ walletName.truncate(walletName.size() - 4);
+ }
+ return walletName;
+}
+
+bool WalletModel::isMultiwallet()
+{
+ return gArgs.GetArgs("-wallet").size() > 1;
+}