From 40c5b939f2bff960e397da6ae3651952adc68cbe Mon Sep 17 00:00:00 2001 From: Cozz Lovan Date: Thu, 24 Apr 2014 22:21:45 +0200 Subject: [Qt] Optionally add third party links to transaction context menu --- src/qt/optionsmodel.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/qt/optionsmodel.cpp') 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); -- cgit v1.2.3