diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-17 18:07:10 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-17 18:07:10 +0300 |
commit | f47c3437da642cc85e6e1fed470a2964e914f208 (patch) | |
tree | 73f01228df45c6ac6ea0f669c40966c5b1a193fb /protocols/CurrencyRates/src/HTTPSession.cpp | |
parent | 0353de737783a61cc1381d26dcdeda3111b61cb8 (diff) |
CurrencyRates: adaptation for two or more data providers
Diffstat (limited to 'protocols/CurrencyRates/src/HTTPSession.cpp')
-rw-r--r-- | protocols/CurrencyRates/src/HTTPSession.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/CurrencyRates/src/HTTPSession.cpp b/protocols/CurrencyRates/src/HTTPSession.cpp index eb7ffd26ab..242a2b08ac 100644 --- a/protocols/CurrencyRates/src/HTTPSession.cpp +++ b/protocols/CurrencyRates/src/HTTPSession.cpp @@ -2,12 +2,12 @@ HNETLIBUSER CHTTPSession::g_hNetLib = nullptr; -#define ERROR_MSG LPGENW("This plugin requires a personal key. Press Yes to obtain it at the site and then enter the result in the Options dialog, otherwise this plugin will fail.") +#define ERROR_MSG LPGENW("This plugin requires a personal key. Open the Options dialog to obtain it.") void CALLBACK waitStub() { - if (IDYES == MessageBox(0, TranslateW(ERROR_MSG), _A2W(MODULENAME), MB_YESNOCANCEL)) - Utils_OpenUrl("https://free.currencyconverterapi.com/free-api-key"); + CAdvProviderSettings global_settings(g_pCurrentProvider); + show_popup(g_pCurrentProvider, 0, -1, TranslateW(ERROR_MSG), *global_settings.GetPopupSettingsPtr()); } static int find_header(const NETLIBHTTPREQUEST* pRequest, const char* hdr) @@ -76,7 +76,7 @@ bool CHTTPSession::Init() assert(nullptr == g_hNetLib); ptrA szApiKey(g_plugin.getStringA(DB_KEY_ApiKey)); - if (szApiKey == nullptr) + if (mir_strlen(szApiKey) == 0) Miranda_WaitOnHandle(waitStub); NETLIBUSER nlu = {}; |