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/TipperYM/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/TipperYM/src')
-rw-r--r-- | plugins/TipperYM/src/bitmap_func.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/message_pump.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 52 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 4 | ||||
-rw-r--r-- | plugins/TipperYM/src/skin_parser.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 18 | ||||
-rw-r--r-- | plugins/TipperYM/src/tipper.cpp | 60 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.cpp | 8 |
8 files changed, 74 insertions, 74 deletions
diff --git a/plugins/TipperYM/src/bitmap_func.cpp b/plugins/TipperYM/src/bitmap_func.cpp index fe9ecfce84..dcaf7b776c 100644 --- a/plugins/TipperYM/src/bitmap_func.cpp +++ b/plugins/TipperYM/src/bitmap_func.cpp @@ -154,7 +154,7 @@ void CreateFromBitmaps(bool bServiceTip) if (tszFileName && *tszFileName != 0) {
FIBITMAP *fib = NULL;
if (!skin.bCached) {
- FIBITMAP *fibLoad = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFileName, IMGL_TCHAR | IMGL_RETURNDIB);
+ FIBITMAP *fibLoad = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFileName, IMGL_WCHAR | IMGL_RETURNDIB);
if (!fibLoad) continue;
if (fii->FI_GetBPP(fibLoad) != 32)
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 558faed14f..f0e86cabb9 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -161,7 +161,7 @@ unsigned int CALLBACK MessagePumpThread(void*) }
if (swzMsg) {
- db_set_ts((DWORD_PTR)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
+ db_set_ws((DWORD_PTR)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
mir_free(swzMsg);
}
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index ae1b3e931b..157982366c 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -36,7 +36,7 @@ extern int IsTrayProto(const wchar_t *swzProto, BOOL bExtendedTip) DBVARIANT dbv;
int result = 1;
- if (!db_get_ts(NULL, MODULE, szSetting, &dbv)) {
+ if (!db_get_ws(NULL, MODULE, szSetting, &dbv)) {
result = wcsstr(dbv.ptszVal, swzProto) ? 1 : 0;
db_free(&dbv);
}
@@ -77,7 +77,7 @@ void CreateDefaultItems() }
DIListNode *di_node = (DIListNode *)mir_alloc(sizeof(DIListNode));
- wcsncpy(di_node->di.swzLabel, TranslateTS(item->swzLabel), LABEL_LEN);
+ wcsncpy(di_node->di.swzLabel, TranslateW(item->swzLabel), LABEL_LEN);
wcsncpy(di_node->di.swzValue, item->swzValue, VALUE_LEN);
di_node->di.bLineAbove = false;
di_node->di.bValueNewline = defaultItemList[i].bValueNewline;
@@ -97,7 +97,7 @@ bool LoadDS(DISPLAYSUBST *ds, int index) mir_snprintf(setting, "Name%d", index);
ds->swzName[0] = 0;
- if (db_get_ts(0, MODULE_ITEMS, setting, &dbv))
+ if (db_get_ws(0, MODULE_ITEMS, setting, &dbv))
return false;
wcsncpy(ds->swzName, dbv.ptszVal, _countof(ds->swzName));
@@ -140,7 +140,7 @@ void SaveDS(DISPLAYSUBST *ds, int index) char setting[512];
mir_snprintf(setting, "Name%d", index);
- db_set_ts(0, MODULE_ITEMS, setting, ds->swzName);
+ db_set_ws(0, MODULE_ITEMS, setting, ds->swzName);
mir_snprintf(setting, "Type%d", index);
db_set_b(0, MODULE_ITEMS, setting, (BYTE)ds->type);
mir_snprintf(setting, "Module%d", index);
@@ -158,7 +158,7 @@ bool LoadDI(DISPLAYITEM *di, int index) mir_snprintf(setting, "DILabel%d", index);
di->swzLabel[0] = 0;
- if (db_get_ts(0, MODULE_ITEMS, setting, &dbv))
+ if (db_get_ws(0, MODULE_ITEMS, setting, &dbv))
return false;
wcsncpy(di->swzLabel, dbv.ptszVal, _countof(di->swzLabel));
@@ -167,7 +167,7 @@ bool LoadDI(DISPLAYITEM *di, int index) mir_snprintf(setting, "DIValue%d", index);
di->swzValue[0] = 0;
- if (!db_get_ts(0, MODULE_ITEMS, setting, &dbv)) {
+ if (!db_get_ws(0, MODULE_ITEMS, setting, &dbv)) {
wcsncpy(di->swzValue, dbv.ptszVal, _countof(di->swzValue));
di->swzValue[_countof(di->swzValue) - 1] = 0;
db_free(&dbv);
@@ -192,14 +192,14 @@ void SaveDI(DISPLAYITEM *di, int index) char setting[512];
mir_snprintf(setting, "DILabel%d", index);
- if (db_set_ts(0, MODULE_ITEMS, setting, di->swzLabel)) {
+ if (db_set_ws(0, MODULE_ITEMS, setting, di->swzLabel)) {
char buff[LABEL_LEN];
t2a(di->swzLabel, buff, LABEL_LEN);
db_set_s(0, MODULE_ITEMS, setting, buff);
}
mir_snprintf(setting, "DIValue%d", index);
- if (db_set_ts(0, MODULE_ITEMS, setting, di->swzValue)) {
+ if (db_set_ws(0, MODULE_ITEMS, setting, di->swzValue)) {
char buff[VALUE_LEN];
t2a(di->swzValue, buff, VALUE_LEN);
db_set_s(0, MODULE_ITEMS, setting, buff);
@@ -307,7 +307,7 @@ void LoadObsoleteSkinSetting() mir_snprintf(setting, "SPaintMode%d", i);
opt.transfMode[i] = (TransformationMode)db_get_b(0, MODULE, setting, 0);
mir_snprintf(setting, "SImgFile%d", i);
- if (!db_get_ts(NULL, MODULE, setting, &dbv)) {
+ if (!db_get_ws(NULL, MODULE, setting, &dbv)) {
opt.szImgFile[i] = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
@@ -515,7 +515,7 @@ void LoadOptions() LoadObsoleteSkinSetting();
}
else if (opt.skinMode == SM_IMAGE) {
- if (!db_get_ts(NULL, MODULE, "SkinName", &dbv)) {
+ if (!db_get_ws(NULL, MODULE, "SkinName", &dbv)) {
wcsncpy(opt.szSkinName, dbv.ptszVal, _countof(opt.szSkinName) - 1);
db_free(&dbv);
}
@@ -544,7 +544,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP SetDlgItemText(hwndDlg, IDC_ED_VALUE, di->swzValue);
for (int i = 0; i < _countof(displayItemTypes); i++) {
- int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateTS(displayItemTypes[i].title));
+ int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateW(displayItemTypes[i].title));
SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_SETITEMDATA, index, (LPARAM)displayItemTypes[i].type);
if (displayItemTypes[i].type == di->type)
SendDlgItemMessage(hwndDlg, IDC_CMB_TYPE, CB_SETCURSEL, index, 0);
@@ -555,7 +555,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP CheckDlgButton(hwndDlg, IDC_CHK_PARSETIPPERFIRST, di->bParseTipperVarsFirst ? BST_CHECKED : BST_UNCHECKED);
for (int i = 0; presetItems[i].szID; i++)
- SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_ADDSTRING, 0, (LPARAM)TranslateTS(presetItems[i].swzName));
+ SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_ADDSTRING, 0, (LPARAM)TranslateW(presetItems[i].swzName));
variables_skin_helpbutton(hwndDlg, IDC_BTN_VARIABLE);
@@ -587,7 +587,7 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP wchar_t buff[256];
SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_GETLBTEXT, sel, (LPARAM)buff);
for (int i = 0; presetItems[i].szID; i++) {
- if (mir_wstrcmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
+ if (mir_wstrcmp(buff, TranslateW(presetItems[i].swzName)) == 0) {
if (presetItems[i].szNeededSubst[0])
EndDialog(hwndDlg, IDPRESETITEM + i);
else
@@ -623,8 +623,8 @@ INT_PTR CALLBACK DlgProcAddItem(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP wchar_t buff[256];
SendDlgItemMessage(hwndDlg, IDC_CMB_PRESETITEMS, CB_GETLBTEXT, sel, (LPARAM)buff);
for (int i = 0; presetItems[i].szID; i++) {
- if (mir_wstrcmp(buff, TranslateTS(presetItems[i].swzName)) == 0) {
- SetDlgItemText(hwndDlg, IDC_ED_LABEL, TranslateTS(presetItems[i].swzLabel));
+ if (mir_wstrcmp(buff, TranslateW(presetItems[i].swzName)) == 0) {
+ SetDlgItemText(hwndDlg, IDC_ED_LABEL, TranslateW(presetItems[i].swzLabel));
SetDlgItemText(hwndDlg, IDC_ED_VALUE, presetItems[i].swzValue);
break;
}
@@ -664,7 +664,7 @@ INT_PTR CALLBACK DlgProcAddSubst(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
for (int i = 0; i < iTransFuncsCount; i++) {
- int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TRANSLATE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateTS(translations[i].swzName));
+ int index = SendDlgItemMessage(hwndDlg, IDC_CMB_TRANSLATE, CB_ADDSTRING, (WPARAM)-1, (LPARAM)TranslateW(translations[i].swzName));
SendDlgItemMessage(hwndDlg, IDC_CMB_TRANSLATE, CB_SETITEMDATA, index, (LPARAM)translations[i].id);
}
@@ -769,7 +769,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA for (int i = 0; i < _countof(btns); i++) {
SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(btns[i].swzTooltip), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateW(btns[i].swzTooltip), BATF_UNICODE);
if (btns[i].uintCoreIconId)
SendDlgItemMessage(hwndDlg, btns[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(btns[i].uintCoreIconId));
else {
@@ -1463,7 +1463,7 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM tvi.item.stateMask = TVIS_STATEIMAGEMASK;
for (int i = 0; i < _countof(extraIconName); i++) {
tvi.item.lParam = (LPARAM)&exIcons[i];
- tvi.item.pszText = TranslateTS(extraIconName[exIcons[i].order]);
+ tvi.item.pszText = TranslateW(extraIconName[exIcons[i].order]);
tvi.item.state = INDEXTOSTATEIMAGEMASK(exIcons[i].vis ? 2 : 1);
TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), &tvi);
}
@@ -1703,19 +1703,19 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l iLastSel = RefreshSkinList(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reload skin list"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reload skin list"), BATF_UNICODE);
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RELOAD));
SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Apply skin"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Apply skin"), BATF_UNICODE);
hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_APPLY));
SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Get more skins"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Get more skins"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_URL));
@@ -1751,7 +1751,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (opt.szPreviewFile[0]) {
HDC hdcMem = CreateCompatibleDC(dis->hDC);
- HBITMAP hbmpPreview = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)opt.szPreviewFile, IMGL_TCHAR);
+ HBITMAP hbmpPreview = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)opt.szPreviewFile, IMGL_WCHAR);
if (hbmpPreview) {
int iWidth = dis->rcItem.right - dis->rcItem.left;
int iHeight = dis->rcItem.bottom - dis->rcItem.top;
@@ -1828,7 +1828,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
db_set_b(0, MODULE, "SkinEngine", opt.skinMode);
- db_set_ts(0, MODULE, "SkinName", opt.szSkinName);
+ db_set_ws(0, MODULE, "SkinName", opt.szSkinName);
DestroySkinBitmap();
SetDlgItemInt(hwndDlg, IDC_ED_TRANS, opt.iOpacity, FALSE);
@@ -1976,7 +1976,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
for (i = 0; i < _countof(trayTipItems); i++) {
- tvi.item.pszText = TranslateTS(trayTipItems[i]);
+ tvi.item.pszText = TranslateW(trayTipItems[i]);
tvi.item.state = INDEXTOSTATEIMAGEMASK(opt.iFirstItems & (1 << i) ? 2 : 1);
TreeView_InsertItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), &tvi);
tvi.item.state = INDEXTOSTATEIMAGEMASK(opt.iSecondItems & (1 << i) ? 2 : 1);
@@ -2045,7 +2045,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), item.hItem);
}
- db_set_ts(0, MODULE, "TrayProtocols", swzProtos);
+ db_set_ws(0, MODULE, "TrayProtocols", swzProtos);
swzProtos[0] = 0;
item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS));
@@ -2060,7 +2060,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), item.hItem);
}
- db_set_ts(0, MODULE, "TrayProtocolsEx", swzProtos);
+ db_set_ws(0, MODULE, "TrayProtocolsEx", swzProtos);
int count = 0;
opt.iFirstItems = 0;
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 117758d058..f10def056c 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -382,7 +382,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (pwd->bIsIconVisible[5]) { for (i = 0; opt.exIconsOrder[i] != 5; i++); if (ServiceExists(MS_FP_GETCLIENTICONT)) { - ptrW tszVersion(db_get_tsa(pwd->hContact, szProto, "MirVer")); + ptrW tszVersion(db_get_wsa(pwd->hContact, szProto, "MirVer")); if (tszVersion != NULL) { pwd->extraIcons[i].hIcon = Finger_GetClientIcon(tszVersion, 0); pwd->extraIcons[i].bDestroy = true; @@ -965,7 +965,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa case PUM_SETSTATUSTEXT: if (pwd && wParam == pwd->hContact) { - db_set_ts(pwd->hContact, MODULE, "TempStatusMsg", (wchar_t *)lParam); + db_set_ws(pwd->hContact, MODULE, "TempStatusMsg", (wchar_t *)lParam); pwd->bIsPainted = false; pwd->bNeedRefresh = true; SendMessage(hwnd, PUM_REFRESH_VALUES, TRUE, 0); diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index c115fd6643..8aa9c4869c 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -209,7 +209,7 @@ void ParseFontPart(FILE *fp, wchar_t *buff) if (mir_wstrlen(pch) > 32)
pch[32] = 0;
- db_set_ts(0, MODULE, szSetting, pch);
+ db_set_ws(0, MODULE, szSetting, pch);
}
}
else if (wcsstr(buff, L"color"))
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index bbcce4b4e7..a68dae28fa 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -173,7 +173,7 @@ wchar_t* GetLastMessageText(MCONTACT hContact, bool received) if (dbei.cbBlob == 0 || dbei.pBlob == 0) return 0; - wchar_t *buff = DbGetEventTextT( &dbei, CP_ACP ); + wchar_t *buff = DbGetEventTextW( &dbei, CP_ACP ); wchar_t *swzMsg = mir_wstrdup(buff); mir_free(buff); @@ -220,7 +220,7 @@ wchar_t* GetStatusMessageText(MCONTACT hContact) if (wStatus == ID_STATUS_OFFLINE) return NULL; - if (!db_get_ts(hContact, MODULE, "TempStatusMsg", &dbv)) { + if (!db_get_ws(hContact, MODULE, "TempStatusMsg", &dbv)) { if (mir_wstrlen(dbv.ptszVal) != 0) swzMsg = mir_wstrdup(dbv.ptszVal); db_free(&dbv); @@ -232,7 +232,7 @@ wchar_t* GetStatusMessageText(MCONTACT hContact) if (ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0)) return NULL; - if (!db_get_ts(hContact, "CList", "StatusMsg", &dbv)) { + if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) { if (mir_wstrlen(dbv.ptszVal) != 0) swzMsg = mir_wstrdup(dbv.ptszVal); db_free(&dbv); @@ -694,9 +694,9 @@ wchar_t* GetProtoStatusMessage(char *szProto, WORD wStatus) if (!(flags & Proto_Status2Flag(wStatus))) return NULL; - wchar_t *ptszText = (wchar_t *)CallProtoService(szProto, PS_GETMYAWAYMSG, 0, SGMA_TCHAR); + wchar_t *ptszText = (wchar_t *)CallProtoService(szProto, PS_GETMYAWAYMSG, 0, SGMA_UNICODE); if ((INT_PTR)ptszText == CALLSERVICE_NOTFOUND) - ptszText = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGT, wStatus, (LPARAM)szProto); + ptszText = (wchar_t *)CallService(MS_AWAYMSG_GETSTATUSMSGW, wStatus, (LPARAM)szProto); else if (ptszText == NULL) { // try to use service without SGMA_TCHAR @@ -724,7 +724,7 @@ wchar_t* GetProtoExtraStatusTitle(char *szProto) if (!szProto) return NULL; - wchar_t *ptszText = db_get_tsa(0, szProto, "XStatusName"); + wchar_t *ptszText = db_get_wsa(0, szProto, "XStatusName"); if (!ptszText) { wchar_t buff[256]; if (EmptyXStatusToDefaultName(0, szProto, 0, buff, 256)) @@ -742,7 +742,7 @@ wchar_t* GetProtoExtraStatusMessage(char *szProto) if (!szProto) return NULL; - wchar_t *ptszText = db_get_tsa(0, szProto, "XStatusMsg"); + wchar_t *ptszText = db_get_wsa(0, szProto, "XStatusMsg"); if (ptszText == NULL) return NULL; @@ -778,7 +778,7 @@ wchar_t* GetListeningTo(char *szProto) if (!szProto) return NULL; - wchar_t *ptszText = db_get_tsa(0, szProto, "ListeningTo"); + wchar_t *ptszText = db_get_wsa(0, szProto, "ListeningTo"); if (opt.bLimitMsg) TruncateString(ptszText); @@ -792,7 +792,7 @@ wchar_t* GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *s char szSetting[128]; mir_snprintf(szSetting, "%s/%s/%s", szProto, szSlot, szValue); - wchar_t *ptszText = db_get_tsa(0, "AdvStatus", szSetting); + wchar_t *ptszText = db_get_wsa(0, "AdvStatus", szSetting); if (opt.bLimitMsg) TruncateString(ptszText); diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 4442d56285..6fc17f394d 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA. HMODULE hInst;
-FontIDT fontTitle, fontLabels, fontValues, fontTrayTitle;
-ColourIDT colourBg, colourBorder, colourAvatarBorder, colourDivider, colourSidebar;
+FontIDW fontTitle, fontLabels, fontValues, fontTrayTitle;
+ColourIDW colourBg, colourBorder, colourAvatarBorder, colourDivider, colourSidebar;
HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle;
// hooked here so it's in the main thread
@@ -69,23 +69,23 @@ int ReloadFont(WPARAM, LPARAM) {
LOGFONT logFont;
if (hFontTitle) DeleteObject(hFontTitle);
- opt.colTitle = CallService(MS_FONT_GETT, (WPARAM)&fontTitle, (LPARAM)&logFont);
+ opt.colTitle = CallService(MS_FONT_GETW, (WPARAM)&fontTitle, (LPARAM)&logFont);
hFontTitle = CreateFontIndirect(&logFont);
if (hFontLabels) DeleteObject(hFontLabels);
- opt.colLabel = CallService(MS_FONT_GETT, (WPARAM)&fontLabels, (LPARAM)&logFont);
+ opt.colLabel = CallService(MS_FONT_GETW, (WPARAM)&fontLabels, (LPARAM)&logFont);
hFontLabels = CreateFontIndirect(&logFont);
if (hFontValues) DeleteObject(hFontValues);
- opt.colValue = CallService(MS_FONT_GETT, (WPARAM)&fontValues, (LPARAM)&logFont);
+ opt.colValue = CallService(MS_FONT_GETW, (WPARAM)&fontValues, (LPARAM)&logFont);
hFontValues = CreateFontIndirect(&logFont);
if (hFontTrayTitle) DeleteObject(hFontTrayTitle);
- opt.colTrayTitle = CallService(MS_FONT_GETT, (WPARAM)&fontTrayTitle, (LPARAM)&logFont);
+ opt.colTrayTitle = CallService(MS_FONT_GETW, (WPARAM)&fontTrayTitle, (LPARAM)&logFont);
hFontTrayTitle = CreateFontIndirect(&logFont);
- opt.colBg = CallService(MS_COLOUR_GETT, (WPARAM)&colourBg, 0);
- opt.colBorder = CallService(MS_COLOUR_GETT, (WPARAM)&colourBorder, 0);
- opt.colAvatarBorder = CallService(MS_COLOUR_GETT, (WPARAM)&colourAvatarBorder, 0);
- opt.colSidebar = CallService(MS_COLOUR_GETT, (WPARAM)&colourSidebar, 0);
- opt.colDivider = CallService(MS_COLOUR_GETT, (WPARAM)&colourDivider, 0);
+ opt.colBg = CallService(MS_COLOUR_GETW, (WPARAM)&colourBg, 0);
+ opt.colBorder = CallService(MS_COLOUR_GETW, (WPARAM)&colourBorder, 0);
+ opt.colAvatarBorder = CallService(MS_COLOUR_GETW, (WPARAM)&colourAvatarBorder, 0);
+ opt.colSidebar = CallService(MS_COLOUR_GETW, (WPARAM)&colourSidebar, 0);
+ opt.colDivider = CallService(MS_COLOUR_GETW, (WPARAM)&colourDivider, 0);
return 0;
}
@@ -123,52 +123,52 @@ int ReloadSkinFolder(WPARAM, LPARAM) void InitFonts()
{
- colourBg.cbSize = sizeof(ColourIDT);
+ colourBg.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourBg.group, LPGENW("Tooltips"));
mir_wstrcpy(colourBg.name, LPGENW("Background"));
mir_strcpy(colourBg.dbSettingsGroup, MODULE);
mir_strcpy(colourBg.setting, "ColourBg");
colourBg.defcolour = RGB(219, 219, 219);
colourBg.order = 0;
- ColourRegisterT(&colourBg);
+ ColourRegisterW(&colourBg);
- colourBorder.cbSize = sizeof(ColourIDT);
+ colourBorder.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourBorder.group, LPGENW("Tooltips"));
mir_wstrcpy(colourBorder.name, LPGENW("Border"));
mir_strcpy(colourBorder.dbSettingsGroup, MODULE);
mir_strcpy(colourBorder.setting, "BorderCol");
colourBorder.defcolour = 0;
colourBorder.order = 0;
- ColourRegisterT(&colourBorder);
+ ColourRegisterW(&colourBorder);
- colourAvatarBorder.cbSize = sizeof(ColourIDT);
+ colourAvatarBorder.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourAvatarBorder.group, LPGENW("Tooltips"));
mir_wstrcpy(colourAvatarBorder.name, LPGENW("Avatar border"));
mir_strcpy(colourAvatarBorder.dbSettingsGroup, MODULE);
mir_strcpy(colourAvatarBorder.setting, "AvBorderCol");
colourAvatarBorder.defcolour = 0;
colourAvatarBorder.order = 0;
- ColourRegisterT(&colourAvatarBorder);
+ ColourRegisterW(&colourAvatarBorder);
- colourDivider.cbSize = sizeof(ColourIDT);
+ colourDivider.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourDivider.group, LPGENW("Tooltips"));
mir_wstrcpy(colourDivider.name, LPGENW("Dividers"));
mir_strcpy(colourDivider.dbSettingsGroup, MODULE);
mir_strcpy(colourDivider.setting, "DividerCol");
colourDivider.defcolour = 0;
colourDivider.order = 0;
- ColourRegisterT(&colourDivider);
+ ColourRegisterW(&colourDivider);
- colourSidebar.cbSize = sizeof(ColourIDT);
+ colourSidebar.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourSidebar.group, LPGENW("Tooltips"));
mir_wstrcpy(colourSidebar.name, LPGENW("Sidebar"));
mir_strcpy(colourSidebar.dbSettingsGroup, MODULE);
mir_strcpy(colourSidebar.setting, "SidebarCol");
colourSidebar.defcolour = RGB(192, 192, 192);
colourSidebar.order = 0;
- ColourRegisterT(&colourSidebar);
+ ColourRegisterW(&colourSidebar);
- fontTitle.cbSize = sizeof(FontIDT);
+ fontTitle.cbSize = sizeof(FontIDW);
fontTitle.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontTitle.group, LPGENW("Tooltips"));
mir_wstrcpy(fontTitle.name, LPGENW("Title"));
@@ -184,7 +184,7 @@ void InitFonts() fontTitle.deffontsettings.colour = RGB(255, 0, 0);
fontTitle.flags |= FIDF_DEFAULTVALID;
- fontLabels.cbSize = sizeof(FontIDT);
+ fontLabels.cbSize = sizeof(FontIDW);
fontLabels.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontLabels.group, LPGENW("Tooltips"));
mir_wstrcpy(fontLabels.name, LPGENW("Labels"));
@@ -200,7 +200,7 @@ void InitFonts() fontLabels.deffontsettings.colour = RGB(128, 128, 128);
fontLabels.flags |= FIDF_DEFAULTVALID;
- fontValues.cbSize = sizeof(FontIDT);
+ fontValues.cbSize = sizeof(FontIDW);
fontValues.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontValues.group, LPGENW("Tooltips"));
mir_wstrcpy(fontValues.name, LPGENW("Values"));
@@ -216,7 +216,7 @@ void InitFonts() fontValues.deffontsettings.colour = RGB(0, 0, 0);
fontValues.flags |= FIDF_DEFAULTVALID;
- fontTrayTitle.cbSize = sizeof(FontIDT);
+ fontTrayTitle.cbSize = sizeof(FontIDW);
fontTrayTitle.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontTrayTitle.group, LPGENW("Tooltips"));
mir_wstrcpy(fontTrayTitle.name, LPGENW("Tray title"));
@@ -232,10 +232,10 @@ void InitFonts() fontTrayTitle.deffontsettings.colour = RGB(0, 0, 0);
fontTrayTitle.flags |= FIDF_DEFAULTVALID;
- FontRegisterT(&fontTitle);
- FontRegisterT(&fontLabels);
- FontRegisterT(&fontValues);
- FontRegisterT(&fontTrayTitle);
+ FontRegisterW(&fontTitle);
+ FontRegisterW(&fontLabels);
+ FontRegisterW(&fontValues);
+ FontRegisterW(&fontTrayTitle);
hReloadFonts = HookEvent(ME_FONT_RELOAD, ReloadFont);
}
@@ -304,7 +304,7 @@ static INT_PTR ReloadSkin(WPARAM wParam, LPARAM lParam) SaveOptions();
db_set_b(0, MODULE, "SkinEngine", opt.skinMode);
- db_set_ts(0, MODULE, "SkinName", opt.szSkinName);
+ db_set_ws(0, MODULE, "SkinName", opt.szSkinName);
DestroySkinBitmap();
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 879f100f5d..c981322f81 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -567,9 +567,9 @@ wchar_t *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName, // translate jabber mood
if (ProtoServiceExists(szModuleName, "/SendXML")) // jabber protocol?
{
- if (!db_get_ts(hContact, szModuleName, szSettingName, &dbv))
+ if (!db_get_ws(hContact, szModuleName, szSettingName, &dbv))
{
- wcsncpy(buff, TranslateTS(dbv.ptszVal), bufflen);
+ wcsncpy(buff, TranslateW(dbv.ptszVal), bufflen);
buff[bufflen - 1] = 0;
return buff;
}
@@ -584,13 +584,13 @@ wchar_t *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName, if (ProtoServiceExists(szModuleName, PS_GETCUSTOMSTATUSEX))
{
xstatus.cbSize = sizeof(CUSTOM_STATUS);
- xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
+ xstatus.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_UNICODE;
xstatus.ptszName = szDefaultName;
xstatus.wParam = (WPARAM *)&status;
if (CallProtoService(szModuleName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&xstatus))
return 0;
- wcsncpy(buff, TranslateTS(szDefaultName), bufflen);
+ wcsncpy(buff, TranslateW(szDefaultName), bufflen);
buff[bufflen - 1] = 0;
return buff;
}
|