diff options
Diffstat (limited to 'plugins/NewAwaySysMod')
-rw-r--r-- | plugins/NewAwaySysMod/src/AwayOpt.cpp | 36 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/AwaySys.cpp | 24 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/CString.cpp | 6 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/CString.h | 7 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Client.cpp | 4 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/ContactList.cpp | 2 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/GroupCheckbox.cpp | 4 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/MsgEventAdded.cpp | 2 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/MsgTree.cpp | 4 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Notification.cpp | 6 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Options.cpp | 8 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Options.h | 4 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Properties.cpp | 16 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/ReadAwayMsg.cpp | 8 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Services.cpp | 4 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/SetAwayMsg.cpp | 34 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/stdafx.h | 15 |
17 files changed, 92 insertions, 92 deletions
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index dff4fa7a04..d6e0213ac0 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -115,13 +115,13 @@ static Dlg1DefMsgDlgItems[] = { struct {
int DlgItem, IconIndex;
- TCHAR* Text;
+ wchar_t* Text;
}
static Dlg1Buttons[] = {
- IDC_MESSAGEDLG_NEWMSG, ILI_NEWMESSAGE, LPGENT("Create new message"),
- IDC_MESSAGEDLG_NEWCAT, ILI_NEWCATEGORY, LPGENT("Create new category"),
- IDC_MESSAGEDLG_DEL, ILI_DELETE, LPGENT("Delete"),
- IDC_MESSAGEDLG_VARS, ILI_NOICON, LPGENT("Open Variables help dialog"),
+ IDC_MESSAGEDLG_NEWMSG, ILI_NEWMESSAGE, LPGENW("Create new message"),
+ IDC_MESSAGEDLG_NEWCAT, ILI_NEWCATEGORY, LPGENW("Create new category"),
+ IDC_MESSAGEDLG_DEL, ILI_DELETE, LPGENW("Delete"),
+ IDC_MESSAGEDLG_VARS, ILI_NOICON, LPGENW("Open Variables help dialog"),
};
static INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -192,7 +192,7 @@ static INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LP TCString Msg;
GetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, Msg.GetBuffer(AWAY_MSGDATA_MAX), AWAY_MSGDATA_MAX);
Msg.ReleaseBuffer();
- if (((CTreeItem*)pnm->ItemOld)->User_Str1 != (const TCHAR*)Msg) {
+ if (((CTreeItem*)pnm->ItemOld)->User_Str1 != (const wchar_t*)Msg) {
((CTreeItem*)pnm->ItemOld)->User_Str1 = Msg;
MsgTree->SetModified(true);
}
@@ -515,7 +515,7 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l HWND hCombo = GetDlgItem(hwndDlg, IDC_REPLYDLG_ONLYIDLEREPLY_COMBO);
struct {
- TCHAR *Text;
+ wchar_t *Text;
int Meaning;
}
static IdleComboValues[] = {
@@ -544,13 +544,13 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l // init tooltips
struct {
int m_dlgItemID;
- TCHAR *Text;
+ wchar_t *Text;
}
Tooltips[] = {
- IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON, LPGENT("When this checkbox is ticked, NewAwaySys counts \"send times\" starting from the last status message change, even if status mode didn't change.\nWhen the checkbox isn't ticked, \"send times\" are counted from last status mode change (i.e., disabled state is more restrictive)."),
- IDC_MOREOPTDLG_EVNTMSG, LPGENT("Message"),
- IDC_MOREOPTDLG_EVNTURL, LPGENT("URL"),
- IDC_MOREOPTDLG_EVNTFILE, LPGENT("File")
+ IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON, LPGENW("When this checkbox is ticked, NewAwaySys counts \"send times\" starting from the last status message change, even if status mode didn't change.\nWhen the checkbox isn't ticked, \"send times\" are counted from last status mode change (i.e., disabled state is more restrictive)."),
+ IDC_MOREOPTDLG_EVNTMSG, LPGENW("Message"),
+ IDC_MOREOPTDLG_EVNTURL, LPGENW("URL"),
+ IDC_MOREOPTDLG_EVNTFILE, LPGENW("File")
};
hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP | TTS_NOPREFIX, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL);
TOOLINFO ti = { 0 };
@@ -669,13 +669,13 @@ Dlg4DefMsgDlgItems[] = { static struct {
int DlgItem, IconIndex;
- TCHAR* Text;
+ wchar_t* Text;
}
Dlg4Buttons[] = {
- IDC_MESSAGEDLG_NEWMSG, ILI_NEWMESSAGE, LPGENT("Create new message"),
- IDC_MESSAGEDLG_NEWCAT, ILI_NEWCATEGORY, LPGENT("Create new category"),
- IDC_MESSAGEDLG_DEL, ILI_DELETE, LPGENT("Delete"),
- IDC_MESSAGEDLG_VARS, ILI_NOICON, LPGENT("Open Variables help dialog"),
+ IDC_MESSAGEDLG_NEWMSG, ILI_NEWMESSAGE, LPGENW("Create new message"),
+ IDC_MESSAGEDLG_NEWCAT, ILI_NEWCATEGORY, LPGENW("Create new category"),
+ IDC_MESSAGEDLG_DEL, ILI_DELETE, LPGENW("Delete"),
+ IDC_MESSAGEDLG_VARS, ILI_NOICON, LPGENW("Open Variables help dialog"),
};
INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -747,7 +747,7 @@ INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPA TCString Msg;
GetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, Msg.GetBuffer(AWAY_MSGDATA_MAX), AWAY_MSGDATA_MAX);
Msg.ReleaseBuffer();
- if (((CTreeItem*)pnm->ItemOld)->User_Str1 != (const TCHAR*)Msg) {
+ if (((CTreeItem*)pnm->ItemOld)->User_Str1 != (const wchar_t*)Msg) {
((CTreeItem*)pnm->ItemOld)->User_Str1 = Msg;
MsgTree->SetModified(true);
}
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index f5f291c59b..7a86594b43 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -119,7 +119,7 @@ TCString GetDynamicStatMsg(MCONTACT hContact, char *szProto, DWORD UIN, int iSta VarParseData.UIN = UIN;
VarParseData.Flags = 0;
if (ServiceExists(MS_VARS_FORMATSTRING) && !g_SetAwayMsgPage.GetDBValueCopy(IDS_SAWAYMSG_DISABLEVARIABLES)) {
- TCHAR *szResult = variables_parse(VarParseData.Message, 0, hContact);
+ wchar_t *szResult = variables_parse(VarParseData.Message, 0, hContact);
if (szResult) {
VarParseData.Message = szResult;
mir_free(szResult);
@@ -312,7 +312,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) int iMode = szProto ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : 0;
int Flag1 = szProto ? CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) : 0;
int iContactMode = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
- TCHAR szSetStr[256], szReadStr[256];
+ wchar_t szSetStr[256], szReadStr[256];
szSetStr[0] = szReadStr[0] = 0;
HICON hReadMsgIcon = NULL;
@@ -466,7 +466,7 @@ static int IconsChanged(WPARAM, LPARAM) struct
{
- TCHAR *Name;
+ wchar_t *Name;
char *Descr;
int Flags;
}
@@ -501,7 +501,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) }
else if (!mir_tstrcmp(ai->targv[0], VAR_MYNICK)) {
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_MYNICKPERPROTO) && VarParseData.szProto)
- Result = db_get_s(NULL, VarParseData.szProto, "Nick", (TCHAR*)NULL);
+ Result = db_get_s(NULL, VarParseData.szProto, "Nick", (wchar_t*)NULL);
if (Result == NULL)
Result = pcli->pfnGetContactDisplayName(NULL, 0);
@@ -562,7 +562,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (Result == NULL) // if we didn't find a message with specified title
return NULL; // return it now, as later we change NULL to ""
}
- TCHAR *szResult = (TCHAR*)malloc((Result.GetLen() + 1) * sizeof(TCHAR));
+ wchar_t *szResult = (wchar_t*)malloc((Result.GetLen() + 1) * sizeof(wchar_t));
if (!szResult)
return NULL;
@@ -635,7 +635,7 @@ int MirandaLoaded(WPARAM, LPARAM) mi.position = 1000020000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.hIcolibItem = iconList[SendOnEvent ? 1 : 0].hIcolib;
- mi.name.t = SendOnEvent ? DISABLE_SOE_COMMAND : ENABLE_SOE_COMMAND;
+ mi.name.w = SendOnEvent ? DISABLE_SOE_COMMAND : ENABLE_SOE_COMMAND;
mi.pszService = MS_AWAYSYS_AUTOREPLY_TOGGLE;
g_hToggleSOEMenuItem = Menu_AddMainMenuItem(&mi);
@@ -643,7 +643,7 @@ int MirandaLoaded(WPARAM, LPARAM) SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
mi.position = -2000005000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE | CMIF_HIDDEN;
- mi.name.t = LPGENT("Read status message"); // never seen...
+ mi.name.w = LPGENW("Read status message"); // never seen...
mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
g_hReadStatMenuItem = Menu_AddContactMenuItem(&mi);
@@ -651,7 +651,7 @@ int MirandaLoaded(WPARAM, LPARAM) memset(&mi, 0, sizeof(mi));
SET_UID(mi, 0xc42a4fdb, 0x51b8, 0x4bbe, 0x83, 0xee, 0x2d, 0x32, 0x29, 0x5c, 0x2, 0xb3);
mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
- mi.name.t = LPGENT("Set status message"); // will never be shown
+ mi.name.w = LPGENW("Set status message"); // will never be shown
mi.position = 1000020000;
mi.hIcolibItem = iconList[8].hIcolib;
mi.pszService = MS_AWAYSYS_SETCONTACTSTATMSG;
@@ -662,7 +662,7 @@ int MirandaLoaded(WPARAM, LPARAM) mi.flags = CMIF_TCHAR;
mi.hIcolibItem = NULL;
mi.position = 1000020000;
- mi.name.t = LPGENT("Autoreply");
+ mi.name.w = LPGENW("Autoreply");
g_hToggleSOEContactMenuItem = Menu_AddContactMenuItem(&mi);
UNSET_UID(mi);
@@ -671,17 +671,17 @@ int MirandaLoaded(WPARAM, LPARAM) mi.position = 1000020000;
mi.hIcolibItem = iconList[1].hIcolib;
- mi.name.t = LPGENT("On");
+ mi.name.w = LPGENW("On");
mi.pszService = MS_AWAYSYS_AUTOREPLY_ON;
g_hAutoreplyOnContactMenuItem = Menu_AddContactMenuItem(&mi);
mi.hIcolibItem = iconList[0].hIcolib;
- mi.name.t = LPGENT("Off");
+ mi.name.w = LPGENW("Off");
mi.pszService = MS_AWAYSYS_AUTOREPLY_OFF;
g_hAutoreplyOffContactMenuItem = Menu_AddContactMenuItem(&mi);
mi.hIcolibItem = iconList[5].hIcolib;
- mi.name.t = LPGENT("Use the default setting");
+ mi.name.w = LPGENW("Use the default setting");
mi.pszService = MS_AWAYSYS_AUTOREPLY_USEDEFAULT;
g_hAutoreplyUseDefaultContactMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/NewAwaySysMod/src/CString.cpp b/plugins/NewAwaySysMod/src/CString.cpp index ebfefce299..c35e6bbeef 100644 --- a/plugins/NewAwaySysMod/src/CString.cpp +++ b/plugins/NewAwaySysMod/src/CString.cpp @@ -267,7 +267,7 @@ TString<T>& TString<T>::operator = (const T *pStr) return *this;
}
-template class TString<TCHAR>;
+template class TString<wchar_t>;
template class TString<char>;
template class TString<WCHAR>;
@@ -277,13 +277,13 @@ CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, return CString(p == NULL ? szDefaultValue : p);
}
-TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue)
+TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue)
{
ptrT p( db_get_tsa(hContact, szModule, szSetting));
return TCString(p == NULL ? szDefaultValue : p);
}
-TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue)
+TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue)
{ // also converts numeric values to a string
DBVARIANT dbv = {0};
int iRes = db_get_ws(hContact, szModule, szSetting, &dbv);
diff --git a/plugins/NewAwaySysMod/src/CString.h b/plugins/NewAwaySysMod/src/CString.h index 9218a6459d..decedaaac7 100644 --- a/plugins/NewAwaySysMod/src/CString.h +++ b/plugins/NewAwaySysMod/src/CString.h @@ -20,7 +20,6 @@ #pragma once
#include <windows.h>
-#include <tchar.h>
#include <crtdbg.h>
#ifdef CHARARRAY_CONVERT
#include "TMyArray.h"
@@ -97,7 +96,7 @@ private: };
-typedef TString<TCHAR> TCString;
+typedef TString<wchar_t> TCString;
typedef TString<char> CString;
typedef TString<WCHAR> WCString;
@@ -164,9 +163,9 @@ __inline CHARARRAY WCHAR2UTF8(WCString Str) #undef db_get_s
CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue);
-TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue);
+TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue);
int db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
-TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue); // also converts numeric values to a string
+TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue); // also converts numeric values to a string
// various string helpers. their return values are valid only while the class is visible
class UTF8Encode
diff --git a/plugins/NewAwaySysMod/src/Client.cpp b/plugins/NewAwaySysMod/src/Client.cpp index 84c365fbb2..dbee9f8da2 100644 --- a/plugins/NewAwaySysMod/src/Client.cpp +++ b/plugins/NewAwaySysMod/src/Client.cpp @@ -47,7 +47,7 @@ void __cdecl UpdateMsgsThreadProc(void *) }
if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(Status) && g_ProtoStates[p->szModuleName].CurStatusMsg.GetUpdateTimeDifference() >= MinUpdateTimeDifference) {
TCString CurMsg(GetDynamicStatMsg(INVALID_CONTACT_ID, p->szModuleName));
- if ((TCString)g_ProtoStates[p->szModuleName].CurStatusMsg != (const TCHAR*)CurMsg) { // if the message has changed
+ if ((TCString)g_ProtoStates[p->szModuleName].CurStatusMsg != (const wchar_t*)CurMsg) { // if the message has changed
g_ProtoStates[p->szModuleName].CurStatusMsg = CurMsg;
CallAllowedPS_SETAWAYMSG(p->szModuleName, Status, CurMsg);
}
@@ -179,7 +179,7 @@ TCString VariablesEscape(TCString Str) };
eState State = ST_QUOTE;
TCString Result(L"`");
- const TCHAR *p = Str;
+ const wchar_t *p = Str;
while (*p) {
if (*p == '`') {
if (State == ST_TEXT) {
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index 1f7d3dd17d..12889aaa21 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -393,7 +393,7 @@ HTREEITEM CCList::AddGroup(TCString GroupName) TVINSERTSTRUCT tvIns = { 0 };
tvIns.hParent = TVI_ROOT;
- tvIns.item.pszText = _tcsrchr(GroupName, '\\');
+ tvIns.item.pszText = wcsrchr(GroupName, '\\');
if (tvIns.item.pszText) {
TCString ParentGroupName(L"");
tvIns.hParent = AddGroup(ParentGroupName.DiffCat(GroupName, tvIns.item.pszText));
diff --git a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp index e4d30f9408..913edfe261 100644 --- a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp +++ b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp @@ -94,7 +94,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l }
else {
SIZE size;
- TCHAR *szText = (TCHAR*)_alloca(Len * sizeof(TCHAR));
+ wchar_t *szText = (wchar_t*)_alloca(Len * sizeof(wchar_t));
GetWindowText(hWnd, szText, Len);
GetTextExtentPoint32(hdc, szText, (int)mir_tstrlen(szText), &size);
rcText.right = size.cx;
@@ -274,7 +274,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l rc.left += CG_CHECKBOX_INDENT + CG_CHECKBOX_WIDTH + CG_TEXT_INDENT;
int Len = GetWindowTextLength(hWnd) + 1;
- TCHAR *szTextT = (TCHAR*)_alloca(Len * sizeof(TCHAR));
+ wchar_t *szTextT = (wchar_t*)_alloca(Len * sizeof(wchar_t));
GetWindowText(hWnd, szTextT, Len);
HFONT hOldFont = (HFONT)SelectObject(hdcMem, dat->hFont);
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index 5efa887ed5..bb9faf5125 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -233,7 +233,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) GetDynamicStatMsg(hContact); // it updates VarParseData.Message needed for %extratext% in the format
TCString Reply(*(TCString*)AutoreplyOptData.GetValue(IDC_REPLYDLG_PREFIX));
if (Reply != NULL && ServiceExists(MS_VARS_FORMATSTRING) && !g_SetAwayMsgPage.GetDBValueCopy(IDS_SAWAYMSG_DISABLEVARIABLES)) {
- TCHAR *szResult = variables_parse(Reply, VarParseData.Message, hContact);
+ wchar_t *szResult = variables_parse(Reply, VarParseData.Message, hContact);
if (szResult != NULL) {
Reply = szResult;
mir_free(szResult);
diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp index 60ec54710c..57720cc77f 100644 --- a/plugins/NewAwaySysMod/src/MsgTree.cpp +++ b/plugins/NewAwaySysMod/src/MsgTree.cpp @@ -302,7 +302,7 @@ LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM if (NewMsg.IsEmpty())
NewMsg = L"";
- if (OldTitle != (const TCHAR*)NewTitle || OldMsg != (const TCHAR*)NewMsg) {
+ if (OldTitle != (const wchar_t*)NewTitle || OldMsg != (const wchar_t*)NewMsg) {
// probably it's better to leave nm.ItemOld = NULL, to prevent accidental rewriting of it with old data from an edit control etc.
nm.hdr.code = MTN_SELCHANGED;
nm.hdr.hwndFrom = hWnd;
@@ -571,7 +571,7 @@ void CMsgTree::UpdateItem(int ID) // updates item title, and expanded/collapsed tvi.pszText = NewTitle.GetBuffer(TREEITEMTITLE_MAXLEN);
tvi.cchTextMax = TREEITEMTITLE_MAXLEN;
TreeView_GetItem(hTreeView, &tvi);
- if (TreeItem->Title != (const TCHAR*)tvi.pszText) {
+ if (TreeItem->Title != (const wchar_t*)tvi.pszText) {
TreeCtrl->SetModified(true);
NMMSGTREE nm = { 0 };
nm.ItemNew = TreeItem;
diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp index fdf0b5ebe0..3aaee466f0 100644 --- a/plugins/NewAwaySysMod/src/Notification.cpp +++ b/plugins/NewAwaySysMod/src/Notification.cpp @@ -21,7 +21,7 @@ #include "Path.h"
#include "Properties.h"
-void ShowMsg(TCHAR *FirstLine, TCHAR *SecondLine, bool IsErrorMsg, int Timeout)
+void ShowMsg(wchar_t *FirstLine, wchar_t *SecondLine, bool IsErrorMsg, int Timeout)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
POPUPDATAT ppd = { 0 };
@@ -53,7 +53,7 @@ static int CALLBACK MenuWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar static VOID CALLBACK ShowContactMenu(MCONTACT hContact)
{
POINT pt;
- HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _T(MOD_NAME)L"_MenuWindow", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
+ HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", MOD_NAMEW L"_MenuWindow", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG_PTR)MenuWndProc);
HMENU hMenu = Menu_BuildContactMenu(hContact);
GetCursorPos(&pt);
@@ -68,7 +68,7 @@ void ShowLog(TCString &LogFilePath) {
INT_PTR Result = (INT_PTR)ShellExecute(NULL, L"open", LogFilePath, NULL, NULL, SW_SHOW);
if (Result <= 32) {
- TCHAR szError[64];
+ wchar_t szError[64];
mir_sntprintf(szError, TranslateT("Error #%d"), Result);
ShowMsg(szError, TranslateT("Can't open log file ") + LogFilePath, true);
}
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp index aea2556676..62463ea611 100644 --- a/plugins/NewAwaySysMod/src/Options.cpp +++ b/plugins/NewAwaySysMod/src/Options.cpp @@ -286,7 +286,7 @@ int TreeReadEnum(const char *szSetting, LPARAM lParam) pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L"");
pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == NULL) ? NULL :
db_get_s(NULL, pData->sModule,
- *pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + (szSetting + Len), (TCHAR*)NULL);
+ *pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + (szSetting + Len), (wchar_t*)NULL);
}
}
return 0;
@@ -722,7 +722,7 @@ void COptItem_ListCtrl::MemToWnd(HWND hWnd) SendMessage(hListView, LB_RESETCONTENT, 0, 0);
for (int i = 0; i < m_value.GetSize(); i++)
- SendMessage(hListView, LB_INSERTSTRING, -1, (LPARAM)(TCHAR*)m_value[i].Text);
+ SendMessage(hListView, LB_INSERTSTRING, -1, (LPARAM)(wchar_t*)m_value[i].Text);
SendMessage(hListView, WM_SETREDRAW, true, 0);
COptItem::MemToWnd(hWnd);
@@ -794,7 +794,7 @@ void COptItem_ListCtrl::ModifyItem(HWND hWnd, int ID, CListItem &Item) int TopIndex = SendMessage(hListView, LB_GETTOPINDEX, 0, 0);
int Res = SendMessage(hListView, LB_DELETESTRING, ID, 0);
_ASSERT(Res != LB_ERR);
- Res = SendMessage(hListView, LB_INSERTSTRING, ID, (LPARAM)(TCHAR*)(Item.Text));
+ Res = SendMessage(hListView, LB_INSERTSTRING, ID, (LPARAM)(wchar_t*)(Item.Text));
_ASSERT(Res != LB_ERR && Res != LB_ERRSPACE);
SendMessage(hListView, LB_SETCURSEL, CurSel, 0);
SendMessage(hListView, LB_SETTOPINDEX, TopIndex, 0);
@@ -808,7 +808,7 @@ CListItem* COptItem_ListCtrl::InsertItem(HWND hWnd, int ID, CListItem &Item) // ID is position at which to insert the item; -1 = add to the end of the list
{
HWND hListView = GetDlgItem(hWnd, m_dlgItemID);
- int Res = SendMessage(hListView, LB_INSERTSTRING, ID, (LPARAM)(TCHAR*)(Item.Text)); // LB_INSERTSTRING doesn't sort the lists even with LBS_SORT style
+ int Res = SendMessage(hListView, LB_INSERTSTRING, ID, (LPARAM)(wchar_t*)(Item.Text)); // LB_INSERTSTRING doesn't sort the lists even with LBS_SORT style
_ASSERT(Res != LB_ERR && Res != LB_ERRSPACE);
int i = m_value.AddElem(Item);
m_bModified = true;
diff --git a/plugins/NewAwaySysMod/src/Options.h b/plugins/NewAwaySysMod/src/Options.h index b22a0b902b..aac3e9d1c0 100644 --- a/plugins/NewAwaySysMod/src/Options.h +++ b/plugins/NewAwaySysMod/src/Options.h @@ -92,7 +92,7 @@ class COptItem_Edit : public COptItem {
public:
COptItem_Edit() {}
- COptItem_Edit(int m_dlgItemID, char *szDBSetting, int nMaxLen, TCHAR *szDefValue, int lParam = 0, bool m_bReadOnly = false)
+ COptItem_Edit(int m_dlgItemID, char *szDBSetting, int nMaxLen, wchar_t *szDefValue, int lParam = 0, bool m_bReadOnly = false)
: COptItem(m_dlgItemID, szDBSetting, nMaxLen, lParam, m_bReadOnly), sDefValue(szDefValue)
{}
@@ -323,7 +323,7 @@ class COptItem_StrDBSetting : public COptItem {
public:
COptItem_StrDBSetting() {}
- COptItem_StrDBSetting(int m_dlgItemID, char *szDBSetting, int nMaxLen, TCHAR *szDefValue, int lParam = 0, bool m_bReadOnly = false) : COptItem(m_dlgItemID, szDBSetting, nMaxLen, lParam, m_bReadOnly), sDefValue(szDefValue) {}
+ COptItem_StrDBSetting(int m_dlgItemID, char *szDBSetting, int nMaxLen, wchar_t *szDefValue, int lParam = 0, bool m_bReadOnly = false) : COptItem(m_dlgItemID, szDBSetting, nMaxLen, lParam, m_bReadOnly), sDefValue(szDefValue) {}
void DBToMem(const CString &sModule, CString *sDBSettingPrefix = NULL) { sValue = GetStrDBVal(sModule, sDBSettingPrefix); COptItem::DBToMem(sModule, sDBSettingPrefix); }
void MemToDB(const CString &sModule, CString *sDBSettingPrefix = NULL) { SetStrDBVal(sModule, sValue, sDBSettingPrefix); COptItem::MemToDB(sModule, sDBSettingPrefix); }
void WndToMem(HWND hWnd) { COptItem::WndToMem(hWnd); }
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp index 8056306df5..6e1914257c 100644 --- a/plugins/NewAwaySysMod/src/Properties.cpp +++ b/plugins/NewAwaySysMod/src/Properties.cpp @@ -109,7 +109,7 @@ void CContactSettings::SetMsgFormat(int Flags, TCString Message) if (Flags & SMF_PERSONAL) { // set a personal message for a contact. also it's used to set global status message (hContact = NULL).
// if Message == NULL, then the function deletes the message.
CString DBSetting(StatusToDBSetting(Status, DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPERSONAL));
- if (g_AutoreplyOptPage.GetDBValueCopy(IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON) && GetMsgFormat(SMF_PERSONAL) != (const TCHAR*)Message)
+ if (g_AutoreplyOptPage.GetDBValueCopy(IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON) && GetMsgFormat(SMF_PERSONAL) != (const wchar_t*)Message)
ResetContactSettingsOnStatusChange(m_hContact);
if (Message != NULL)
@@ -135,7 +135,7 @@ TCString CContactSettings::GetMsgFormat(int Flags, int *pOrder, char *szProtoOve *pOrder = -1;
if (Flags & GMF_PERSONAL) // try getting personal message (it overrides global)
- Message = db_get_s(m_hContact, MOD_NAME, StatusToDBSetting(Status, DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPERSONAL), (TCHAR*)NULL);
+ Message = db_get_s(m_hContact, MOD_NAME, StatusToDBSetting(Status, DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPERSONAL), (wchar_t*)NULL);
if (Flags & (GMF_LASTORDEFAULT | GMF_PROTOORGLOBAL | GMF_TEMPORARY) && Message.IsEmpty()) {
char *szProto = szProtoOverride ? szProtoOverride : (m_hContact ? GetContactProto(m_hContact) : NULL);
@@ -154,7 +154,7 @@ TCString CContactSettings::GetMsgFormat(int Flags, int *pOrder, char *szProtoOve void CProtoSettings::SetMsgFormat(int Flags, TCString Message)
{
- if (Flags & (SMF_TEMPORARY | SMF_PERSONAL) && g_AutoreplyOptPage.GetDBValueCopy(IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON) && GetMsgFormat(Flags & (SMF_TEMPORARY | SMF_PERSONAL)) != (const TCHAR*)Message)
+ if (Flags & (SMF_TEMPORARY | SMF_PERSONAL) && g_AutoreplyOptPage.GetDBValueCopy(IDC_REPLYDLG_RESETCOUNTERWHENSAMEICON) && GetMsgFormat(Flags & (SMF_TEMPORARY | SMF_PERSONAL)) != (const wchar_t*)Message)
ResetSettingsOnStatusChange(szProto);
if (Flags & SMF_TEMPORARY) {
@@ -190,7 +190,7 @@ void CProtoSettings::SetMsgFormat(int Flags, TCString Message) // or at least if we'll find an identical message somewhere else, then we'll use its title for our new message
TCString Title(L"");
for (i = 0; i < TreeCtrl->m_value.GetSize(); i++) {
- if (!(TreeCtrl->m_value[i].Flags & TIF_GROUP) && TreeCtrl->m_value[i].User_Str1 == (const TCHAR*)Message) {
+ if (!(TreeCtrl->m_value[i].Flags & TIF_GROUP) && TreeCtrl->m_value[i].User_Str1 == (const wchar_t*)Message) {
if (TreeCtrl->m_value[i].ParentID == RecentGroupID) { // found it in the same group
int GroupOrder = TreeCtrl->IDToOrder(RecentGroupID);
TreeCtrl->m_value.MoveElem(i, (GroupOrder >= 0) ? (GroupOrder + 1) : 0); // now move it to the top of recent messages list
@@ -208,9 +208,9 @@ void CProtoSettings::SetMsgFormat(int Flags, TCString Message) else
Title = Message;
- TCHAR *p = Title.GetBuffer();
+ wchar_t *p = Title.GetBuffer();
while (*p) { // remove "garbage"
- if (!(p = _tcspbrk(p, L"\r\n\t")))
+ if (!(p = wcspbrk(p, L"\r\n\t")))
break;
*p++ = ' ';
@@ -266,7 +266,7 @@ TCString CProtoSettings::GetMsgFormat(int Flags, int *pOrder) }
}
if (Flags & GMF_PERSONAL && Message == NULL) // try getting personal message (it overrides global)
- Message = db_get_s(NULL, MOD_NAME, ProtoStatusToDBSetting(DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPROTOMSGS), (TCHAR*)NULL);
+ Message = db_get_s(NULL, MOD_NAME, ProtoStatusToDBSetting(DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPROTOMSGS), (wchar_t*)NULL);
if (Flags & GMF_PROTOORGLOBAL && Message == NULL) {
Message = CProtoSettings().GetMsgFormat(GMF_PERSONAL | (Flags & GMF_TEMPORARY), pOrder);
@@ -279,7 +279,7 @@ TCString CProtoSettings::GetMsgFormat(int Flags, int *pOrder) TreeCtrl->DBToMem(CString(MOD_NAME));
Message = NULL;
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_USELASTMSG)) { // if using last message by default...
- Message = db_get_s(NULL, MOD_NAME, ProtoStatusToDBSetting(DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPROTOMSGS), (TCHAR*)NULL); // try per-protocol message first
+ Message = db_get_s(NULL, MOD_NAME, ProtoStatusToDBSetting(DB_STATUSMSG, IDC_MOREOPTDLG_PERSTATUSPROTOMSGS), (wchar_t*)NULL); // try per-protocol message first
if (Message.IsEmpty()) {
Message = NULL; // to be sure it's NULL, not "" - as we're checking 'Message == NULL' later
int RecentGroupID = GetRecentGroupID(Status);
diff --git a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp index a095882f72..bc8398e62e 100644 --- a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp @@ -62,10 +62,10 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam awayData->hSeq = (HANDLE)ProtoChainSend(awayData->hContact, PSS_GETAWAYMSG, 0, 0);
WindowList_Add(g_hReadWndList, hwndDlg, awayData->hContact);
- TCHAR str[256], format[128];
- TCHAR *contactName = pcli->pfnGetContactDisplayName(awayData->hContact, 0);
+ wchar_t str[256], format[128];
+ wchar_t *contactName = pcli->pfnGetContactDisplayName(awayData->hContact, 0);
char *szProto = GetContactProto(awayData->hContact);
- TCHAR *status = pcli->pfnGetStatusModeDescription(db_get_w(awayData->hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
+ wchar_t *status = pcli->pfnGetStatusModeDescription(db_get_w(awayData->hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
GetWindowText(hwndDlg, format, _countof(format));
mir_sntprintf(str, format, status, contactName);
SetWindowText(hwndDlg, str);
@@ -88,7 +88,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam UnhookEvent(awayData->hAwayMsgEvent);
awayData->hAwayMsgEvent = NULL;
}
- const TCHAR *ptszStatusMsg = (const TCHAR*)ack->lParam;
+ const wchar_t *ptszStatusMsg = (const wchar_t*)ack->lParam;
SetDlgItemText(hwndDlg, IDC_READAWAYMSG_MSG, ptszStatusMsg);
ShowWindow(GetDlgItem(hwndDlg, IDC_READAWAYMSG_RETRIEVE), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_READAWAYMSG_MSG), SW_SHOW);
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp index 46399f0b97..f961e23d84 100644 --- a/plugins/NewAwaySysMod/src/Services.cpp +++ b/plugins/NewAwaySysMod/src/Services.cpp @@ -29,7 +29,7 @@ struct NAS_PROTOINFOv1 union {
char *szMsg;
WCHAR *wszMsg;
- TCHAR *tszMsg;
+ wchar_t *tszMsg;
};
WORD status;
};
@@ -68,7 +68,7 @@ INT_PTR SetStatusMode(WPARAM wParam, LPARAM lParam) // called by GamerStatus and _ASSERT(!g_fNoProcessing && g_ProtoStates[(char*)NULL].m_status == wParam);
g_fNoProcessing = false;
- CProtoSettings(NULL, wParam).SetMsgFormat(SMF_TEMPORARY, lParam ? (TCHAR*)_A2T((char*)lParam) : CProtoSettings(NULL, wParam).GetMsgFormat(GMF_LASTORDEFAULT));
+ CProtoSettings(NULL, wParam).SetMsgFormat(SMF_TEMPORARY, lParam ? (wchar_t*)_A2T((char*)lParam) : CProtoSettings(NULL, wParam).GetMsgFormat(GMF_LASTORDEFAULT));
ChangeProtoMessages(NULL, wParam, TCString());
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 6d124b2157..9d0346a124 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -78,9 +78,9 @@ static LRESULT CALLBACK MsgEditSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, SendMessage(hWnd, WM_KEYDOWN, VK_LEFT, 0);
SendMessage(hWnd, EM_GETSEL, (WPARAM)&start, NULL);
int nLen = GetWindowTextLength(hWnd);
- TCHAR *text = (TCHAR*)_alloca((nLen + 1) * sizeof(TCHAR));
+ wchar_t *text = (wchar_t*)_alloca((nLen + 1) * sizeof(wchar_t));
GetWindowText(hWnd, text, nLen + 1);
- memmove(text + start, text + end, sizeof(TCHAR)* (mir_tstrlen(text) + 1 - end));
+ memmove(text + start, text + end, sizeof(wchar_t)* (mir_tstrlen(text) + 1 - end));
SetWindowText(hWnd, text);
SendMessage(hWnd, EM_SETSEL, start, start);
@@ -439,24 +439,24 @@ HICON g_LoadIconEx(const char* name, bool big) struct {
int DlgItem, IconIndex;
- TCHAR* Text;
+ wchar_t* Text;
}
static Buttons[] =
{
- { IDC_SAWAYMSG_SAVEMSG, ILI_SAVE, LPGENT("Save, replacing the selected message") },
- { IDC_SAWAYMSG_SAVEASNEW, ILI_SAVEASNEW, LPGENT("Save as a new message") },
- { IDC_SAWAYMSG_NEWCATEGORY, ILI_NEWCATEGORY, LPGENT("Create new category") },
- { IDC_SAWAYMSG_DELETE, ILI_DELETE, LPGENT("Delete") },
- { IDC_SAWAYMSG_VARS, ILI_NOICON, LPGENT("Open Variables help dialog") },
- { IDC_SAWAYMSG_OPTIONS, ILI_SETTINGS, LPGENT("Show settings menu") }
+ { IDC_SAWAYMSG_SAVEMSG, ILI_SAVE, LPGENW("Save, replacing the selected message") },
+ { IDC_SAWAYMSG_SAVEASNEW, ILI_SAVEASNEW, LPGENW("Save as a new message") },
+ { IDC_SAWAYMSG_NEWCATEGORY, ILI_NEWCATEGORY, LPGENW("Create new category") },
+ { IDC_SAWAYMSG_DELETE, ILI_DELETE, LPGENW("Delete") },
+ { IDC_SAWAYMSG_VARS, ILI_NOICON, LPGENW("Open Variables help dialog") },
+ { IDC_SAWAYMSG_OPTIONS, ILI_SETTINGS, LPGENW("Show settings menu") }
};
struct {
int m_dlgItemID;
- TCHAR* Text;
+ wchar_t* Text;
} Tooltips[] = {
- IDC_SAWAYMSG_IGNOREREQ, LPGENT("Don't send the status message to selected contact(s)"),
- IDC_SAWAYMSG_SENDMSG, LPGENT("Send an autoreply to selected contact(s)"),
+ IDC_SAWAYMSG_IGNOREREQ, LPGENW("Don't send the status message to selected contact(s)"),
+ IDC_SAWAYMSG_SENDMSG, LPGENW("Send an autoreply to selected contact(s)"),
};
INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -727,7 +727,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (Message == NULL)
Message = CurMessage;
- else if (CurMessage != (const TCHAR*)Message) {
+ else if (CurMessage != (const wchar_t*)Message) {
Message = L"";
BtnTitle = TranslateT("Apply");
MessageDetermined = true;
@@ -842,7 +842,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA SendMessage(hwndDlg, UM_SAM_APPLYANDCLOSE, 0, 0);
return true;
}
- TCHAR BtnTitle[64];
+ wchar_t BtnTitle[64];
mir_sntprintf(BtnTitle, TranslateT("Closing in %d"), Countdown);
SetDlgItemText(hwndDlg, IDC_OK, BtnTitle);
Countdown--;
@@ -1016,7 +1016,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA switch (HIWORD(wParam)) {
case EN_CHANGE:
if (LOWORD(wParam) == IDC_SAWAYMSG_MSGDATA)
- SetDlgItemText(hwndDlg, IDC_OK, TranslateTS((GetSelContactsNum(CList) > 1) ? LPGENT("Apply") : LPGENT("OK")));
+ SetDlgItemText(hwndDlg, IDC_OK, TranslateTS((GetSelContactsNum(CList) > 1) ? LPGENW("Apply") : LPGENW("OK")));
break;
case EN_KILLFOCUS:
@@ -1127,7 +1127,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA TCString NewMsg;
GetDlgItemText(hwndDlg, IDC_SAWAYMSG_MSGDATA, NewMsg.GetBuffer(AWAY_MSGDATA_MAX), AWAY_MSGDATA_MAX);
NewMsg.ReleaseBuffer();
- if (((CTreeItem*)TreeItem)->User_Str1 != (const TCHAR*)NewMsg) {
+ if (((CTreeItem*)TreeItem)->User_Str1 != (const wchar_t*)NewMsg) {
((CTreeItem*)TreeItem)->User_Str1 = NewMsg;
MsgTree->SetModified(true);
}
@@ -1166,7 +1166,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA GetDlgItemText(hwndDlg, IDC_OK, BtnTitle.GetBuffer(64), 64);
BtnTitle.ReleaseBuffer();
ApplySelContactsMessage(dat, CList);
- if (BtnTitle != (const TCHAR*)TranslateT("Apply"))
+ if (BtnTitle != (const wchar_t*)TranslateT("Apply"))
SendMessage(hwndDlg, UM_SAM_APPLYANDCLOSE, 0, 0);
}
}
diff --git a/plugins/NewAwaySysMod/src/stdafx.h b/plugins/NewAwaySysMod/src/stdafx.h index d22135d6a1..1c2966b9be 100644 --- a/plugins/NewAwaySysMod/src/stdafx.h +++ b/plugins/NewAwaySysMod/src/stdafx.h @@ -34,7 +34,6 @@ #include <time.h>
#include <shellapi.h>
#include <crtdbg.h>
-#include <tchar.h>
#include <stdarg.h>
#include "newpluginapi.h"
@@ -137,13 +136,15 @@ #define WRITE_INTERPRET 4
#define WRITE_CMSG 8
-#define TOGGLE_SOE_COMMAND LPGENT("Toggle autoreply on/off")
-#define DISABLE_SOE_COMMAND LPGENT("Toggle autoreply off")
-#define ENABLE_SOE_COMMAND LPGENT("Toggle autoreply on")
+#define TOGGLE_SOE_COMMAND LPGENW("Toggle autoreply on/off")
+#define DISABLE_SOE_COMMAND LPGENW("Toggle autoreply off")
+#define ENABLE_SOE_COMMAND LPGENW("Toggle autoreply on")
#define STR_XSTATUSDESC TranslateT("extended status")
#define MOD_NAME "NewAwaySys"
+#define MOD_NAMEW L"NewAwaySys"
+
#define LOG_ID MOD_NAME // LogService log ID
#define LOG_PREFIX MOD_NAME ": " // netlib.log prefix for all NAS' messages
@@ -198,7 +199,7 @@ #define VPF_XSTATUS 1 // use "extended status" instead of the usual status description in %nas_statdesc%, and XStatus message in %nas_message%
// options dialog
-#define OPT_TITLE LPGENT("Away System")
+#define OPT_TITLE LPGENW("Away System")
#define OPT_MAINGROUP LPGEN("Status")
#define OPT_POPUPGROUP LPGEN("Popups")
@@ -300,7 +301,7 @@ void InitOptions(); // called once when plugin is loaded //int ShowPopupNotification(COptPage &PopupNotifyData, MCONTACT hContact, int iStatusMode);
void ShowLog(TCString &LogFilePath);
-void ShowMsg(TCHAR *szFirstLine, TCHAR *szSecondLine = L"", bool IsErrorMsg = false, int Timeout = 0);
+void ShowMsg(wchar_t *szFirstLine, wchar_t *szSecondLine = L"", bool IsErrorMsg = false, int Timeout = 0);
#define AWAYSYS_STATUSMSGREQUEST_SOUND "AwaySysStatusMsgRequest"
#define ME_AWAYSYS_WORKAROUND "AwaySys/_CallService"
@@ -323,7 +324,7 @@ static __inline int LogMessage(const char *Format, ...) return CallService(MS_NETLIB_LOG, NULL, (LPARAM)szText);
}
-__inline int CallAllowedPS_SETAWAYMSG(const char *szProto, int iMode, const TCHAR *szMsg)
+__inline int CallAllowedPS_SETAWAYMSG(const char *szProto, int iMode, const wchar_t *szMsg)
{ // we must use this function everywhere we want to call PS_SETAWAYMSG, otherwise NAS won't allow to change the message!
LogMessage("PS_SETAWAYMSG called by NAS. szProto=%s, Status=%d, Msg:\n%S", szProto, iMode, szMsg ? szMsg : L"NULL");
return CallProtoService(szProto, PS_SETAWAYMSG, iMode, (LPARAM)szMsg);
|