diff options
author | George Hazan <ghazan@miranda.im> | 2021-06-10 19:13:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-06-10 19:13:40 +0300 |
commit | 4ddea205205f8172cef709752fa723db743b4316 (patch) | |
tree | 6324018969a9aa3892bc659eb94627d861318f6a /protocols/Weather/src/weather_svcs.cpp | |
parent | c677ad260e08dd06946cb48e928509cef4701504 (diff) |
fixes #2886 (большие иконки для погоды во вспомогательных окнах)
Diffstat (limited to 'protocols/Weather/src/weather_svcs.cpp')
-rw-r--r-- | protocols/Weather/src/weather_svcs.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/Weather/src/weather_svcs.cpp b/protocols/Weather/src/weather_svcs.cpp index 7fa2b40000..2d143d5172 100644 --- a/protocols/Weather/src/weather_svcs.cpp +++ b/protocols/Weather/src/weather_svcs.cpp @@ -29,6 +29,8 @@ building/changing the weather menu items. static HGENMENU hEnableDisablePopupMenu; static HGENMENU hEnableDisableMenu; +extern VARSW g_pwszIconsName; + //============ MIRANDA PROTOCOL SERVICES ============ // protocol service function for setting weather protocol status @@ -230,6 +232,18 @@ HICON GetStatusIcon(MCONTACT hContact) return ImageList_GetIcon(Clist_GetImageList(), pIcon.clistIconId, ILD_NORMAL); } +HICON GetStatusIconBig(MCONTACT hContact) +{ + int iCond = g_plugin.getWord(hContact, "StatusIcon", -1); + if (iCond < 0 || iCond >= MAX_COND) + return nullptr; + + HICON hIcon; + auto &pIcon = statusIcons[iCond]; + ExtractIconExW(g_pwszIconsName, -pIcon.iconIdx, &hIcon, 0, 1); + return hIcon; +} + static INT_PTR WeatherAdvancedStatusIcon(WPARAM hContact, LPARAM) { if (!hContact || !g_plugin.hIconsDll) |