From 80042a770a94fbb2dc56d81fd889a6d8b22a5ff1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 29 May 2021 21:56:06 +0300 Subject: fixes #2886 (Weather: display weather as extra-icon instead of status) --- protocols/Weather/src/stdafx.h | 61 +++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 25 deletions(-) (limited to 'protocols/Weather/src/stdafx.h') diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h index 5b105d19ca..a734e91a14 100644 --- a/protocols/Weather/src/stdafx.h +++ b/protocols/Weather/src/stdafx.h @@ -34,26 +34,27 @@ along with this program. If not, see . #include #include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include #include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include +#include #include #include @@ -71,16 +72,20 @@ along with this program. If not, see . #define WEATHERCONDITION "Current" // weather conditions -#define SUNNY ID_STATUS_ONLINE -#define NA ID_STATUS_OFFLINE -#define PCLOUDY ID_STATUS_AWAY -#define CLOUDY ID_STATUS_NA -#define RAIN ID_STATUS_OCCUPIED -#define FOG ID_STATUS_DND -#define SNOW ID_STATUS_FREECHAT -#define LIGHT ID_STATUS_INVISIBLE -#define THUNDER ID_STATUS_INVISIBLE -#define UNAVAIL 40081 +enum EWeatherCondition +{ + SUNNY, + NA, + PCLOUDY, + CLOUDY, + RAIN, + RSHOWER, + FOG, + SNOW, + SSHOWER, + LIGHT, + MAX_COND +}; // status #define NOSTATUSDATA 1 @@ -386,6 +391,10 @@ void GetPressure(wchar_t *tempchar, wchar_t *unit, wchar_t *str); void GetDist(wchar_t *tempchar, wchar_t *unit, wchar_t *str); void GetElev(wchar_t *tempchar, wchar_t *unit, wchar_t *str); +void ClearStatusIcons(); +int MapCondToStatus(MCONTACT hContact); +HICON GetStatusIcon(MCONTACT hContact); + WORD GetIcon(const wchar_t* cond, WIDATA *Data); void CaseConv(wchar_t *str); void TrimString(char *str); @@ -505,6 +514,8 @@ struct CMPlugin : public PLUGIN { CMPlugin(); + HINSTANCE hIconsDll; + int Load() override; int Unload() override; }; -- cgit v1.2.3