summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
commit428bf0cbd77813a43094cb5c984436deff251936 (patch)
treed7dfa8971153d53a849e45c942be97fe5b90b7ec /plugins/Popup
parent82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff)
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup')
-rw-r--r--plugins/Popup/src/actions.cpp4
-rw-r--r--plugins/Popup/src/bitmap_funcs.cpp2
-rw-r--r--plugins/Popup/src/common.h4
-rw-r--r--plugins/Popup/src/config.cpp6
-rw-r--r--plugins/Popup/src/font.cpp44
-rw-r--r--plugins/Popup/src/font.h2
-rw-r--r--plugins/Popup/src/main.cpp10
-rw-r--r--plugins/Popup/src/opt_adv.cpp6
-rw-r--r--plugins/Popup/src/opt_class.cpp6
-rw-r--r--plugins/Popup/src/opt_gen.cpp6
-rw-r--r--plugins/Popup/src/opt_skins.cpp6
-rw-r--r--plugins/Popup/src/opttree.cpp2
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp2
-rw-r--r--plugins/Popup/src/services.cpp12
-rw-r--r--plugins/Popup/src/skin.cpp6
15 files changed, 59 insertions, 59 deletions
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp
index 5a84d99d0e..d85a6269d4 100644
--- a/plugins/Popup/src/actions.cpp
+++ b/plugins/Popup/src/actions.cpp
@@ -237,7 +237,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
group.cbSize = sizeof(group);
group.mask = LVGF_HEADER | LVGF_GROUPID;
LPTSTR wszGroup = mir_a2u(szGroup);
- group.pszHeader = TranslateTS(wszGroup);
+ group.pszHeader = TranslateW(wszGroup);
group.cchHeader = (int)mir_wstrlen(wszGroup);
grpId = group.iGroupId = groups.getCount();
ListView_InsertGroup(hwndList, -1, &group);
@@ -249,7 +249,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
item.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_TEXT | LVIF_STATE | LVIF_INDENT;
item.iItem = i;
ptrW tszName(mir_a2u(szName));
- item.pszText = TranslateTS(tszName);
+ item.pszText = TranslateW(tszName);
item.iImage = ImageList_AddIcon(hImgList, gActions[i]->lchIcon);
item.lParam = i;
item.mask |= LVIF_GROUPID;
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp
index 945be3e482..a652e68980 100644
--- a/plugins/Popup/src/bitmap_funcs.cpp
+++ b/plugins/Popup/src/bitmap_funcs.cpp
@@ -731,7 +731,7 @@ bool MyBitmap::loadFromFile(const wchar_t *fn)
return loadFromFile_gradient(fn);
SIZE sz;
- HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_TCHAR);
+ HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_WCHAR);
if (!hBmpLoaded)
return false;
diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h
index 5fff5e0444..8ce683b65f 100644
--- a/plugins/Popup/src/common.h
+++ b/plugins/Popup/src/common.h
@@ -68,7 +68,7 @@ inline INT_PTR DBGetContactSettingStringX(MCONTACT hContact, const char *ModuleN
case DBVT_ASCIIZ:
ret = (INT_PTR)mir_strdup(result ? Default : dbv.pszVal);
break;
- case DBVT_TCHAR:
+ case DBVT_WCHAR:
if (!result)
ret = (INT_PTR)mir_wstrdup(dbv.ptszVal);
else
@@ -95,7 +95,7 @@ inline void AddTooltipTranslated(HWND hwndToolTip, HWND hwnd, int id, RECT rc, c
ti.hwnd = hwnd;
ti.uId = id;
ti.hinst = hInst;
- ti.lpszText = TranslateTS(wtext);
+ ti.lpszText = TranslateW(wtext);
ti.rect = rc;
SendMessage(hwndToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti);
diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp
index 233fcdf811..a9763b64fd 100644
--- a/plugins/Popup/src/config.cpp
+++ b/plugins/Popup/src/config.cpp
@@ -93,7 +93,7 @@ void PopupPreview()
wchar_t *lptzText1Eng = TranslateT("`Twas brillig, and the slithy toves\r\nDid gyre and gimble in the wabe:\r\nAll mimsy were the borogoves,\r\nAnd the mome raths outgrabe.\r\n\t[b][i]Lewis Carroll, 1855[/i][/b]");
wchar_t *lptzTitle2 = TranslateT("Test preview for the popup plugin settings. This is supposed to be long enough not to fit in one line...");
- wchar_t *lptzText2 = TranslateTS(
+ wchar_t *lptzText2 = TranslateW(
LPGENW("This is a special test preview for the popup plugin settings. The text and title are quite long so you can tweak your skin and plugin settings to best fit your needs :)")
);
@@ -101,7 +101,7 @@ void PopupPreview()
memset(&ppd, 0, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lptzTitle = lptzTitle1Eng;
ppd.lptzText = lptzText1Eng;
@@ -111,7 +111,7 @@ void PopupPreview()
memset(&ppd, 0, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lptzTitle = lptzTitle2;
ppd.lptzText = lptzText2;
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp
index 23a6156b55..5b43ddae96 100644
--- a/plugins/Popup/src/font.cpp
+++ b/plugins/Popup/src/font.cpp
@@ -28,8 +28,8 @@ PopupFonts fonts = { 0 };
void InitFonts()
{
// Fonts
- FontIDT fid = { 0 };
- fid.cbSize = sizeof(FontIDT);
+ FontIDW fid = { 0 };
+ fid.cbSize = sizeof(FontIDW);
mir_wstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.group));
mir_strncpy(fid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, _countof(fid.dbSettingsGroup));
fid.flags = FIDF_DEFAULTVALID;
@@ -43,42 +43,42 @@ void InitFonts()
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
fid.deffontsettings.style = DBFONTF_BOLD;
fid.deffontsettings.colour = RGB(0, 0, 0);
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_CLOCK);
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TEXT);
fid.deffontsettings.style = 0;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_ACTION);
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
fid.deffontsettings.colour = RGB(0, 0, 255);
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION);
fid.deffontsettings.style = DBFONTF_UNDERLINE;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
- ColourIDT cid = { 0 };
- cid.cbSize = sizeof(ColourIDT);
+ ColourIDW cid = { 0 };
+ cid.cbSize = sizeof(ColourIDW);
mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group));
mir_strncpy(cid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, _countof(cid.dbSettingsGroup));
mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
mir_strncpy(cid.setting, PU_COL_BACK_SETTING, _countof(cid.setting));
cid.defcolour = SETTING_BACKCOLOUR_DEFAULT;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
mir_wstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name));
mir_strncpy(cid.setting, PU_COL_AVAT_SETTING, _countof(cid.setting));
cid.defcolour = SETTING_TEXTCOLOUR_DEFAULT;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
ReloadFonts();
}
@@ -93,39 +93,39 @@ void ReloadFonts()
if (fonts.actionHover) DeleteObject(fonts.actionHover);
LOGFONT lf = { 0 };
- FontIDT fid = { 0 };
- fid.cbSize = sizeof(FontIDT);
+ FontIDW fid = { 0 };
+ fid.cbSize = sizeof(FontIDW);
mir_wstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.name));
mir_wstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name));
- fonts.clTitle = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clTitle = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.title = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name));
- fonts.clClock = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clClock = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.clock = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name));
- fonts.clText = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clText = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.text = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name));
- fonts.clAction = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clAction = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.action = CreateFontIndirect(&lf);
mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name));
- fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)&lf);
fonts.actionHover = CreateFontIndirect(&lf);
- ColourIDT cid = { 0 };
- cid.cbSize = sizeof(ColourIDT);
+ ColourIDW cid = { 0 };
+ cid.cbSize = sizeof(ColourIDW);
mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group));
mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
- fonts.clBack = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
+ fonts.clBack = (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, (LPARAM)&lf);
mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group));
mir_wstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name));
- fonts.clAvatarBorder = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
+ fonts.clAvatarBorder = (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, (LPARAM)&lf);
// update class popupps(only temp at this point, must rework)
char setting[256];
diff --git a/plugins/Popup/src/font.h b/plugins/Popup/src/font.h
index c94739c13f..c7403af354 100644
--- a/plugins/Popup/src/font.h
+++ b/plugins/Popup/src/font.h
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PU_FNT_AND_COLOR_DB MODULNAME //use eg mir_strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB);
#define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, _countof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....);
-#define PU_FNT_NAME_TITLE LPGENW("Title") //use eg mir_wstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT
+#define PU_FNT_NAME_TITLE LPGENW("Title") //use eg mir_wstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDW
#define PU_FNT_NAME_CLOCK LPGENW("Clock")
#define PU_FNT_NAME_TEXT LPGENW("Text")
#define PU_FNT_NAME_ACTION LPGENW("Action")
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index b572ae477c..8acce626f7 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -175,7 +175,7 @@ INT_PTR svcShowHistory(WPARAM, LPARAM)
void InitMenuItems(void)
{
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
HANDLE hIcon = GetIconHandle(PopupOptions.ModuleIsEnabled ? IDI_POPUP : IDI_NOPOPUP);
@@ -211,16 +211,16 @@ INT_PTR GetStatus(WPARAM, LPARAM)
void LoadHotkey()
{
HOTKEYDESC hk = { sizeof(hk) };
- hk.dwFlags = HKD_TCHAR;
+ hk.dwFlags = HKD_UNICODE;
hk.pszName = "Toggle Popups";
- hk.ptszDescription = LPGENW("Toggle Popups");
- hk.ptszSection = MODULNAME_PLUW;
+ hk.pwszDescription = LPGENW("Toggle Popups");
+ hk.pwszSection = MODULNAME_PLUW;
hk.pszService = MENUCOMMAND_SVC;
Hotkey_Register(&hk);
// 'Popup History' Hotkey
hk.pszName = "Popup History";
- hk.ptszDescription = LPGENW("Popup History");
+ hk.pwszDescription = LPGENW("Popup History");
hk.pszService = MENUCOMMAND_HISTORY;
Hotkey_Register(&hk);
}
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index b85db14921..1de7bcbb81 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -68,7 +68,7 @@ void LoadOption_AdvOpts()
// Effects
PopupOptions.UseAnimations = db_get_b(NULL, MODULNAME, "UseAnimations", TRUE);
PopupOptions.UseEffect = db_get_b(NULL, MODULNAME, "Fade", TRUE);
- PopupOptions.Effect = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "Effect", "", DBVT_TCHAR);
+ PopupOptions.Effect = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "Effect", "", DBVT_WCHAR);
PopupOptions.FadeIn = db_get_dw(NULL, MODULNAME, "FadeInTime", SETTING_FADEINTIME_DEFAULT);
PopupOptions.FadeOut = db_get_dw(NULL, MODULNAME, "FadeOutTime", SETTING_FADEOUTTIME_DEFAULT);
@@ -208,7 +208,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Fade in/out")), -1);
DWORD dwActiveItem = (DWORD)PopupOptions.UseEffect;
for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) {
- DWORD dwItem = ComboBox_AddString(hCtrl, TranslateTS(g_lstPopupVfx[i]));
+ DWORD dwItem = ComboBox_AddString(hCtrl, TranslateW(g_lstPopupVfx[i]));
ComboBox_SetItemData(hCtrl, dwItem, i);
if (PopupOptions.UseEffect && !mir_wstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
dwActiveItem = dwItem;
@@ -512,7 +512,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
// Effects
db_set_b(NULL, MODULNAME, "UseAnimations", PopupOptions.UseAnimations);
db_set_b(NULL, MODULNAME, "Fade", PopupOptions.UseEffect);
- db_set_ts(NULL, MODULNAME, "Effect", PopupOptions.Effect);
+ db_set_ws(NULL, MODULNAME, "Effect", PopupOptions.Effect);
db_set_dw(NULL, MODULNAME, "FadeInTime", PopupOptions.FadeIn);
db_set_dw(NULL, MODULNAME, "FadeOutTime", PopupOptions.FadeOut);
// other old stuff
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp
index 29b2702137..9110e4e58b 100644
--- a/plugins/Popup/src/opt_class.cpp
+++ b/plugins/Popup/src/opt_class.cpp
@@ -267,7 +267,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
hCtrl = GetDlgItem(hwnd, IDC_LACTION);
for (i = 0; i < ptd->notification.actionCount; ++i) {
psztAction = mir_a2u(ptd->notification.lpActions[i].lpzTitle);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateTS(psztAction)), ptd->notification.lpActions[i].lpzTitle);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateW(psztAction)), ptd->notification.lpActions[i].lpzTitle);
mir_free(psztAction); psztAction = NULL;
}
// combo right action (EXTRA)
@@ -275,7 +275,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
psztAction = NULL;
for (i = 0; i < ptd->notification.actionCount; ++i) {
psztAction = mir_a2u(ptd->notification.lpActions[i].lpzTitle);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateTS(psztAction)), ptd->notification.lpActions[i].lpzTitle);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateW(psztAction)), ptd->notification.lpActions[i].lpzTitle);
mir_free(psztAction); psztAction = NULL;
}
// enable all controls
@@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
{
POPUPDATA2 ppd = { 0 };
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lptzTitle = ptd->pszDescription;
ppd.lptzText = TranslateT("Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn!");
ppd.iSeconds = ptd->timeoutValue;
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index b2b6fba0e7..8e7f31a8d2 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -181,7 +181,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
{
HWND hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS);
SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
- SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)L"Popup area", BATF_TCHAR);
+ SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)L"Popup area", BATF_UNICODE);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_RESIZE));
}
// Spreading combobox
@@ -626,11 +626,11 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SendDlgItemMessage(hwndDlg, IDC_TITLE, WM_SETFONT, (WPARAM)hFontTitle, TRUE);
SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)L"OK", BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)L"OK", BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_OK));
SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)L"Cancel", BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)L"Cancel", BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_CLOSE));
SetDlgItemInt(hwndDlg, IDC_TXT_TOP, PopupOptions.gapTop, FALSE);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 2274390955..896f855a00 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -74,7 +74,7 @@ static void updatePreviewImage(HWND hwndBox)
POPUPDATA2 ppd;
memset(&ppd, 0, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
- ppd.flags = PU2_TCHAR;
+ ppd.flags = PU2_UNICODE;
ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_ONLINE);
ppd.lptzTitle = TranslateT("Skin preview");
ppd.lptzText = TranslateT("Just take a look at this skin... ;)");
@@ -293,7 +293,7 @@ bool SkinOptionList_Update(OPTTREE_OPTION* &options, int *OptionsCount, HWND hwn
void LoadOption_Skins() {
// skin pack
- PopupOptions.SkinPack = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "SkinPack", "* Popup Classic", DBVT_TCHAR);
+ PopupOptions.SkinPack = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "SkinPack", "* Popup Classic", DBVT_WCHAR);
// more Skin options
PopupOptions.DisplayTime = db_get_b(NULL, MODULNAME, "DisplayTime", TRUE);
PopupOptions.DropShadow = db_get_b(NULL, MODULNAME, "DropShadow", TRUE);
@@ -477,7 +477,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case PSN_APPLY:
{
// skin pack
- db_set_ts(NULL, MODULNAME, "SkinPack", PopupOptions.SkinPack);
+ db_set_ws(NULL, MODULNAME, "SkinPack", PopupOptions.SkinPack);
// skin options
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopupOptions.SkinPack))
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp
index cc2e48e141..a9abe4ca0e 100644
--- a/plugins/Popup/src/opttree.cpp
+++ b/plugins/Popup/src/opttree.cpp
@@ -35,7 +35,7 @@ static void OptTree_TranslateItem(HWND hwndTree, HTREEITEM hItem)
tvi.pszText = buf;
tvi.cchTextMax = _countof(buf);
SendMessage(hwndTree, TVM_GETITEMW, 0, (LPARAM)&tvi);
- tvi.pszText = TranslateTS(tvi.pszText);
+ tvi.pszText = TranslateW(tvi.pszText);
SendMessage(hwndTree, TVM_SETITEMW, 0, (LPARAM)&tvi);
}
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index a31ce9b23e..c4611f8ce7 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -977,7 +977,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
case ACT_DEF_COPY:
if (m_lptzText || m_lptzTitle) {
- CMString tszText(FORMAT, L"%s\n\n%s",
+ CMStringW tszText(FORMAT, L"%s\n\n%s",
(m_lptzTitle) ? m_lptzTitle : L"",
(m_lptzText) ? m_lptzText : L"");
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index 23f5ac5026..c68f83d577 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -379,8 +379,8 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
// we ignore pc->colorText and use fonts.text as default (if no setting found in DB)
mir_snprintf(setting, "%s/TextCol", ptd->pupClass.pszName);
ptd->pupClass.colorText = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, fonts.clText/*pc->colorText*/);
- FontIDT fid = { 0 };
- fid.cbSize = sizeof(FontIDT);
+ FontIDW fid = { 0 };
+ fid.cbSize = sizeof(FontIDW);
mir_snwprintf(fid.group, _A2W(PU_FNT_AND_COLOR) L"/%S", ptd->pupClass.pszName);
mir_strncpy(fid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup) - 1);
fid.flags = FIDF_DEFAULTVALID;
@@ -392,19 +392,19 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
mir_snprintf(fid.prefix, "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
fid.deffontsettings.style = 0;
fid.deffontsettings.colour = fonts.clText;
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
// we ignore pc->colorBack and use fonts.clBack as default (if no setting found in DB)
mir_snprintf(setting, "%s/BgCol", ptd->pupClass.pszName);
ptd->pupClass.colorBack = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
- ColourIDT cid = { 0 };
- cid.cbSize = sizeof(ColourIDT);
+ ColourIDW cid = { 0 };
+ cid.cbSize = sizeof(ColourIDW);
mir_snwprintf(cid.group, _A2W(PU_FNT_AND_COLOR) L"/%S", ptd->pupClass.pszName);
mir_strncpy(cid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup));
mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
mir_snprintf(cid.setting, "%s/BgCol", ptd->pupClass.pszName);
cid.defcolour = fonts.clBack;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
gTreeData.insert(ptd);
num_classes++;
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp
index 73756e4e51..9fb5e34439 100644
--- a/plugins/Popup/src/skin.cpp
+++ b/plugins/Popup/src/skin.cpp
@@ -62,7 +62,7 @@ SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const
SIZE szText, szSpace;
LPTSTR wname = mir_a2u(name);
- wchar_t *str = TranslateTS(wname);
+ wchar_t *str = TranslateW(wname);
GetTextExtentPoint32(hdc, str, (int)mir_wstrlen(str), &szText);
mir_free(wname);
GetTextExtentPoint32(hdc, L" ", 1, &szSpace);
@@ -125,7 +125,7 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h
GetTextExtentPoint32(bmp->getDC(), L" ", 1, &szSpace);
LPTSTR wname = mir_a2u(name);
- wchar_t *str = TranslateTS(wname);
+ wchar_t *str = TranslateW(wname);
GetTextExtentPoint32(bmp->getDC(), str, (int)mir_wstrlen(str), &szText);
bmp->Draw_Text(str,
(PopupOptions.actions&ACT_LARGE) ? (x + szSpace.cx + 32) : (x + szSpace.cx + 16),
@@ -1098,7 +1098,7 @@ bool Skins::load()
return false;
}
else {
- mir_wstrncpy(dir, VARST(L"%miranda_path%\\skins\\popup"), _countof(dir));
+ mir_wstrncpy(dir, VARSW(L"%miranda_path%\\skins\\popup"), _countof(dir));
DWORD fa = GetFileAttributes(dir);
if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY))
return false;