summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_clist.h21
-rw-r--r--include/m_clistint.h2
-rwxr-xr-xplugins/Alarms/src/alarmlist.cpp4
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp8
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/GmailNotifier/src/notify.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp4
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp2
-rw-r--r--plugins/SMS/src/receive.cpp8
-rw-r--r--plugins/Scriver/src/msgs.cpp12
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/mim.cpp8
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp4
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp2
-rw-r--r--protocols/IRCG/src/clist.cpp4
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp4
-rw-r--r--protocols/JabberG/src/jabber_notes.cpp4
-rw-r--r--protocols/MRA/src/Mra_functions.cpp2
-rw-r--r--protocols/MSN/src/msn_mail.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp4
-rw-r--r--protocols/Tox/src/tox_multimedia.cpp4
-rw-r--r--protocols/VKontakte/src/vk_feed.cpp4
-rw-r--r--src/core/stdauth/src/auth.cpp4
-rw-r--r--src/core/stdfile/src/file.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp12
-rw-r--r--src/core/stduseronline/src/useronline.cpp4
-rw-r--r--src/mir_app/src/chat_clist.cpp4
-rw-r--r--src/mir_app/src/clistevents.cpp10
29 files changed, 74 insertions, 81 deletions
diff --git a/include/m_clist.h b/include/m_clist.h
index 46244bc6c6..a14f6c5235 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -226,22 +226,20 @@ typedef struct {
// clist/removeevent if, for example, your module implements a 'read next' that
// bypasses the double-click.
-typedef struct {
+struct CLISTEVENT
+{
MCONTACT hContact; // handle to the contact to put the icon by
DWORD flags; // ...of course
HICON hIcon; // icon to flash
- union
- {
+ union {
MEVENT hDbEvent; // caller defined but should be unique for hContact
- char * lpszProtocol;
+ char *lpszProtocol;
};
LPARAM lParam; // caller defined
char *pszService; // name of the service to call on activation
- union {
- char *pszTooltip; // short description of the event to display as a
- wchar_t *ptszTooltip; // tooltip on the system tray
- };
-} CLISTEVENT;
+ MAllStrings szTooltip; // short description of the event to display as a tooltip on the system tray
+};
+
#define CLEF_URGENT 1 // flashes the icon even if the user is occupied,
// and puts the event at the top of the queue
#define CLEF_ONLYAFEW 2 // the icon will not flash for ever, only a few
@@ -250,11 +248,6 @@ typedef struct {
#define CLEF_PROTOCOLGLOBAL 8 // set event globally for protocol, hContact has to be NULL,
// lpszProtocol the protocol ID name to be set
-#if defined(_UNICODE)
- #define CLEF_TCHAR CLEF_UNICODE //will use wchar_t* instead of char*
-#else
- #define CLEF_TCHAR 0 //will return char*, as usual
-#endif
/////////////////////////////////////////////////////////////////////////////////////////
// gets the image list with all the useful icons in it
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 3bb65748b6..c2c2906882 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -166,7 +166,7 @@ struct CListEvent : public CLISTEVENT, public MZeroedObject
~CListEvent()
{
mir_free(pszService);
- mir_free(pszTooltip);
+ mir_free(szTooltip.a);
}
int imlIconIndex;
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index d9bb0ed360..897cd13df8 100755
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -627,8 +627,8 @@ void DoAlarm(ALARM *alarm)
if (alarm->action & AAF_SYSTRAY) {
CLISTEVENT cle = {};
cle.hIcon = hIconSystray;
- cle.ptszTooltip = alarm->szTitle;
- cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
+ cle.szTooltip.w = alarm->szTitle;
+ cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
pcli->pfnAddEvent(&cle);
}
}
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 005b8c9343..83b36d2630 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -282,12 +282,12 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message)
cle.hContact = hContact;
cle.hIcon = hIcon;
cle.pszService = "BuddyExpectator/actionReturned";
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
wchar_t* nick = (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
wchar_t tmpMsg[512];
mir_snwprintf(tmpMsg, L"%s %s", nick, message);
- cle.ptszTooltip = tmpMsg;
+ cle.szTooltip.w = tmpMsg;
pcli->pfnAddEvent(&cle);
}
}
@@ -324,8 +324,8 @@ void GoneNotify(MCONTACT hContact, wchar_t *message)
wchar_t* nick = (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
wchar_t tmpMsg[512];
mir_snwprintf(tmpMsg, L"%s %s", nick, message);
- cle.ptszTooltip = tmpMsg;
- cle.flags = CLEF_TCHAR;
+ cle.szTooltip.w = tmpMsg;
+ cle.flags = CLEF_UNICODE;
pcli->pfnAddEvent(&cle);
}
}
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index e13363c3ff..23500aa6f3 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -81,7 +81,7 @@ static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent)
cle.hDbEvent = hDbEvent;
cle.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS));
cle.pszService = MS_CONTACTS_RECEIVE;
- cle.ptszTooltip = caToolTip;
+ cle.szTooltip.w = caToolTip;
cle.flags |= CLEF_UNICODE;
pcli->pfnAddEvent(&cle);
}
diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp
index e315d4e3bd..eb99a41ec4 100644
--- a/plugins/GmailNotifier/src/notify.cpp
+++ b/plugins/GmailNotifier/src/notify.cpp
@@ -95,7 +95,7 @@ void NotifyUser(Account *curAcc)
cle.flags = CLEF_URGENT;
cle.hIcon = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_OCCUPIED);
cle.pszService = "GmailMNotifier/Notifying";
- cle.pszTooltip = curAcc->results.next->content;
+ cle.szTooltip.a = curAcc->results.next->content;
pcli->pfnAddEvent(&cle);
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 0e2a271722..d39b141107 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -311,12 +311,12 @@ void GetStatusText(MCONTACT hContact, WORD newStatus, WORD oldStatus, wchar_t *s
void BlinkIcon(MCONTACT hContact, HICON hIcon, wchar_t *stzText)
{
CLISTEVENT cle = {};
- cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
+ cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = hContact;
cle.hIcon = hIcon;
cle.pszService = "UserOnline/Description";
- cle.ptszTooltip = stzText;
+ cle.szTooltip.w = stzText;
pcli->pfnAddEvent(&cle);
}
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index 0db6a9384e..f999000d78 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -528,7 +528,7 @@ static void FireReminder(REMINDERDATA *pReminder, BOOL *pHasPlayedSound)
ev.flags = CLEF_URGENT;
ev.lParam = (LPARAM)pReminder->uid;
ev.pszService = MODULENAME"/OpenTriggeredReminder";
- ev.pszTooltip = Translate("Reminder");
+ ev.szTooltip.a = Translate("Reminder");
pcli->pfnAddEvent(&ev);
}
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp
index e5e0233eda..28ad76e8c0 100644
--- a/plugins/SMS/src/receive.cpp
+++ b/plugins/SMS/src/receive.cpp
@@ -234,12 +234,12 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
mir_snwprintf(szToolTip, TranslateT("SMS Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = {};
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
cle.pszService = szServiceFunction;
- cle.ptszTooltip = szToolTip;
+ cle.szTooltip.w = szToolTip;
pcli->pfnAddEvent(&cle);
}
}
@@ -257,12 +257,12 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
mir_snwprintf(szToolTip, TranslateT("SMS Confirmation from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = {};
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
cle.hIcon = (HICON)LoadImage(ssSMSSettings.hInstance, MAKEINTRESOURCE(iIcon), IMAGE_ICON, 0, 0, LR_SHARED);
cle.pszService = szServiceFunction;
- cle.ptszTooltip = szToolTip;
+ cle.szTooltip.w = szToolTip;
pcli->pfnAddEvent(&cle);
}
}
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 0ef3c03a53..92f756e8f2 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -118,12 +118,12 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
mir_snwprintf(toolTip, TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = {};
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- cle.ptszTooltip = toolTip;
+ cle.szTooltip.w = toolTip;
pcli->pfnAddEvent(&cle);
}
return 0;
@@ -201,10 +201,10 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = 1;
- cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
+ cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
cle.hIcon = GetCachedIcon("scriver_TYPING");
cle.pszService = "SRMsg/TypingMessage";
- cle.ptszTooltip = szTip;
+ cle.szTooltip.w = szTip;
pcli->pfnAddEvent(&cle);
}
else Clist_TrayNotifyW(nullptr, TranslateT("Typing notification"), szTip, NIIF_INFO, 1000 * 4);
@@ -271,8 +271,8 @@ static void RestoreUnreadMessageAlerts(void)
CLISTEVENT cle = {};
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- cle.flags = CLEF_TCHAR;
- cle.ptszTooltip = toolTip;
+ cle.flags = CLEF_UNICODE;
+ cle.szTooltip.w = toolTip;
for (int i = 0; i < arEvents.getCount(); i++) {
MSavedEvent &e = arEvents[i];
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 43b577fcf9..64b280b13e 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -536,8 +536,8 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
CLISTEVENT cle = {};
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- cle.flags = CLEF_TCHAR;
- cle.ptszTooltip = toolTip;
+ cle.flags = CLEF_UNICODE;
+ cle.szTooltip.w = toolTip;
for (int i = 0; i < arEvents.getCount(); i++) {
MSavedEvent &e = arEvents[i];
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index f80288b3bf..dc388238bb 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -309,10 +309,10 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode)
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = 1;
- cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
+ cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
cle.pszService = "SRMsg/TypingMessage";
- cle.ptszTooltip = szTip;
+ cle.szTooltip.w = szTip;
pcli->pfnAddEvent(&cle);
}
}
@@ -540,12 +540,12 @@ nowindowcreate:
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
contactName = pcli->pfnGetContactDisplayName(hContact, 0);
mir_snwprintf(toolTip, TranslateT("Message from %s"), contactName);
- cle.ptszTooltip = toolTip;
+ cle.szTooltip.w = toolTip;
pcli->pfnAddEvent(&cle);
}
tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, 0, 0, 0, dbei.szModule);
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 94e317b8e6..83f3c91491 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -312,7 +312,7 @@ static void NotifyFlashCListIcon(MCONTACT hContact, const CEvent &evt)
CLISTEVENT cle = {};
cle.hContact = hContact;
- cle.flags = CLEF_URGENT|CLEF_TCHAR;
+ cle.flags = CLEF_URGENT|CLEF_UNICODE;
cle.hDbEvent = NULL;
switch (evt._eType) {
@@ -329,7 +329,7 @@ static void NotifyFlashCListIcon(MCONTACT hContact, const CEvent &evt)
default:
return;
}
- cle.ptszTooltip = szMsg;
+ cle.szTooltip.w = szMsg;
// pszService = NULL get error (crash),
// pszService = "dummy" get 'service not fount' and continue;
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index 606622e27f..64b7508f92 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -638,13 +638,13 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D
if (!(nflags & YAMN_ACC_CONTNOEVENT)) {
CLISTEVENT evt = {};
- evt.flags = CLEF_TCHAR;
+ evt.flags = CLEF_UNICODE;
evt.hContact = ActualAccount->hContact;
evt.hIcon = g_LoadIconEx(2);
evt.hDbEvent = ActualAccount->hContact;
evt.lParam = ActualAccount->hContact;
evt.pszService = MS_YAMN_CLISTDBLCLICK;
- evt.ptszTooltip = tszMsg;
+ evt.szTooltip.w = tszMsg;
pcli->pfnAddEvent(&evt);
}
db_set_ws(ActualAccount->hContact, "CList", "StatusMsg", tszMsg);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index efb64cdd15..b33cab8717 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -1015,7 +1015,7 @@ retry:
cle.hDbEvent = -98;
cle.lParam = (LPARAM)img;
cle.pszService = service;
- cle.pszTooltip = Translate("Incoming image");
+ cle.szTooltip.a = Translate("Incoming image");
pcli->pfnAddEvent(&cle);
ReleaseIconEx("image", FALSE);
}
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp
index 484ed0391f..1b5cf219c1 100644
--- a/protocols/IRCG/src/clist.cpp
+++ b/protocols/IRCG/src/clist.cpp
@@ -65,12 +65,12 @@ BOOL CIrcProto::CList_AddDCCChat(const CMStringW& name, const CMStringW& hostmas
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = -100;
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hIcon = LoadIconEx(IDI_DCC);
mir_snprintf(szService, "%s/DblClickEvent", m_szModuleName);
cle.pszService = szService;
mir_snwprintf(szNick, TranslateT("CTCP chat request from %s"), name.c_str());
- cle.ptszTooltip = szNick;
+ cle.szTooltip.w = szNick;
cle.lParam = (LPARAM)pdci;
if (pcli->pfnGetEvent(hContact, 0))
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index e532340acc..932cc896db 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -448,11 +448,11 @@ BOOL CJabberProto::AddClistHttpAuthEvent(CJabberHttpAuthParams *pParams)
CLISTEVENT cle = {};
cle.hIcon = (HICON)LoadIconEx("openid");
- cle.flags = CLEF_PROTOCOLGLOBAL | CLEF_TCHAR;
+ cle.flags = CLEF_PROTOCOLGLOBAL | CLEF_UNICODE;
cle.hDbEvent = -99;
cle.lParam = (LPARAM)pParams;
cle.pszService = szService;
- cle.ptszTooltip = TranslateT("Http authentication request received");
+ cle.szTooltip.w = TranslateT("Http authentication request received");
pcli->pfnAddEvent(&cle);
return TRUE;
}
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp
index ca7c434ef6..733d5d9580 100644
--- a/protocols/JabberG/src/jabber_notes.cpp
+++ b/protocols/JabberG/src/jabber_notes.cpp
@@ -781,11 +781,11 @@ bool CJabberProto::OnIncomingNote(const wchar_t *szFrom, HXML hXml)
CLISTEVENT cle = {};
cle.hIcon = (HICON)LoadIconEx("notes");
- cle.flags = CLEF_PROTOCOLGLOBAL | CLEF_TCHAR;
+ cle.flags = CLEF_PROTOCOLGLOBAL | CLEF_UNICODE;
cle.hDbEvent = -99;
cle.lParam = (LPARAM)pItem;
cle.pszService = szService;
- cle.ptszTooltip = TranslateT("Incoming note");
+ cle.szTooltip.w = TranslateT("Incoming note");
pcli->pfnAddEvent(&cle);
return true;
}
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index d894a0299f..adea964be4 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -654,7 +654,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA &
cle.hIcon = IconLibGetIcon(gdiMenuItems[0].hIcolib);
cle.flags = (CLEF_UNICODE | CLEF_PROTOCOLGLOBAL);
cle.pszService = "";
- cle.ptszTooltip = szStatusText;
+ cle.szTooltip.w = szStatusText;
if (getByte("TrayIconNewMailClkToInbox", MRA_DEFAULT_TRAYICON_NEW_MAIL_CLK_TO_INBOX)) {
strncpy(szServiceFunction, m_szModuleName, MAX_PATH - 1);
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp
index 13a6cbcf0b..dd385c6070 100644
--- a/protocols/MSN/src/msn_mail.cpp
+++ b/protocols/MSN/src/msn_mail.cpp
@@ -292,9 +292,9 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = 1;
- cle.flags = CLEF_URGENT | CLEF_TCHAR;
+ cle.flags = CLEF_URGENT | CLEF_UNICODE;
cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SENDEMAIL);
- cle.ptszTooltip = tBuffer2;
+ cle.szTooltip.w = tBuffer2;
cle.pszService = buf;
pcli->pfnAddEvent(&cle);
}
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp
index 215f565bfe..6b0f7b8ad4 100644
--- a/protocols/SkypeWeb/src/skype_trouter.cpp
+++ b/protocols/SkypeWeb/src/skype_trouter.cpp
@@ -202,7 +202,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &)
SkinPlaySound("skype_inc_call");
CLISTEVENT cle = {};
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = hEvent;
cle.lParam = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
@@ -212,7 +212,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &)
cle.pszService = service.GetBuffer();
CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
- cle.ptszTooltip = tooltip.GetBuffer();
+ cle.szTooltip.w = tooltip.GetBuffer();
pcli->pfnAddEvent(&cle);
ShowNotification(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL);
diff --git a/protocols/Tox/src/tox_multimedia.cpp b/protocols/Tox/src/tox_multimedia.cpp
index 0cf156dace..c5c42ac79d 100644
--- a/protocols/Tox/src/tox_multimedia.cpp
+++ b/protocols/Tox/src/tox_multimedia.cpp
@@ -344,7 +344,7 @@ INT_PTR CToxProto::OnRecvAudioCall(WPARAM hContact, LPARAM lParam)
MEVENT hEvent = AddEventToDb(hContact, DB_EVENT_CALL, pre->timestamp, DBEF_UTF, (PBYTE)pre->szMessage, mir_strlen(pre->szMessage));
CLISTEVENT cle = {};
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = hEvent;
cle.lParam = DB_EVENT_CALL;
@@ -352,7 +352,7 @@ INT_PTR CToxProto::OnRecvAudioCall(WPARAM hContact, LPARAM lParam)
wchar_t szTooltip[MAX_PATH];
mir_snwprintf(szTooltip, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
- cle.ptszTooltip = szTooltip;
+ cle.szTooltip.w = szTooltip;
char szService[MAX_PATH];
mir_snprintf(szService, "%s/Audio/Ring", GetContactProto(hContact));
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp
index 1f1e496950..39848669f0 100644
--- a/protocols/VKontakte/src/vk_feed.cpp
+++ b/protocols/VKontakte/src/vk_feed.cpp
@@ -81,12 +81,12 @@ void CVkProto::AddCListEvent(bool bNews)
CLISTEVENT cle = {};
cle.hIcon = IcoLib_GetIconByHandle(GetIconHandle(IDI_NOTIFICATION));
cle.pszService = "SRMsg/ReadMessage";
- cle.flags = CLEF_URGENT | CLEF_TCHAR;
+ cle.flags = CLEF_URGENT | CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = NULL;
wchar_t toolTip[255];
mir_snwprintf(toolTip, bNews ? TranslateT("New news") : TranslateT("New notifications"));
- cle.ptszTooltip = toolTip;
+ cle.szTooltip.w = toolTip;
pcli->pfnAddEvent(&cle);
}
diff --git a/src/core/stdauth/src/auth.cpp b/src/core/stdauth/src/auth.cpp
index 44ad9644bb..5b9b433f02 100644
--- a/src/core/stdauth/src/auth.cpp
+++ b/src/core/stdauth/src/auth.cpp
@@ -60,8 +60,8 @@ static int AuthEventAdded(WPARAM, LPARAM lParam)
CLISTEVENT cli = {};
cli.hContact = hContact;
- cli.ptszTooltip = szTooltip;
- cli.flags = CLEF_TCHAR;
+ cli.szTooltip.w = szTooltip;
+ cli.flags = CLEF_UNICODE;
cli.lParam = lParam;
cli.hDbEvent = hDbEvent;
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index aa311ec063..365d9aba06 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -109,9 +109,9 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam)
wchar_t szTooltip[256];
mir_snwprintf(szTooltip, TranslateT("File from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
- cle.ptszTooltip = szTooltip;
+ cle.szTooltip.w = szTooltip;
- cle.flags |= CLEF_TCHAR;
+ cle.flags |= CLEF_UNICODE;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
cle.pszService = "SRFile/RecvFile";
pcli->pfnAddEvent(&cle);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 595a886a20..4e46cc2188 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -93,10 +93,10 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = lParam;
- cle.flags = CLEF_TCHAR;
+ cle.flags = CLEF_UNICODE;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- cle.ptszTooltip = toolTip;
+ cle.szTooltip.w = toolTip;
pcli->pfnAddEvent(&cle);
return 0;
}
@@ -171,10 +171,10 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = 1;
- cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
+ cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_TYPING);
cle.pszService = "SRMsg/ReadMessage";
- cle.ptszTooltip = szTip;
+ cle.szTooltip.w = szTip;
pcli->pfnAddEvent(&cle);
IcoLib_ReleaseIcon(cle.hIcon);
@@ -262,8 +262,8 @@ static void RestoreUnreadMessageAlerts(void)
CLISTEVENT cle = {};
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- cle.flags = CLEF_TCHAR;
- cle.ptszTooltip = toolTip;
+ cle.flags = CLEF_UNICODE;
+ cle.szTooltip.w = toolTip;
for (int i = 0; i < arEvents.getCount(); i++) {
MSavedEvent &e = arEvents[i];
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index 6c7e4cadee..1fa4966af3 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -61,12 +61,12 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
mir_snwprintf(tooltip, TranslateT("%s is online"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = {};
- cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
+ cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
cle.hContact = hContact;
cle.hDbEvent = uniqueEventId++;
cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERONLINE, false);
cle.pszService = "UserOnline/Description";
- cle.ptszTooltip = tooltip;
+ cle.szTooltip.w = tooltip;
pcli->pfnAddEvent(&cle);
IcoLib_ReleaseIcon(cle.hIcon, 0);
db_set_dw(cle.hContact, "UserOnline", "LastEvent", (DWORD)cle.hDbEvent);
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp
index 43b6c7791a..1c17da6fee 100644
--- a/src/mir_app/src/chat_clist.cpp
+++ b/src/mir_app/src/chat_clist.cpp
@@ -203,10 +203,10 @@ BOOL AddEvent(MCONTACT hContact, HICON hIcon, MEVENT hEvent, int type, wchar_t*
CLISTEVENT cle = {};
cle.hContact = hContact;
cle.hDbEvent = hEvent;
- cle.flags = type | CLEF_TCHAR;
+ cle.flags = type | CLEF_UNICODE;
cle.hIcon = hIcon;
cle.pszService = "GChat/DblClickEvent";
- cle.ptszTooltip = TranslateW(szBuf);
+ cle.szTooltip.w = TranslateW(szBuf);
if (!ServiceExists(cle.pszService))
CreateServiceFunction(cle.pszService, &EventDoubleclicked);
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp
index bcc85e9840..5b8b01f5b1 100644
--- a/src/mir_app/src/clistevents.cpp
+++ b/src/mir_app/src/clistevents.cpp
@@ -68,7 +68,7 @@ static char* GetEventProtocol(int idx)
static void ShowOneEventInTray(int idx)
{
- cli.pfnTrayIconUpdateWithImageList((iconsOn || disableTrayFlash) ? g_cliEvents[idx].imlIconIndex : 0, g_cliEvents[idx].ptszTooltip, GetEventProtocol(idx));
+ cli.pfnTrayIconUpdateWithImageList((iconsOn || disableTrayFlash) ? g_cliEvents[idx].imlIconIndex : 0, g_cliEvents[idx].szTooltip.w, GetEventProtocol(idx));
}
static void ShowEventsInTray()
@@ -150,9 +150,9 @@ CListEvent* fnAddEvent(CLISTEVENT *cle)
p->flashesDone = 12;
p->pszService = mir_strdup(g_cliEvents[i].pszService);
if (p->flags & CLEF_UNICODE)
- p->ptszTooltip = mir_wstrdup(p->ptszTooltip);
+ p->szTooltip.w = mir_wstrdup(p->szTooltip.w);
else
- p->ptszTooltip = mir_a2u(p->pszTooltip); //if no flag defined it handled as unicode
+ p->szTooltip.w = mir_a2u(p->szTooltip.a); //if no flag defined it handled as unicode
if (g_cliEvents.getCount() == 1) {
char *szProto;
if (cle->hContact == 0) {
@@ -165,7 +165,7 @@ CListEvent* fnAddEvent(CLISTEVENT *cle)
iconsOn = 1;
flashTimerId = SetTimer(nullptr, 0, db_get_w(0, "CList", "IconFlashTime", 550), IconFlashTimer);
- cli.pfnTrayIconUpdateWithImageList(p->imlIconIndex, p->ptszTooltip, szProto);
+ cli.pfnTrayIconUpdateWithImageList(p->imlIconIndex, p->szTooltip.w, szProto);
}
cli.pfnChangeContactIcon(cle->hContact, p->imlIconIndex);
return p;
@@ -218,7 +218,7 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent)
szProto = nullptr;
else
szProto = GetContactProto(g_cliEvents[0].hContact);
- cli.pfnTrayIconUpdateWithImageList(iconsOn ? g_cliEvents[0].imlIconIndex : 0, g_cliEvents[0].ptszTooltip, szProto);
+ cli.pfnTrayIconUpdateWithImageList(iconsOn ? g_cliEvents[0].imlIconIndex : 0, g_cliEvents[0].szTooltip.w, szProto);
}
return 0;