diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/MyDetails/src | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src')
-rw-r--r-- | plugins/MyDetails/src/data.cpp | 48 | ||||
-rw-r--r-- | plugins/MyDetails/src/data.h | 50 | ||||
-rw-r--r-- | plugins/MyDetails/src/frame.cpp | 46 | ||||
-rw-r--r-- | plugins/MyDetails/src/mydetails.cpp | 10 | ||||
-rw-r--r-- | plugins/MyDetails/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/MyDetails/src/services.cpp | 24 |
6 files changed, 91 insertions, 91 deletions
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index 838c398f46..c9b2a1b0ea 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -52,7 +52,7 @@ void DeInitProtocolData() // Protocol Class ///////////////////////////////////////////////////////////////////////////////////////////
-Protocol::Protocol(const char *aName, const TCHAR *descr)
+Protocol::Protocol(const char *aName, const wchar_t *descr)
{
mir_strncpy(name, aName, _countof(name));
mir_tstrncpy(description, descr, _countof(description));
@@ -84,7 +84,7 @@ Protocol::~Protocol() {
}
-void Protocol::lcopystr(TCHAR *dest, TCHAR *src, size_t maxlen)
+void Protocol::lcopystr(wchar_t *dest, wchar_t *src, size_t maxlen)
{
if (mir_tstrcmp(dest, src) != 0) {
data_changed = true;
@@ -110,7 +110,7 @@ int Protocol::GetStatus() // check if protocol supports custom status
CUSTOM_STATUS css = { sizeof(css) };
- TCHAR tszXStatusName[256], tszXStatusMessage[1024];
+ wchar_t tszXStatusName[256], tszXStatusMessage[1024];
if (ProtoServiceExists(name, PS_GETCUSTOMSTATUSEX)) {
// check if custom status is set
css.flags = CSSF_TCHAR | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_DEFAULT_NAME;
@@ -128,11 +128,11 @@ int Protocol::GetStatus() custom_status = 0;
if (custom_status == 0) {
- TCHAR *tmp = pcli->pfnGetStatusModeDescription(status, 0);
+ wchar_t *tmp = pcli->pfnGetStatusModeDescription(status, 0);
lcopystr(status_name, tmp, _countof(status_name));
}
else {
- TCHAR *p = (tszXStatusName[0] != 0) ? TranslateTS(tszXStatusName) : TranslateT("<no status name>");
+ wchar_t *p = (tszXStatusName[0] != 0) ? TranslateTS(tszXStatusName) : TranslateT("<no status name>");
if (tszXStatusMessage[0])
mir_sntprintf(status_name, L"%s: %s", p, tszXStatusMessage);
else
@@ -168,7 +168,7 @@ void Protocol::SetStatus(int aStatus) pse[0]->status = aStatus;
pse[0]->szName = name;
- TCHAR status_msg[256];
+ wchar_t status_msg[256];
GetStatusMsg(aStatus, status_msg, _countof(status_msg));
pse[0]->szMsg = status_msg;
@@ -182,7 +182,7 @@ void Protocol::SetStatus(int aStatus) CallProtoService(name, PS_SETSTATUS, aStatus, 0);
if (CanSetStatusMsg(aStatus)) {
- TCHAR status_msg[MS_MYDETAILS_GETMYSTATUSMESSAGE_BUFFER_SIZE];
+ wchar_t status_msg[MS_MYDETAILS_GETMYSTATUSMESSAGE_BUFFER_SIZE];
GetStatusMsg(aStatus, status_msg, _countof(status_msg));
SetStatusMsg(aStatus, status_msg);
}
@@ -209,32 +209,32 @@ bool Protocol::CanSetStatusMsg(int aStatus) return CanGetStatusMsg(aStatus);
}
-void Protocol::GetStatusMsg(int aStatus, TCHAR *msg, size_t msg_size)
+void Protocol::GetStatusMsg(int aStatus, wchar_t *msg, size_t msg_size)
{
if (!CanGetStatusMsg())
lcopystr(msg, L"", msg_size);
else if (aStatus == status && ProtoServiceExists(name, PS_GETMYAWAYMSG)) {
- ptrT tmp((TCHAR *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
+ ptrT tmp((wchar_t *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGT)) {
- ptrT tmp((TCHAR *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, (LPARAM)name));
+ ptrT tmp((wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, (LPARAM)name));
lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
}
-TCHAR* Protocol::GetStatusMsg()
+wchar_t* Protocol::GetStatusMsg()
{
GetStatusMsg(status, status_message, _countof(status_message));
return status_message;
}
-void Protocol::SetStatusMsg(const TCHAR *message)
+void Protocol::SetStatusMsg(const wchar_t *message)
{
SetStatusMsg(GetStatus(), message);
}
-void Protocol::SetStatusMsg(int aStatus, const TCHAR *message)
+void Protocol::SetStatusMsg(int aStatus, const wchar_t *message)
{
if (!CanSetStatusMsg(aStatus))
return;
@@ -284,7 +284,7 @@ int Protocol::GetNickMaxLength() return ret;
}
-TCHAR* Protocol::GetNick()
+wchar_t* Protocol::GetNick()
{
ptrT nick(Contact_GetInfo(CNF_DISPLAY, NULL, name));
lcopystr(nickname, (nick != NULL) ? nick : L"", _countof(nickname));
@@ -296,7 +296,7 @@ bool Protocol::CanSetNick() return can_set_nick;
}
-void Protocol::SetNick(const TCHAR *nick)
+void Protocol::SetNick(const wchar_t *nick)
{
// See if can get one
if (!CanSetNick())
@@ -314,7 +314,7 @@ bool Protocol::CanSetAvatar() return g_bAvsExist && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)name, 0);
}
-void Protocol::SetAvatar(const TCHAR *file_name)
+void Protocol::SetAvatar(const wchar_t *file_name)
{
if (CanSetAvatar())
CallService(MS_AV_SETMYAVATART, (WPARAM)name, (LPARAM)file_name);
@@ -335,7 +335,7 @@ bool Protocol::ListeningToEnabled() return CanSetListeningTo() && CallService(MS_LISTENINGTO_ENABLED, (WPARAM)name, 0) != 0;
}
-TCHAR *Protocol::GetListeningTo()
+wchar_t *Protocol::GetListeningTo()
{
if (!CanGetListeningTo()) {
lcopystr(listening_to, L"", _countof(listening_to));
@@ -445,7 +445,7 @@ bool ProtocolArray::CanSetAvatars() return g_bAvsExist;
}
-void ProtocolArray::SetAvatars(const TCHAR *file_name)
+void ProtocolArray::SetAvatars(const wchar_t *file_name)
{
if (!CanSetAvatars())
return;
@@ -453,7 +453,7 @@ void ProtocolArray::SetAvatars(const TCHAR *file_name) CallService(MS_AV_SETMYAVATART, NULL, (WPARAM)file_name);
}
-void ProtocolArray::SetNicks(const TCHAR *nick)
+void ProtocolArray::SetNicks(const wchar_t *nick)
{
if (nick == NULL || nick[0] == '\0')
return;
@@ -472,13 +472,13 @@ void ProtocolArray::SetStatus(int aStatus) CallService(MS_CLIST_SETSTATUSMODE, aStatus, 0);
}
-void ProtocolArray::SetStatusMsgs(const TCHAR *message)
+void ProtocolArray::SetStatusMsgs(const wchar_t *message)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_IDLE; i++)
SetStatusMsgs(i, message);
}
-void ProtocolArray::SetStatusMsgs(int status, const TCHAR *message)
+void ProtocolArray::SetStatusMsgs(int status, const wchar_t *message)
{
db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), message);
@@ -509,19 +509,19 @@ void ProtocolArray::GetDefaultAvatar() default_avatar_file[0] = '\0';
}
-TCHAR *ProtocolArray::GetDefaultStatusMsg()
+wchar_t *ProtocolArray::GetDefaultStatusMsg()
{
return GetDefaultStatusMsg(CallService(MS_CLIST_GETSTATUSMODE, 0, 0));
}
-TCHAR *ProtocolArray::GetDefaultStatusMsg(int status)
+wchar_t *ProtocolArray::GetDefaultStatusMsg(int status)
{
default_status_message[0] = '\0';
if (status == ID_STATUS_CONNECTING)
status = ID_STATUS_OFFLINE;
- TCHAR *tmp = (TCHAR *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)status, 0);
+ wchar_t *tmp = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)status, 0);
if (tmp != NULL) {
mir_tstrncpy(default_status_message, tmp, _countof(default_status_message));
mir_free(tmp);
diff --git a/plugins/MyDetails/src/data.h b/plugins/MyDetails/src/data.h index 6af422d56d..5f70525f38 100644 --- a/plugins/MyDetails/src/data.h +++ b/plugins/MyDetails/src/data.h @@ -34,18 +34,18 @@ protected: bool can_have_listening_to;
int PF3;
- void lcopystr(TCHAR *dest, TCHAR *src, size_t maxlen);
+ void lcopystr(wchar_t *dest, wchar_t *src, size_t maxlen);
public:
// Name of protocol
char name[256];
- TCHAR description[256];
- TCHAR nickname[256];
- TCHAR status_name[256];
- TCHAR status_message[1024];
- TCHAR listening_to[1024];
+ wchar_t description[256];
+ wchar_t nickname[256];
+ wchar_t status_name[256];
+ wchar_t status_message[1024];
+ wchar_t listening_to[1024];
AVATARCACHEENTRY *ace;
- TCHAR avatar_file[1024];
+ wchar_t avatar_file[1024];
HBITMAP avatar_bmp;
int status;
int custom_status;
@@ -57,7 +57,7 @@ public: // Methods ///////////////
- Protocol(const char *name, const TCHAR *descr);
+ Protocol(const char *name, const wchar_t *descr);
~Protocol();
bool IsValid();
@@ -70,27 +70,27 @@ public: void GetAvatar(); // Copy to cache
bool CanSetAvatar();
- void SetAvatar(const TCHAR *file_name);
+ void SetAvatar(const wchar_t *file_name);
//void SetAvatar(const char *file_name, HBITMAP hBmp);
- TCHAR *GetNick(); // Copy to cache and return a copy
+ wchar_t *GetNick(); // Copy to cache and return a copy
int GetNickMaxLength();
bool CanSetNick();
- void SetNick(const TCHAR *nick);
+ void SetNick(const wchar_t *nick);
bool CanGetListeningTo();
bool CanSetListeningTo();
bool ListeningToEnabled();
- TCHAR *GetListeningTo(); // Copy to cache and return a copy
+ wchar_t *GetListeningTo(); // Copy to cache and return a copy
bool CanGetStatusMsg();
bool CanGetStatusMsg(int aStatus);
- TCHAR *GetStatusMsg(); // Copy to cache and return a copy
- void GetStatusMsg(int aStatus, TCHAR *msg, size_t msg_size);
+ wchar_t *GetStatusMsg(); // Copy to cache and return a copy
+ void GetStatusMsg(int aStatus, wchar_t *msg, size_t msg_size);
bool CanSetStatusMsg();
bool CanSetStatusMsg(int aStatus);
- void SetStatusMsg(const TCHAR *message);
- void SetStatusMsg(int aStatus, const TCHAR *message);
+ void SetStatusMsg(const wchar_t *message);
+ void SetStatusMsg(int aStatus, const wchar_t *message);
};
@@ -103,9 +103,9 @@ protected: int buffer_len;
public:
- TCHAR default_nick[256];
- TCHAR default_avatar_file[256];
- TCHAR default_status_message[256];
+ wchar_t default_nick[256];
+ wchar_t default_avatar_file[256];
+ wchar_t default_status_message[256];
// Methods ///////////////
@@ -120,14 +120,14 @@ public: void GetAvatars();
bool CanSetAvatars();
- void SetAvatars(const TCHAR *file);
+ void SetAvatars(const wchar_t *file);
- void SetNicks(const TCHAR *nick);
+ void SetNicks(const wchar_t *nick);
void SetStatus(int aStatus);
- void SetStatusMsgs(const TCHAR *message);
- void SetStatusMsgs(int status, const TCHAR *message);
+ void SetStatusMsgs(const wchar_t *message);
+ void SetStatusMsgs(int status, const wchar_t *message);
void GetStatusMsgs();
void GetStatuses();
@@ -137,8 +137,8 @@ public: void GetDefaultNick(); // Copy to cache
void GetDefaultAvatar(); // Copy to cache
- TCHAR *GetDefaultStatusMsg(); // Copy to cache
- TCHAR *GetDefaultStatusMsg(int status);
+ wchar_t *GetDefaultStatusMsg(); // Copy to cache
+ wchar_t *GetDefaultStatusMsg(int status);
bool CanSetListeningTo();
bool ListeningToEnabled();
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index e5a19095d5..2778f655b9 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -68,7 +68,7 @@ COLORREF font_colour[NUM_FONTS]; // Defaults
char *font_settings[] = { "NicknameFont", "AccountFont", "StatusFont", "StatusMessageFont", "ListeningToFont" };
-TCHAR *font_names[] = { LPGENT("Nickname"), LPGENT("Account"), LPGENT("Status"), LPGENT("Status message"), LPGENT("Listening to") };
+wchar_t *font_names[] = { LPGENW("Nickname"), LPGENW("Account"), LPGENW("Status"), LPGENW("Status message"), LPGENW("Listening to") };
char font_sizes[] = { 13, 8, 8, 8, 8 };
BYTE font_styles[] = { DBFONTF_BOLD, 0, 0, DBFONTF_ITALIC, DBFONTF_ITALIC };
COLORREF font_colors[] = { RGB(0, 0, 0), RGB(0, 0, 0), RGB(0, 0, 0), RGB(150, 150, 150), RGB(150, 150, 150) };
@@ -234,11 +234,11 @@ int CreateFrame() memset(&font_id[i], 0, sizeof(font_id[i]));
font_id[i].cbSize = sizeof(FontIDT);
- mir_tstrncpy(font_id[i].group, LPGENT("My details"), _countof(font_id[i].group));
+ mir_tstrncpy(font_id[i].group, LPGENW("My details"), _countof(font_id[i].group));
mir_tstrncpy(font_id[i].name, font_names[i], _countof(font_id[i].name));
mir_strncpy(font_id[i].dbSettingsGroup, MODULE_NAME, _countof(font_id[i].dbSettingsGroup));
- mir_tstrncpy(font_id[i].backgroundName, LPGENT("Background"), _countof(font_id[i].backgroundName));
- mir_tstrncpy(font_id[i].backgroundGroup, LPGENT("My details"), _countof(font_id[i].backgroundGroup));
+ mir_tstrncpy(font_id[i].backgroundName, LPGENW("Background"), _countof(font_id[i].backgroundName));
+ mir_tstrncpy(font_id[i].backgroundGroup, LPGENW("My details"), _countof(font_id[i].backgroundGroup));
mir_strncpy(font_id[i].prefix, font_settings[i], _countof(font_id[i].prefix));
@@ -328,14 +328,14 @@ int CreateFrame() // Create menu item
CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("My details"), 500010000);
+ mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("My details"), 500010000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8C1C981C-4F28-4C4C-9121-544156210CE9");
SET_UID(mi, 0x69a43f1d, 0x6ebd, 0x4e41, 0xa6, 0xbd, 0x18, 0xea, 0xc4, 0x3, 0x90, 0x35);
mi.flags = CMIF_TCHAR;
mi.position = 1;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
- mi.name.t = LPGENT("Show my details");
+ mi.name.w = LPGENW("Show my details");
mi.pszService = MODULE_NAME"/ShowHideMyDetails";
hMenuShowHideFrame = Menu_AddMainMenuItem(&mi);
Menu_ConfigureItem(hMenuShowHideFrame, MCI_OPT_EXECPARAM, -0x7FFFFFFF);
@@ -477,10 +477,10 @@ RECT GetRect(HDC hdc, RECT rc, SIZE s, UINT uFormat, int next_top, int text_left return r;
}
-RECT GetRect(HDC hdc, RECT rc, const TCHAR *text, const TCHAR *def_text, Protocol *proto, UINT uFormat,
+RECT GetRect(HDC hdc, RECT rc, const wchar_t *text, const wchar_t *def_text, Protocol *proto, UINT uFormat,
int next_top, int text_left, bool smileys = true, bool frame = true, bool end_elipsis_on_frame = true)
{
- const TCHAR *tmp;
+ const wchar_t *tmp;
if (text[0] == '\0')
tmp = TranslateTS(def_text);
@@ -493,11 +493,11 @@ RECT GetRect(HDC hdc, RECT rc, const TCHAR *text, const TCHAR *def_text, Protoco RECT r_tmp = rc;
// Only first line
- TCHAR *tmp2 = mir_tstrdup(tmp);
- TCHAR *pos = _tcschr(tmp2, '\r');
+ wchar_t *tmp2 = mir_tstrdup(tmp);
+ wchar_t *pos = wcschr(tmp2, '\r');
if (pos != NULL)
pos[0] = '\0';
- pos = _tcschr(tmp2, '\n');
+ pos = wcschr(tmp2, '\n');
if (pos != NULL)
pos[0] = '\0';
@@ -1021,20 +1021,20 @@ void EraseBackground(HWND hwnd, HDC hdc) }
}
-void DrawTextWithRect(HDC hdc, const TCHAR *text, const TCHAR *def_text, RECT rc, UINT uFormat, bool mouse_over, Protocol *proto)
+void DrawTextWithRect(HDC hdc, const wchar_t *text, const wchar_t *def_text, RECT rc, UINT uFormat, bool mouse_over, Protocol *proto)
{
- const TCHAR *tmp;
+ const wchar_t *tmp;
if (text[0] == '\0')
tmp = TranslateTS(def_text);
else
tmp = text;
// Only first line
- TCHAR *tmp2 = mir_tstrdup(tmp);
- TCHAR *pos = _tcsrchr(tmp2, '\r');
+ wchar_t *tmp2 = mir_tstrdup(tmp);
+ wchar_t *pos = wcsrchr(tmp2, '\r');
if (pos != NULL)
pos[0] = '\0';
- pos = _tcschr(tmp2, '\n');
+ pos = wcschr(tmp2, '\n');
if (pos != NULL)
pos[0] = '\0';
@@ -1418,7 +1418,7 @@ void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto if (mii.cch != 0) {
mii.cch++;
- mii.dwTypeData = (TCHAR *)malloc(sizeof(TCHAR) * mii.cch);
+ mii.dwTypeData = (wchar_t *)malloc(sizeof(wchar_t) * mii.cch);
GetMenuItemInfo(menu, i, TRUE, &mii);
if (mir_tstrcmp(mii.dwTypeData, proto->description) == 0)
@@ -1477,7 +1477,7 @@ void ShowListeningToMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto, P TranslateMenu(submenu);
// Add this proto to menu
- TCHAR tmp[128];
+ wchar_t tmp[128];
mir_sntprintf(tmp, TranslateT("Enable listening to for %s"), proto->description);
MENUITEMINFO mii = { 0 };
@@ -1715,7 +1715,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar TranslateMenu(submenu);
// Add this proto to menu
- TCHAR tmp[128];
+ wchar_t tmp[128];
mir_sntprintf(tmp, TranslateT("Set my avatar for %s..."), proto->description);
MENUITEMINFO mii = { 0 };
@@ -1755,7 +1755,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar TranslateMenu(submenu);
// Add this proto to menu
- TCHAR tmp[128];
+ wchar_t tmp[128];
mir_sntprintf(tmp, TranslateT("Set my nickname for %s..."), proto->description);
MENUITEMINFO mii = { 0 };
@@ -1796,7 +1796,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar // In status message?
else if (data->draw_away_msg && InsideRect(&p, &data->away_msg_rect)) {
- TCHAR tmp[128];
+ wchar_t tmp[128];
HMENU menu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_MENU1));
HMENU submenu = GetSubMenu(menu, 3);
@@ -1885,7 +1885,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar RemoveMenu(submenu, ID_DONT_CYCLE_THROUGH_PROTOS, MF_BYCOMMAND);
// Add this proto to menu
- TCHAR tmp[128];
+ wchar_t tmp[128];
mir_sntprintf(tmp, TranslateT("Enable listening to for %s"), proto->description);
MENUITEMINFO mii = { 0 };
@@ -2231,7 +2231,7 @@ INT_PTR HideFrameFunc(WPARAM, LPARAM) void FixMainMenu()
{
- Menu_ModifyItem(hMenuShowHideFrame, MyDetailsFrameVisible() ? LPGENT("Hide my details") : LPGENT("Show my details"));
+ Menu_ModifyItem(hMenuShowHideFrame, MyDetailsFrameVisible() ? LPGENW("Hide my details") : LPGENW("Show my details"));
}
#include <math.h>
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index c82cfac707..7688d7c586 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -92,7 +92,7 @@ static int MainInit(WPARAM, LPARAM) mi.position = 500050000;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
- mi.name.t = LPGENT("My details");
+ mi.name.w = LPGENW("My details");
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
mi.flags = CMIF_TCHAR;
@@ -102,7 +102,7 @@ static int MainInit(WPARAM, LPARAM) if (protocols->CanSetAvatars()) {
SET_UID(mi, 0xe5b2d79e, 0xd25a, 0x4f72, 0xa4, 0x1a, 0x21, 0xfd, 0x48, 0x6b, 0xb5, 0x6);
mi.position = 100001;
- mi.name.t = LPGENT("Set my avatar...");
+ mi.name.w = LPGENW("Set my avatar...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYAVATARUI, Menu_SetMyAvatarUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYAVATARUI;
Menu_AddMainMenuItem(&mi);
@@ -110,14 +110,14 @@ static int MainInit(WPARAM, LPARAM) SET_UID(mi, 0xa327838f, 0xea6, 0x4ba5, 0x95, 0x92, 0xd8, 0xc4, 0x80, 0x84, 0x3, 0x50);
mi.position = 100002;
- mi.name.t = LPGENT("Set my nickname...");
+ mi.name.w = LPGENW("Set my nickname...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYNICKNAMEUI, Menu_SetMyNicknameUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYNICKNAMEUI;
Menu_AddMainMenuItem(&mi);
SET_UID(mi, 0x57c0d407, 0x61e1, 0x4c08, 0x8f, 0xcb, 0x65, 0x6a, 0x73, 0x3e, 0x20, 0xa8);
mi.position = 100003;
- mi.name.t = LPGENT("Set my status message...");
+ mi.name.w = LPGENW("Set my status message...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI, Menu_SetMyStatusMessageUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI;
Menu_AddMainMenuItem(&mi);
@@ -125,7 +125,7 @@ static int MainInit(WPARAM, LPARAM) // Set protocols to show frame
SET_UID(mi, 0x248530a2, 0xfc37, 0x413a, 0x87, 0x62, 0xb1, 0xd1, 0xa8, 0x87, 0x39, 0x5c);
mi.position = 200001;
- mi.name.t = LPGENT("Show next account");
+ mi.name.w = LPGENW("Show next account");
mi.pszService = MS_MYDETAILS_SHOWNEXTPROTOCOL;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/MyDetails/src/options.cpp b/plugins/MyDetails/src/options.cpp index 0bc92981c0..c9be969e5c 100644 --- a/plugins/MyDetails/src/options.cpp +++ b/plugins/MyDetails/src/options.cpp @@ -166,8 +166,8 @@ int InitOptionsCallback(WPARAM wParam, LPARAM) odp.hInstance = hInst;
odp.pfnDlgProc = DlgProcOpts;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTS);
- odp.ptszGroup = LPGENT("Contact list");
- odp.ptszTitle = LPGENT("My details");
+ odp.pwszGroup = LPGENW("Contact list");
+ odp.pwszTitle = LPGENW("My details");
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
Options_AddPage(wParam, &odp);
return 0;
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp index 16fcf7eb93..30be916a0f 100644 --- a/plugins/MyDetails/src/services.cpp +++ b/plugins/MyDetails/src/services.cpp @@ -48,7 +48,7 @@ static INT_PTR CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam // All protos have the same nick?
if (protocols->GetSize() > 0) {
- TCHAR *nick = protocols->Get(0)->nickname;
+ wchar_t *nick = protocols->Get(0)->nickname;
bool foundDefNick = true;
for (int i = 1; foundDefNick && i < protocols->GetSize(); i++) {
@@ -69,7 +69,7 @@ static INT_PTR CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam else {
Protocol *proto = protocols->Get(proto_num);
- TCHAR tmp[128];
+ wchar_t tmp[128];
mir_sntprintf(tmp, TranslateT("Set my nickname for %s"), proto->description);
SetWindowText(hwndDlg, tmp);
@@ -92,7 +92,7 @@ static INT_PTR CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam switch (wParam) {
case IDOK:
{
- TCHAR tmp[MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE];
+ wchar_t tmp[MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE];
GetDlgItemText(hwndDlg, IDC_NICKNAME, tmp, _countof(tmp));
LONG_PTR proto_num = GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -168,7 +168,7 @@ INT_PTR PluginCommand_SetMyNickname(WPARAM wParam, LPARAM lParam) if (!protocols->Get(i)->CanSetNick())
return -2;
- protocols->Get(i)->SetNick((TCHAR *)lParam);
+ protocols->Get(i)->SetNick((wchar_t *)lParam);
return 0;
}
}
@@ -176,13 +176,13 @@ INT_PTR PluginCommand_SetMyNickname(WPARAM wParam, LPARAM lParam) return -1;
}
- protocols->SetNicks((TCHAR *)lParam);
+ protocols->SetNicks((wchar_t *)lParam);
return 0;
}
INT_PTR PluginCommand_GetMyNickname(WPARAM wParam, LPARAM lParam)
{
- TCHAR *ret = (TCHAR *)lParam;
+ wchar_t *ret = (wchar_t *)lParam;
if (ret == NULL)
return -1;
@@ -242,7 +242,7 @@ INT_PTR PluginCommand_SetMyAvatar(WPARAM wParam, LPARAM lParam) if (!protocols->Get(i)->CanSetAvatar())
return -2;
- protocols->Get(i)->SetAvatar((TCHAR *)lParam);
+ protocols->Get(i)->SetAvatar((wchar_t *)lParam);
return 0;
}
}
@@ -250,13 +250,13 @@ INT_PTR PluginCommand_SetMyAvatar(WPARAM wParam, LPARAM lParam) return -1;
}
- protocols->SetAvatars((TCHAR *)lParam);
+ protocols->SetAvatars((wchar_t *)lParam);
return 0;
}
INT_PTR PluginCommand_GetMyAvatar(WPARAM wParam, LPARAM lParam)
{
- TCHAR *ret = (TCHAR *)lParam;
+ wchar_t *ret = (wchar_t *)lParam;
char *proto = (char *)wParam;
if (ret == NULL)
@@ -332,7 +332,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w DestroyIcon(hIcon);
}
- TCHAR title[256];
+ wchar_t title[256];
mir_sntprintf(title, TranslateT("Set my status message for %s"), proto->description);
SetWindowText(hwndDlg, title);
@@ -341,7 +341,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w else if (data->status != 0) {
Window_SetProtoIcon_IcoLib(hwndDlg, NULL, data->status);
- TCHAR title[256];
+ wchar_t title[256];
mir_sntprintf(title, TranslateT("Set my status message for %s"), pcli->pfnGetStatusModeDescription(data->status, 0));
SetWindowText(hwndDlg, title);
@@ -359,7 +359,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w switch (wParam) {
case IDOK:
{
- TCHAR tmp[MS_MYDETAILS_GETMYSTATUSMESSAGE_BUFFER_SIZE];
+ wchar_t tmp[MS_MYDETAILS_GETMYSTATUSMESSAGE_BUFFER_SIZE];
GetDlgItemText(hwndDlg, IDC_STATUSMESSAGE, tmp, _countof(tmp));
SetStatusMessageData *data = (SetStatusMessageData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
|