diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
commit | 428bf0cbd77813a43094cb5c984436deff251936 (patch) | |
tree | d7dfa8971153d53a849e45c942be97fe5b90b7ec /plugins/MyDetails/src | |
parent | 82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff) |
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src')
-rw-r--r-- | plugins/MyDetails/src/data.cpp | 26 | ||||
-rw-r--r-- | plugins/MyDetails/src/frame.cpp | 16 | ||||
-rw-r--r-- | plugins/MyDetails/src/mydetails.cpp | 4 | ||||
-rw-r--r-- | plugins/MyDetails/src/options.cpp | 2 |
4 files changed, 24 insertions, 24 deletions
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index 681c2d4f61..6005135cd8 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -113,7 +113,7 @@ int Protocol::GetStatus() 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;
+ css.flags = CSSF_UNICODE | CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_DEFAULT_NAME;
css.status = &custom_status;
css.ptszName = tszXStatusName;
css.ptszMessage = tszXStatusMessage;
@@ -132,7 +132,7 @@ int Protocol::GetStatus() lcopystr(status_name, tmp, _countof(status_name));
}
else {
- wchar_t *p = (tszXStatusName[0] != 0) ? TranslateTS(tszXStatusName) : TranslateT("<no status name>");
+ wchar_t *p = (tszXStatusName[0] != 0) ? TranslateW(tszXStatusName) : TranslateT("<no status name>");
if (tszXStatusMessage[0])
mir_snwprintf(status_name, L"%s: %s", p, tszXStatusMessage);
else
@@ -214,11 +214,11 @@ 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)) {
- ptrW tmp((wchar_t *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
+ ptrW tmp((wchar_t *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_UNICODE));
lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
- else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGT)) {
- ptrW tmp((wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, (LPARAM)name));
+ else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGW)) {
+ ptrW tmp((wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGW, (WPARAM)aStatus, (LPARAM)name));
lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
}
@@ -306,7 +306,7 @@ void Protocol::SetNick(const wchar_t *nick) return;
// Get it
- CallProtoService(name, PS_SETMYNICKNAME, SMNN_TCHAR, (LPARAM)nick);
+ CallProtoService(name, PS_SETMYNICKNAME, SMNN_UNICODE, (LPARAM)nick);
}
bool Protocol::CanSetAvatar()
@@ -343,7 +343,7 @@ wchar_t *Protocol::GetListeningTo() }
DBVARIANT dbv = { 0 };
- if (db_get_ts(NULL, name, "ListeningTo", &dbv)) {
+ if (db_get_ws(NULL, name, "ListeningTo", &dbv)) {
lcopystr(listening_to, L"", _countof(listening_to));
return listening_to;
}
@@ -460,7 +460,7 @@ void ProtocolArray::SetNicks(const wchar_t *nick) mir_wstrncpy(default_nick, nick, _countof(default_nick));
- db_set_ts(0, MODULE_NAME, SETTING_DEFAULT_NICK, nick);
+ db_set_ws(0, MODULE_NAME, SETTING_DEFAULT_NICK, nick);
for (int i = 0; i < buffer_len; i++)
buffer[i]->SetNick(default_nick);
@@ -480,11 +480,11 @@ void ProtocolArray::SetStatusMsgs(const wchar_t *message) void ProtocolArray::SetStatusMsgs(int status, const wchar_t *message)
{
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), message);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), message);
// Save default also
if (!db_get_b(NULL, "SRAway", StatusModeToDbSetting(status, "UsePrev"), 0))
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Default"), message);
+ db_set_ws(NULL, "SRAway", StatusModeToDbSetting(status, "Default"), message);
for (int i = 0; i < buffer_len; i++)
if (buffer[i]->status == status)
@@ -493,7 +493,7 @@ void ProtocolArray::SetStatusMsgs(int status, const wchar_t *message) void ProtocolArray::GetDefaultNick()
{
- ptrW tszNick(db_get_tsa(0, MODULE_NAME, SETTING_DEFAULT_NICK));
+ ptrW tszNick(db_get_wsa(0, MODULE_NAME, SETTING_DEFAULT_NICK));
if (tszNick)
mir_wstrncpy(default_nick, tszNick, _countof(default_nick));
else
@@ -502,7 +502,7 @@ void ProtocolArray::GetDefaultNick() void ProtocolArray::GetDefaultAvatar()
{
- ptrW tszFile(db_get_tsa(0, "ContactPhoto", "File"));
+ ptrW tszFile(db_get_wsa(0, "ContactPhoto", "File"));
if (tszFile)
mir_wstrncpy(default_avatar_file, tszFile, _countof(default_avatar_file));
else
@@ -521,7 +521,7 @@ wchar_t *ProtocolArray::GetDefaultStatusMsg(int status) if (status == ID_STATUS_CONNECTING)
status = ID_STATUS_OFFLINE;
- wchar_t *tmp = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)status, 0);
+ wchar_t *tmp = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGW, (WPARAM)status, 0);
if (tmp != NULL) {
mir_wstrncpy(default_status_message, tmp, _countof(default_status_message));
mir_free(tmp);
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index b392bbc185..3ab2d647e4 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -62,7 +62,7 @@ HGENMENU hMenuShowHideFrame = 0; #define FONT_LISTENING_TO 4
#define NUM_FONTS 5
-FontIDT font_id[NUM_FONTS];
+FontIDW font_id[NUM_FONTS];
HFONT hFont[NUM_FONTS];
COLORREF font_colour[NUM_FONTS];
@@ -198,7 +198,7 @@ int ReloadFont(WPARAM, LPARAM) DeleteObject(hFont[i]);
LOGFONT log_font;
- font_colour[i] = CallService(MS_FONT_GETT, (WPARAM)&font_id[i], (LPARAM)&log_font);
+ font_colour[i] = CallService(MS_FONT_GETW, (WPARAM)&font_id[i], (LPARAM)&log_font);
hFont[i] = CreateFontIndirect(&log_font);
}
@@ -233,7 +233,7 @@ int CreateFrame() for (int i = 0; i < NUM_FONTS; i++) {
memset(&font_id[i], 0, sizeof(font_id[i]));
- font_id[i].cbSize = sizeof(FontIDT);
+ font_id[i].cbSize = sizeof(FontIDW);
mir_wstrncpy(font_id[i].group, LPGENW("My details"), _countof(font_id[i].group));
mir_wstrncpy(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));
@@ -249,7 +249,7 @@ int CreateFrame() mir_wstrncpy(font_id[i].deffontsettings.szFace, L"Tahoma", _countof(font_id[i].deffontsettings.szFace));
font_id[i].order = i;
font_id[i].flags = FIDF_DEFAULTVALID;
- FontRegisterT(&font_id[i]);
+ FontRegisterW(&font_id[i]);
}
ReleaseDC(NULL, hdc);
@@ -282,7 +282,7 @@ int CreateFrame() Frame.hWnd = hwnd_frame;
Frame.align = alTop;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_SKINNED | F_TCHAR;
+ Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_SKINNED | F_UNICODE;
Frame.height = 100;
frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -332,7 +332,7 @@ int CreateFrame() 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.flags = CMIF_UNICODE;
mi.position = 1;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
mi.name.w = LPGENW("Show my details");
@@ -483,7 +483,7 @@ RECT GetRect(HDC hdc, RECT rc, const wchar_t *text, const wchar_t *def_text, Pro const wchar_t *tmp;
if (text[0] == '\0')
- tmp = TranslateTS(def_text);
+ tmp = TranslateW(def_text);
else
tmp = text;
@@ -1025,7 +1025,7 @@ void DrawTextWithRect(HDC hdc, const wchar_t *text, const wchar_t *def_text, REC {
const wchar_t *tmp;
if (text[0] == '\0')
- tmp = TranslateTS(def_text);
+ tmp = TranslateW(def_text);
else
tmp = text;
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index 7688d7c586..a0b2d82d32 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -90,12 +90,12 @@ static int MainInit(WPARAM, LPARAM) CMenuItem mi;
SET_UID(mi, 0x73ff525d, 0x7b8, 0x49cc, 0xa2, 0xdf, 0xc5, 0xad, 0x13, 0xf3, 0x8e, 0x2d);
mi.position = 500050000;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.name.w = LPGENW("My details");
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.root = hMenuRoot;
mi.hIcolibItem = NULL;
diff --git a/plugins/MyDetails/src/options.cpp b/plugins/MyDetails/src/options.cpp index c9be969e5c..66ad5e529f 100644 --- a/plugins/MyDetails/src/options.cpp +++ b/plugins/MyDetails/src/options.cpp @@ -168,7 +168,7 @@ int InitOptionsCallback(WPARAM wParam, LPARAM) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTS);
odp.pwszGroup = LPGENW("Contact list");
odp.pwszTitle = LPGENW("My details");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
Options_AddPage(wParam, &odp);
return 0;
}
|