summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/Flags
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-07 22:38:02 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-07 22:40:54 +0300
commit6712ce9307350ef5c04f184b0cb80cfe75af77c5 (patch)
tree3baa482fecc7e53c7843e8ae89a6bc6678b0570d /plugins/UserInfoEx/src/Flags
parentfab3905d91890102046dcc4554721991ae8ff413 (diff)
Srmm_ModifyIcon now changes only tooltip and/or icon, Srmm_SetIconFlags controls flags
Diffstat (limited to 'plugins/UserInfoEx/src/Flags')
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index b17f9faa0b..82b90cc0da 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -97,26 +97,17 @@ MsgWndData::~MsgWndData()
void MsgWndData::FlagsIconSet()
{
- StatusIconData sid = {};
- sid.szModule = MODNAMEFLAGS;
- if (!g_bShowStatusIconFlag)
- sid.flags = MBF_HIDDEN;
- if (m_countryID != 0xFFFF || g_bUseUnknownFlag) {
- sid.hIcon = LoadFlagIcon(m_countryID);
- sid.szTooltip.a = Translate((char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, m_countryID, 0));
+ if (!g_bShowStatusIconFlag || (m_countryID == 0xFFFF && !g_bUseUnknownFlag))
+ Srmm_SetIconFlags(m_hContact, MODNAMEFLAGS, 0, MBF_HIDDEN);
+ else {
+ char *szTooltip = (char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, m_countryID, 0);
+ Srmm_ModifyIcon(m_hContact, MODNAMEFLAGS, 0, LoadFlagIcon(m_countryID), TranslateW(_A2T(szTooltip)));
}
- else sid.flags = MBF_HIDDEN;
-
- Srmm_ModifyIcon(m_hContact, &sid);
}
void UpdateStatusIcons()
{
- StatusIconData sid = {};
- sid.szModule = MODNAMEFLAGS;
- if (!g_bShowStatusIconFlag)
- sid.flags = MBF_HIDDEN;
- Srmm_ModifyIcon(NULL, &sid);
+ Srmm_SetIconFlags(NULL, MODNAMEFLAGS, 0, MBF_HIDDEN);
/* enum all opened message windows */
for (auto &it : gMsgWndList)