summaryrefslogtreecommitdiff
path: root/protocols/Weather/src/weather_contacts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-04-03 13:22:43 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-04-03 13:22:43 +0300
commit3ee53558d61ce75746f28c4a36255241895a98cb (patch)
tree75c68e699d7d891e247cf633227ac958d2a5046e /protocols/Weather/src/weather_contacts.cpp
parent0fd6fe57ebca7ce96403487ca335d72dae249578 (diff)
obsolete function removed
Diffstat (limited to 'protocols/Weather/src/weather_contacts.cpp')
-rw-r--r--protocols/Weather/src/weather_contacts.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/protocols/Weather/src/weather_contacts.cpp b/protocols/Weather/src/weather_contacts.cpp
index 2661c1b20e..2f5a08f4ef 100644
--- a/protocols/Weather/src/weather_contacts.cpp
+++ b/protocols/Weather/src/weather_contacts.cpp
@@ -53,13 +53,12 @@ INT_PTR CWeatherProto::ViewLog(WPARAM wParam, LPARAM lParam)
// read complete forecast
// wParam = current contact
-INT_PTR CWeatherProto::LoadForecast(WPARAM wParam, LPARAM)
+INT_PTR CWeatherProto::LoadForecast(WPARAM hContact, LPARAM)
{
- wchar_t id[256];
- GetStationID(wParam, id, _countof(id));
- if (id[0] != 0) {
+ CMStringW wszID(getMStringW(hContact, "ID"));
+ if (!wszID.IsEmpty()) {
// set the url and open the webpage
- CMStringA szUrl("https://www.visualcrossing.com/weather-forecast/" + mir_urlEncode(T2Utf(id)) + "/metric");
+ CMStringA szUrl("https://www.visualcrossing.com/weather-forecast/" + mir_urlEncode(T2Utf(wszID)) + "/metric");
Utils_OpenUrl(szUrl);
}
return 0;
@@ -69,13 +68,12 @@ INT_PTR CWeatherProto::LoadForecast(WPARAM wParam, LPARAM)
// load weather map
// wParam = current contact
-INT_PTR CWeatherProto::WeatherMap(WPARAM wParam, LPARAM)
+INT_PTR CWeatherProto::WeatherMap(WPARAM hContact, LPARAM)
{
- wchar_t id[256];
- GetStationID(wParam, id, _countof(id));
- if (id[0] != 0) {
+ CMStringW wszID(getMStringW(hContact, "ID"));
+ if (!wszID.IsEmpty()) {
// set the url and open the webpage
- CMStringA szUrl("https://www.visualcrossing.com/weather-history/" + mir_urlEncode(T2Utf(id)) + "/metric");
+ CMStringA szUrl("https://www.visualcrossing.com/weather-history/" + mir_urlEncode(T2Utf(wszID)) + "/metric");
Utils_OpenUrl(szUrl);
}