summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/mim.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-02-16 19:10:08 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-02-16 19:10:08 +0300
commitf2ccf5871c22c9c231c44a1149c944231ac7423e (patch)
tree1bc65d7a4b8c388b19b306ca2e2df3f834e4f93b /plugins/TabSRMM/src/mim.cpp
parentf0157cebda12743f081e1e43e1c986dde60e2cd0 (diff)
fixes #2215 (TabSRMM: destroy custom tray icon from its own NeN)
Diffstat (limited to 'plugins/TabSRMM/src/mim.cpp')
-rw-r--r--plugins/TabSRMM/src/mim.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 1b37abb626..4c3149fd56 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -520,21 +520,18 @@ nowindowcreate:
// for tray support, we add the event to the tray menu. otherwise we send it back to
// the contact list for flashing
if (!(dbei.flags & DBEF_READ)) {
- UpdateTrayMenu(nullptr, 0, dbei.szModule, nullptr, hContact, 1);
+ wchar_t toolTip[256];
+ mir_snwprintf(toolTip, TranslateT("Message from %s"), Clist_GetContactDisplayName(hContact));
+
+ CLISTEVENT cle = {};
+ cle.hContact = hContact;
+ cle.hDbEvent = hDbEvent;
+ cle.flags = CLEF_UNICODE;
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ cle.pszService = MS_MSG_READMESSAGE;
+ cle.szTooltip.w = toolTip;
+ g_clistApi.pfnAddEvent(&cle);
- if (!nen_options.bTraySupport) {
- wchar_t toolTip[256];
- mir_snwprintf(toolTip, TranslateT("Message from %s"), Clist_GetContactDisplayName(hContact));
-
- CLISTEVENT cle = {};
- cle.hContact = hContact;
- cle.hDbEvent = hDbEvent;
- cle.flags = CLEF_UNICODE;
- cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- cle.pszService = MS_MSG_READMESSAGE;
- cle.szTooltip.w = toolTip;
- g_clistApi.pfnAddEvent(&cle);
- }
tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, 0, nullptr, nullptr, dbei.szModule);
}
return 0;