aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-04-24 22:21:45 +0200
committerCozz Lovan <cozzlovan@yahoo.com>2014-04-25 20:01:20 +0200
commit40c5b939f2bff960e397da6ae3651952adc68cbe (patch)
tree2e6ce47bb89c7daa525858cf6e965495f6088426 /src/qt/optionsmodel.cpp
parent4765b8c11679aeb76efd9ce907a5c17661d4b018 (diff)
[Qt] Optionally add third party links to transaction context menu
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r--src/qt/optionsmodel.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 9abe9351bb..74c6b10ce2 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -63,6 +63,10 @@ void OptionsModel::Init()
settings.setValue("bDisplayAddresses", false);
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
+ if (!settings.contains("strThirdPartyTxUrls"))
+ settings.setValue("strThirdPartyTxUrls", "");
+ strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "").toString();
+
if (!settings.contains("fCoinControlFeatures"))
settings.setValue("fCoinControlFeatures", false);
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
@@ -203,6 +207,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
return nDisplayUnit;
case DisplayAddresses:
return bDisplayAddresses;
+ case ThirdPartyTxUrls:
+ return strThirdPartyTxUrls;
case Language:
return settings.value("language");
case CoinControlFeatures:
@@ -304,6 +310,13 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
bDisplayAddresses = value.toBool();
settings.setValue("bDisplayAddresses", bDisplayAddresses);
break;
+ case ThirdPartyTxUrls:
+ if (strThirdPartyTxUrls != value.toString()) {
+ strThirdPartyTxUrls = value.toString();
+ settings.setValue("strThirdPartyTxUrls", strThirdPartyTxUrls);
+ setRestartRequired(true);
+ }
+ break;
case Language:
if (settings.value("language") != value) {
settings.setValue("language", value);