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/Clist_modern | |
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/Clist_modern')
19 files changed, 93 insertions, 93 deletions
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 4cd01abef0..701715a7c3 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -678,7 +678,7 @@ static int LocateStorePosition(int Frameid, int maxstored) for (int i = 0; i < maxstored; i++) {
mir_snprintf(settingname, "Name%d", i);
DBVARIANT dbv = { 0 };
- if (db_get_ts(NULL, CLUIFrameModule, settingname, &dbv))
+ if (db_get_ws(NULL, CLUIFrameModule, settingname, &dbv))
continue;
if (mir_wstrcmpi(dbv.ptszVal, g_pfwFrames[Frameid].name) == 0) {
@@ -1502,7 +1502,7 @@ static int CLUIFramesLoadMainMenu() for (int i = 0; i < g_nFramesCount; i++) {
FRAMEWND &F = g_pfwFrames[i];
mi.hIcolibItem = F.TitleBar.hicon;
- mi.flags = CMIF_SYSTEM | CMIF_TCHAR;
+ mi.flags = CMIF_SYSTEM | CMIF_UNICODE;
mi.position = separator++;
mi.name.w = F.TitleBar.tbname ? F.TitleBar.tbname : F.name;
mi.pszService = 0;
@@ -2362,7 +2362,7 @@ int OnFrameTitleBarBackgroundChange(WPARAM, LPARAM) }
if (g_CluiData.fDisableSkinEngine) {
if (db_get_b(NULL, "FrameTitleBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "FrameTitleBar", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "FrameTitleBar", "BkBitmap"));
if (tszBitmapName)
sttBmpBackground = Bitmap_Load(tszBitmapName);
}
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 2406754e47..f3c081c4b2 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -282,7 +282,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat // Get XStatusName if (!noAwayMsg && !noXstatus && xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) { DBVARIANT dbv = { 0 }; - if (!db_get_ts(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) { + if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) { //mir_wstrncpy(text, dbv.pszVal, text_size); CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1); db_free(&dbv); @@ -302,7 +302,7 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat // Get XStatusName if (!noAwayMsg && !noXstatus && !xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) { DBVARIANT dbv = { 0 }; - if (!db_get_ts(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) { + if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) { CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1); db_free(&dbv); @@ -324,7 +324,7 @@ void GetListeningTo(wchar_t *text, int text_size, ClcCacheEntry *pdnce) if (pdnce->m_iStatus == ID_STATUS_OFFLINE || pdnce->m_iStatus == 0) return; - ptrW tszValue(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "ListeningTo")); + ptrW tszValue(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "ListeningTo")); if (tszValue != NULL) CopySkipUnprintableChars(text, tszValue, text_size - 1); } @@ -345,7 +345,7 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs // Get XStatusMsg if (!noAwayMsg && xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) { - ptrW tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); + ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); if (tszXStatusMsg != NULL) { CopySkipUnprintableChars(text, tszXStatusMsg, text_size - 1); if (text[0] != '\0') @@ -355,7 +355,7 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs // Get StatusMsg if (pdnce->hContact && text[0] == '\0') { - ptrW tszStatusMsg(db_get_tsa(pdnce->hContact, "CList", "StatusMsg")); + ptrW tszStatusMsg(db_get_wsa(pdnce->hContact, "CList", "StatusMsg")); if (tszStatusMsg != NULL) { CopySkipUnprintableChars(text, tszStatusMsg, text_size - 1); if (text[0] != '\0') @@ -366,7 +366,7 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs // Get XStatusMsg if (!noAwayMsg && !xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto && text[0] == '\0') { // Try to get XStatusMsg - ptrW tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); + ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); if (tszXStatusMsg != NULL) { CopySkipUnprintableChars(text, tszXStatusMsg, text_size - 1); if (text[0] != '\0') @@ -391,7 +391,7 @@ int Cache_GetLineText(ClcCacheEntry *pdnce, int type, LPTSTR text, int text_size LBL_Status: if (GetStatusName(text, text_size, pdnce, line.xstatus_has_priority) == -1 && line.use_name_and_message_for_xstatus) { // Try to get XStatusMsg - ptrW tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); + ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); if (tszXStatusMsg != NULL && tszXStatusMsg[0] != 0) { wchar_t *tmp = NEWWSTR_ALLOCA(text); mir_snwprintf(text, text_size, L"%s: %s", tmp, tszXStatusMsg); @@ -402,7 +402,7 @@ LBL_Status: case TEXT_NICKNAME: if (pdnce->hContact && pdnce->m_pszProto) { - ptrW tszNick(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "Nick")); + ptrW tszNick(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "Nick")); if (tszNick != NULL) { mir_wstrncpy(text, tszNick, text_size); CopySkipUnprintableChars(text, text, text_size - 1); @@ -413,7 +413,7 @@ LBL_Status: case TEXT_STATUS_MESSAGE: if (GetStatusMessage(text, text_size, pdnce, line.xstatus_has_priority) == -1 && line.use_name_and_message_for_xstatus) { // Try to get XStatusName - ptrW tszXStatusName(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); + ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); if (tszXStatusName != NULL && tszXStatusName[0] != 0) { wchar_t *tmp = NEWWSTR_ALLOCA(text); mir_snwprintf(text, text_size, L"%s: %s", tszXStatusName, tmp); @@ -422,7 +422,7 @@ LBL_Status: } else if (line.use_name_and_message_for_xstatus && line.xstatus_has_priority) { // Try to get XStatusName - ptrW tszXStatusName(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); + ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); if (tszXStatusName != NULL && tszXStatusName[0] != 0) { mir_wstrncpy(text, tszXStatusName, text_size); CopySkipUnprintableChars(text, text, text_size - 1); @@ -477,7 +477,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact) wchar_t *name = pcli->pfnGetContactDisplayName(contact->hContact, 0); if (dat->first_line_append_nick && !dat->bForceInDialog) { DBVARIANT dbv = { 0 }; - if (!db_get_ts(pdnce->hContact, pdnce->m_pszProto, "Nick", &dbv)) { + if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "Nick", &dbv)) { wchar_t nick[_countof(contact->szText)]; mir_wstrncpy(nick, dbv.ptszVal, _countof(contact->szText)); db_free(&dbv); diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index ed48ac41bc..2f9b9d7f2c 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1567,7 +1567,7 @@ static int clcHookModulesLoaded(WPARAM, LPARAM) SKINICONDESC sid = { 0 };
sid.defaultFile.w = szMyPath;
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_UNICODE;
sid.section.a = LPGEN("Contact list");
sid.description.a = LPGEN("Listening to");
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index d23703ba0a..c9a86d389e 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -433,7 +433,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) }
if (g_CluiData.bFilterEffective & CLVM_FILTER_GROUPS) {
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (tszGroup != NULL) {
wchar_t szGroupMask[256];
mir_snwprintf(szGroupMask, L"%s|", tszGroup);
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index bacc564cc9..3e0f9e51e9 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -123,8 +123,8 @@ void RegisterCLUIFonts(void) if (registered)
return;
- FontIDT fontid = { 0 };
- EffectIDT effectid = { 0 };
+ FontIDW fontid = { 0 };
+ EffectIDW effectid = { 0 };
char idstr[10];
int index = 0;
@@ -150,7 +150,7 @@ void RegisterCLUIFonts(void) fontid.deffontsettings.style = fontOptionsList[i].defStyle;
mir_wstrncpy(fontid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _countof(fontid.deffontsettings.szFace));
- FontRegisterT(&fontid);
+ FontRegisterW(&fontid);
mir_wstrncpy(effectid.group, fontOptionsList[i].szGroup, _countof(effectid.group));
mir_wstrncpy(effectid.name, fontOptionsList[i].szDescr, _countof(effectid.name));
@@ -162,10 +162,10 @@ void RegisterCLUIFonts(void) effectid.defeffect.baseColour = fontOptionsList[i].defeffect.baseColour;
effectid.defeffect.secondaryColour = fontOptionsList[i].defeffect.secondaryColour;
- EffectRegisterT(&effectid);
+ EffectRegisterW(&effectid);
}
- ColourIDT colourid = { 0 };
+ ColourIDW colourid = { 0 };
colourid.cbSize = sizeof(colourid);
for (int i = 0; i < _countof(colourOptionsList); i++) {
@@ -175,7 +175,7 @@ void RegisterCLUIFonts(void) mir_strncpy(colourid.dbSettingsGroup, colourOptionsList[i].chGroup, _countof(colourid.dbSettingsGroup));
colourid.defcolour = colourOptionsList[i].defColour;
colourid.order = i + 1;
- ColourRegisterT(&colourid);
+ ColourRegisterW(&colourid);
}
registered = true;
}
@@ -203,12 +203,12 @@ void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, BYTE *effect, COLORREF if (index == _countof(fontOptionsList))
return;
- FontIDT fontid = { 0 };
+ FontIDW fontid = { 0 };
fontid.cbSize = sizeof(fontid);
mir_wstrncpy(fontid.group, fontOptionsList[index].szGroup, _countof(fontid.group));
mir_wstrncpy(fontid.name, fontOptionsList[index].szDescr, _countof(fontid.name));
- COLORREF col = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)lf);
+ COLORREF col = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)lf);
if (colour)
*colour = col;
@@ -284,7 +284,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
for (int i = 0; i < nValues; i++) {
tvis.item.lParam = values[i].style;
- tvis.item.pszText = TranslateTS(values[i].szDescr);
+ tvis.item.pszText = TranslateW(values[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1);
TreeView_InsertItem(hwndTree, &tvis);
@@ -508,11 +508,11 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, int i, item;
int s1, s2, s3;
for (i = 0; i < _countof(sortby); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETITEMDATA, item, 0);
}
@@ -1003,7 +1003,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP {
DBVARIANT dbv = { 0 };
wchar_t *s;
- if (!db_get_ts(NULL, "CList", "TitleText", &dbv))
+ if (!db_get_ws(NULL, "CList", "TitleText", &dbv))
s = dbv.ptszVal;
else
s = _A2W(MIRANDANAME);
@@ -1665,11 +1665,11 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
for (i = 0; i < _countof(sortby); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT2, CB_SETITEMDATA, item, 0);
- item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_ADDSTRING, 0, (LPARAM)TranslateW(sortby[i]));
SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETITEMDATA, item, 0);
}
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 1d99f11abf..96aead2961 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -560,7 +560,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) dat->secondLine.draw_smileys = db_get_b(NULL, "CList", "SecondLineDrawSmileys", SETTING_SECONDLINE_SMILEYS_DEFAULT);
dat->secondLine.type = db_get_w(NULL, "CList", "SecondLineType", SETTING_SECONDLINE_TYPE_DEFAULT);
- ptrW tszLineText(db_get_tsa(NULL, "CList", "SecondLineText"));
+ ptrW tszLineText(db_get_wsa(NULL, "CList", "SecondLineText"));
if (tszLineText)
mir_wstrncpy(dat->secondLine.text, tszLineText, _countof(dat->secondLine.text));
else
@@ -580,7 +580,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) dat->thirdLine.draw_smileys = db_get_b(NULL, "CList", "ThirdLineDrawSmileys", SETTING_THIRDLINE_SMILEYS_DEFAULT);
dat->thirdLine.type = db_get_w(NULL, "CList", "ThirdLineType", SETTING_THIRDLINE_TYPE_DEFAULT);
- ptrW tszLineText(db_get_tsa(NULL, "CList", "ThirdLineText"));
+ ptrW tszLineText(db_get_wsa(NULL, "CList", "ThirdLineText"));
if (tszLineText)
mir_wstrncpy(dat->thirdLine.text, tszLineText, _countof(dat->thirdLine.text));
else
@@ -608,7 +608,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) dat->MenuTextHiColor = cliGetColor("Menu", "SelTextColour", CLCDEFAULT_MODERN_SELTEXTCOLOUR);
if (db_get_b(NULL, "Menu", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmap(db_get_tsa(NULL, "Menu", "BkBitmap"));
+ ptrW tszBitmap(db_get_wsa(NULL, "Menu", "BkBitmap"));
if (tszBitmap != NULL)
dat->hMenuBackground = Bitmap_Load(tszBitmap);
}
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 2585918e00..7982455b5a 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -249,7 +249,7 @@ static int ehhEventAreaBackgroundSettingsChanged(WPARAM, LPARAM) if (g_CluiData.fDisableSkinEngine) {
event_area.bkColour = cliGetColor("EventArea", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "EventArea", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmap(db_get_tsa(NULL, "EventArea", "BkBitmap"));
+ ptrW tszBitmap(db_get_wsa(NULL, "EventArea", "BkBitmap"));
if (tszBitmap != NULL)
event_area.hBmpBackground = Bitmap_Load(tszBitmap);
}
@@ -511,7 +511,7 @@ int EventArea_Create(HWND hCluiWnd) Frame.hWnd = g_CluiData.hwndEventFrame;
Frame.align = alBottom;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = (db_get_b(NULL, "CLUI", "ShowEventArea", SETTING_SHOWEVENTAREAFRAME_DEFAULT) ? F_VISIBLE : 0) | F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
+ Frame.Flags = (db_get_b(NULL, "CLUI", "ShowEventArea", SETTING_SHOWEVENTAREAFRAME_DEFAULT) ? F_VISIBLE : 0) | F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_UNICODE;
Frame.height = h;
Frame.tname = L"EventArea"; //do not translate
Frame.TBtname = TranslateT("Event area");
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 2605dea546..7d97a9d428 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -84,11 +84,11 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) if (bContactRate > _countof(rates) - 1)
bContactRate = _countof(rates) - 1;
- CMString tszName;
+ CMStringW tszName;
if (!bContactRate)
tszName = FAVMENUROOTNAME;
else
- tszName.Format(L"%s (%s)", TranslateTS(FAVMENUROOTNAME), TranslateTS(rates[bContactRate]));
+ tszName.Format(L"%s (%s)", TranslateW(FAVMENUROOTNAME), TranslateW(rates[bContactRate]));
Menu_ModifyItem(hFavoriteContactMenu, tszName);
for (int i = 0; i < _countof(rates); i++)
@@ -125,13 +125,13 @@ int LoadFavoriteContactMenu() CMenuItem mi;
SET_UID(mi, 0xf99a2320, 0xc024, 0x48bd, 0x81, 0xf7, 0x9f, 0xa2, 0x5, 0xb0, 0x7f, 0xdc);
mi.name.w = FAVMENUROOTNAME;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");
UNSET_UID(mi);
mi.root = hFavoriteContactMenu;
- mi.flags = CMIF_TCHAR | CMIF_SYSTEM; // not included into new menu settings
+ mi.flags = CMIF_UNICODE | CMIF_SYSTEM; // not included into new menu settings
mi.pszService = CLUI_FAVSETRATE;
for (int i = 0; i < _countof(rates); i++) {
mi.hIcolibItem = iconList[i].hIcolib;
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 051ef974a9..2039a0deb4 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -510,7 +510,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara int item;
wchar_t *align[] = { LPGENW("Left align group names"), LPGENW("Center group names"), LPGENW("Right align group names") };
for (int i = 0; i < sizeof(align) / sizeof(char*); i++)
- item = SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_ADDSTRING, 0, (LPARAM)TranslateW(align[i]));
SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_SETCURSEL, db_get_b(NULL, "CList", "AlignGroupCaptions", SETTING_ALIGNGROPCAPTION_DEFAULT), 0);
}
CheckDlgButton(hwndDlg, IDC_ALIGN_RIGHT, db_get_b(NULL, "CList", "TextAlignToRight", SETTING_TEXT_RIGHTALIGN_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
@@ -584,7 +584,7 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM CheckDlgButton(hwndDlg, IDC_DRAW_SMILEYS, db_get_b(NULL, "CList", "SecondLineDrawSmileys", SETTING_SECONDLINE_SMILEYS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
{
- ptrW tszText(db_get_tsa(NULL, "CList", "SecondLineText"));
+ ptrW tszText(db_get_wsa(NULL, "CList", "SecondLineText"));
if (tszText)
SetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, tszText);
}
@@ -719,7 +719,7 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM wchar_t t[TEXT_TEXT_MAX_LENGTH];
GetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, t, _countof(t));
t[TEXT_TEXT_MAX_LENGTH - 1] = '\0';
- db_set_ts(NULL, "CList", "SecondLineText", t);
+ db_set_ws(NULL, "CList", "SecondLineText", t);
db_set_b(NULL, "CList", "SecondLineXStatusHasPriority", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_XSTATUS_HAS_PRIORITY));
db_set_b(NULL, "CList", "SecondLineShowStatusIfNoAway", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOW_STATUS_IF_NOAWAY));
@@ -750,7 +750,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM CheckDlgButton(hwndDlg, IDC_DRAW_SMILEYS, db_get_b(NULL, "CList", "ThirdLineDrawSmileys", SETTING_THIRDLINE_SMILEYS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
{
DBVARIANT dbv;
- if (!db_get_ts(NULL, "CList", "ThirdLineText", &dbv)) {
+ if (!db_get_ws(NULL, "CList", "ThirdLineText", &dbv)) {
SetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, dbv.ptszVal);
db_free(&dbv);
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 6fd42fbb23..a545ba2928 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -411,7 +411,7 @@ HRESULT CLUI::CreateCLC() Frame.hWnd = pcli->hwndContactTree;
Frame.align = alClient;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NO_SUBCONTAINER | F_TCHAR;
+ Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NO_SUBCONTAINER | F_UNICODE;
Frame.tname = LPGENW("My contacts");
Frame.TBtname = TranslateT("My contacts");
hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -666,7 +666,7 @@ void CLUI_ChangeWindowMode() // 4 - Set Title
wchar_t titleText[255] = { 0 };
DBVARIANT dbv;
- if (db_get_ts(NULL, "CList", "TitleText", &dbv))
+ if (db_get_ws(NULL, "CList", "TitleText", &dbv))
mir_wstrncpy(titleText, _A2W(MIRANDANAME), _countof(titleText));
else {
mir_wstrncpy(titleText, dbv.ptszVal, _countof(titleText));
@@ -888,7 +888,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) wchar_t *str = wcsrchr(szRelativePath, '\\');
if (str != NULL)
*str = 0;
- PathToAbsoluteT(szRelativePath, tszFolderPath);
+ PathToAbsoluteW(szRelativePath, tszFolderPath);
}
if (szAccoName) {
@@ -920,7 +920,7 @@ static HICON CLUI_LoadIconFromExternalFile(wchar_t *filename, int i) {
wchar_t szPath[MAX_PATH], szFullPath[MAX_PATH];
mir_snwprintf(szPath, L"Icons\\%s", filename);
- PathToAbsoluteT(szPath, szFullPath);
+ PathToAbsoluteW(szPath, szFullPath);
if (_waccess(szPath, 0))
return NULL;
@@ -1516,12 +1516,12 @@ HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDesc SKINICONDESC sid = { 0 };
sid.section.a = szSectionName;
sid.pszName = szIcoID;
- sid.flags |= SIDF_PATH_TCHAR;
+ sid.flags |= SIDF_PATH_UNICODE;
sid.description.a = szDescription;
sid.defaultFile.w = fileFull;
if (tszDefaultFile) {
- PathToAbsoluteT(tszDefaultFile, fileFull);
+ PathToAbsoluteW(tszDefaultFile, fileFull);
if (!FileExists(fileFull))
fileFull[0] = '\0';
}
diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp index f4773c48e2..174efbed7f 100644 --- a/plugins/Clist_modern/src/modern_keyboard.cpp +++ b/plugins/Clist_modern/src/modern_keyboard.cpp @@ -47,23 +47,23 @@ int InitSkinHotKeys(void) HOTKEYDESC shk = { 0 };
shk.cbSize = sizeof(shk);
- shk.dwFlags = HKD_TCHAR;
+ shk.dwFlags = HKD_UNICODE;
- shk.ptszDescription = LPGENW("Close Miranda");
+ shk.pwszDescription = LPGENW("Close Miranda");
shk.pszName = "CloseMiranda";
- shk.ptszSection = LPGENW("Main");
+ shk.pwszSection = LPGENW("Main");
shk.pszService = "CLIST/HK/CloseMiranda";
Hotkey_Register(&shk);
- shk.ptszDescription = LPGENW("Restore last status");
+ shk.pwszDescription = LPGENW("Restore last status");
shk.pszName = "RestoreLastStatus";
- shk.ptszSection = LPGENW("Status");
+ shk.pwszSection = LPGENW("Status");
shk.pszService = "CLIST/HK/RestoreStatus";
Hotkey_Register(&shk);
- shk.ptszDescription = LPGENW("Show/Hide offline users");
+ shk.pwszDescription = LPGENW("Show/Hide offline users");
shk.pszName = "ShowHideOfflineUsers";
- shk.ptszSection = LPGENW("Main");
+ shk.pwszSection = LPGENW("Main");
shk.pszService = MS_CLIST_TOGGLEHIDEOFFLINE;
Hotkey_Register(&shk);
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index 2cbabaafe4..5b160a3c07 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -314,14 +314,14 @@ void RefreshTree(HWND hwndDlg, HTREEITEM hti) if (cell->type == 0)
mir_snwprintf(buf, TranslateT("Empty %s cell"), cell->cont == TC_COL ? TranslateT("column") : TranslateT("line"));
else
- mir_wstrncpy(buf, TranslateTS(types[cell->type]), _countof(buf));
+ mir_wstrncpy(buf, TranslateW(types[cell->type]), _countof(buf));
}
else
{
if (cell->type == 0)
mir_wstrncpy(buf, (cell->cont != TC_COL ? TranslateT("columns") : TranslateT("lines")), _countof(buf));
else
- mir_snwprintf(buf, TranslateT("%s, contain %s"), TranslateTS(types[cell->type]), cell->cont != TC_COL ? TranslateT("columns") : TranslateT("lines"));
+ mir_snwprintf(buf, TranslateT("%s, contain %s"), TranslateW(types[cell->type]), cell->cont != TC_COL ? TranslateT("columns") : TranslateT("lines"));
}
if (cell->layer) mir_wstrncat(buf, TranslateT(" layered"), _countof(buf) - mir_wstrlen(buf));
tvi.mask = TVIF_HANDLE | TVIF_TEXT;
@@ -357,21 +357,21 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM int i, item;
for (i = 0; i < _countof(types); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(types[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_ADDSTRING, 0, (LPARAM)TranslateW(types[i]));
SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_SETCURSEL, 0, 0);
wchar_t *h_alignment[] = { L"left", L"hCenter", L"right" };
for (i = 0; i < _countof(h_alignment); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(h_alignment[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(h_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETCURSEL, 0, 0);
wchar_t *v_alignment[] = { L"top", L"vCenter", L"bottom" };
for (i = 0; i < _countof(v_alignment); i++) {
- item = SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(v_alignment[i]));
+ item = SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(v_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_SETCURSEL, 0, 0);
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index f493876e60..167a0a8d07 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -1469,7 +1469,7 @@ void ske_PreMultiplyChannels(HBITMAP hbmp, BYTE Mult) int ske_GetFullFilename(wchar_t *buf, const wchar_t *file, wchar_t *skinfolder, BOOL madeAbsolute) { - wchar_t *SkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder"); + wchar_t *SkinPlace = db_get_wsa(NULL, SKIN, "SkinFolder"); if (SkinPlace == NULL) SkinPlace = mir_wstrdup(L"\\Skin\\default"); @@ -1481,9 +1481,9 @@ int ske_GetFullFilename(wchar_t *buf, const wchar_t *file, wchar_t *skinfolder, if (madeAbsolute) { if (b2[0] == '\\' && b2[1] != '\\') - PathToAbsoluteT(b2 + 1, buf); + PathToAbsoluteW(b2 + 1, buf); else - PathToAbsoluteT(b2, buf); + PathToAbsoluteW(b2, buf); } else mir_wstrncpy(buf, b2, MAX_PATH); @@ -1912,7 +1912,7 @@ static int ske_GetSkinFromDB(char *, SKINOBJECTSLIST *Skin) Skin->pMaskList = (LISTMODERNMASK*)mir_alloc(sizeof(LISTMODERNMASK)); memset(Skin->pMaskList, 0, sizeof(LISTMODERNMASK)); - Skin->szSkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder"); + Skin->szSkinPlace = db_get_wsa(NULL, SKIN, "SkinFolder"); if (!Skin->szSkinPlace || (wcschr(Skin->szSkinPlace, '%') && !db_get_b(NULL, SKIN, "Modified", 0))) { BOOL bOnlyObjects = FALSE; if (Skin->szSkinPlace && wcschr(Skin->szSkinPlace, '%')) @@ -1972,8 +1972,8 @@ int ske_LoadSkinFromIniFile(wchar_t *szFileName, BOOL bOnlyObjects) IniParser::GetSkinFolder(szFileName, skinFolder); PathToRelativeT(szFileName, skinFile); - db_set_ts(NULL, SKIN, "SkinFolder", skinFolder); - db_set_ts(NULL, SKIN, "SkinFile", skinFile); + db_set_ws(NULL, SKIN, "SkinFolder", skinFolder); + db_set_ws(NULL, SKIN, "SkinFile", skinFile); parser.Parse(IniParser::WriteStrToDb, 1); return 0; diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 5207c15c8b..c52fa1533e 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -55,7 +55,7 @@ int SkinOptInit(WPARAM wParam, LPARAM) odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN); odp.pwszGroup = LPGENW("Skins"); odp.pwszTitle = LPGENW("Contact list"); - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; Options_AddPage(wParam, &odp); } return 0; @@ -262,7 +262,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), sd->File); IniParser::GetSkinFolder(sd->File, skinfolder); mir_snwprintf(prfn, L"%s\\%s", skinfolder, imfn); - PathToAbsoluteT(prfn, imfn); + PathToAbsoluteW(prfn, imfn); hPreviewBitmap = ske_LoadGlyphImage(imfn); EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_APPLY_SKIN), TRUE); @@ -367,9 +367,9 @@ HTREEITEM FillAvailableSkinList(HWND hwndDlg) SearchSkinFiles(hwndDlg, SkinsFolder); { wchar_t skinfull[MAX_PATH]; - ptrW skinfile(db_get_tsa(NULL, SKIN, "SkinFile")); + ptrW skinfile(db_get_wsa(NULL, SKIN, "SkinFile")); if (skinfile) { - PathToAbsoluteT(skinfile, skinfull); + PathToAbsoluteW(skinfile, skinfull); res = AddSkinToListFullName(hwndDlg, skinfull); } } @@ -471,10 +471,10 @@ HTREEITEM AddItemToTree(HWND hTree, wchar_t *itemName, void *data) INT_PTR SvcActiveSkin(WPARAM, LPARAM) { - ptrW skinfile(db_get_tsa(NULL, SKIN, "SkinFile")); + ptrW skinfile(db_get_wsa(NULL, SKIN, "SkinFile")); if (skinfile) { wchar_t skinfull[MAX_PATH]; - PathToAbsoluteT(skinfile, skinfull); + PathToAbsoluteW(skinfile, skinfull); return (INT_PTR)mir_wstrdup(skinfull); } @@ -525,7 +525,7 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam) GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), (LPCTSTR)lParam); IniParser::GetSkinFolder((LPCTSTR)lParam, skinfolder); mir_snwprintf(prfn, L"%s\\%s", skinfolder, imfn); - PathToAbsoluteT(prfn, imfn); + PathToAbsoluteW(prfn, imfn); hPreviewBitmap = ske_LoadGlyphImage(imfn); if (hPreviewBitmap) { diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp index 119ceb7f8d..f50b22618a 100644 --- a/plugins/Clist_modern/src/modern_skinselector.cpp +++ b/plugins/Clist_modern/src/modern_skinselector.cpp @@ -469,8 +469,8 @@ int RegisterButtonByParce(char * ObjectName, char * Params) + ((TL[3] == 'C') ? SBF_ALIGN_BR_VCENTER : 0)
+ ((TL[4] == 'I') ? SBF_CALL_ON_PRESS : 0);
if (a)
- return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateTS(Hint), Section, Type, MinWidth, MinHeight);
- return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateTS(Hint), NULL, NULL, MinWidth, MinHeight);
+ return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateW(Hint), Section, Type, MinWidth, MinHeight);
+ return ModernSkinButton_AddButton(pcli->hwndContactList, ObjectName + 1, pServiceName, pStatusServiceName, "\0", Left, Top, Right, Bottom, alingnto, TranslateW(Hint), NULL, NULL, MinWidth, MinHeight);
}
//Parse DB string and add object
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 8e2e364a9b..0284519c59 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -106,7 +106,7 @@ int LoadStatusBarData() if (g_CluiData.fDisableSkinEngine) {
g_StatusBarData.bkColour = cliGetColor("StatusBar", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "StatusBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "StatusBar", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "StatusBar", "BkBitmap"));
if (tszBitmapName)
g_StatusBarData.hBmpBackground = Bitmap_Load(tszBitmapName);
}
@@ -345,7 +345,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if ((p.xStatusMode & 8) && p.iProtoStatus > ID_STATUS_OFFLINE) {
wchar_t str[512];
CUSTOM_STATUS cs = { sizeof(cs) };
- cs.flags = CSSF_MASK_NAME | CSSF_TCHAR;
+ cs.flags = CSSF_MASK_NAME | CSSF_UNICODE;
cs.ptszName = str;
if (CallProtoService(p.szAccountName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) == 0)
p.tszProtoXStatus = mir_wstrdup(str);
@@ -883,7 +883,7 @@ HWND StatusBar_Create(HWND parent) Frame.hWnd = hModernStatusBar;
Frame.align = alBottom;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
- Frame.Flags = F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
+ Frame.Flags = F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_UNICODE;
if (db_get_b(NULL, "CLUI", "ShowSBar", SETTING_SHOWSBAR_DEFAULT))
Frame.Flags |= F_VISIBLE;
Frame.height = h;
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp index 44218b6bba..c875d29f5c 100644 --- a/plugins/Clist_modern/src/modern_statusbar_options.cpp +++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp @@ -239,14 +239,14 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l {
wchar_t *align[] = { LPGENW("Left"), LPGENW("Center"), LPGENW("Right") };
for (int i = 0; i < _countof(align); i++)
- SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
+ SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(align[i]));
SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "Align", SETTING_ALIGN_DEFAULT), 0);
}
{
wchar_t *align[] = { LPGENW("Top"), LPGENW("Center"), LPGENW("Bottom") };
for (int i = 0; i < _countof(align); i++)
- SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
+ SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateW(align[i]));
SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "VAlign", SETTING_VALIGN_DEFAULT), 0);
}
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 3009c46d0c..b31609f534 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -138,7 +138,7 @@ static int ehhToolBarBackgroundSettingsChanged(WPARAM, LPARAM) if (g_CluiData.fDisableSkinEngine) {
tbdat.mtb_bkColour = cliGetColor("ToolBar", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "ToolBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "ToolBar", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "ToolBar", "BkBitmap"));
if (tszBitmapName)
tbdat.mtb_hBmpBackground = Bitmap_Load(tszBitmapName);
}
@@ -282,7 +282,7 @@ void CustomizeToolbar(HWND hwnd) Frame.tname = L"Toolbar";
Frame.hWnd = hwnd;
Frame.align = alTop;
- Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR | F_NO_SUBCONTAINER;
+ Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_UNICODE | F_NO_SUBCONTAINER;
Frame.height = 18;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
pMTBInfo->hFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -344,7 +344,7 @@ static int Toolbar_ModulesLoaded(WPARAM, LPARAM) }
if (!ServiceExists(MS_TTB_REMOVEBUTTON) && bOldSetting == 1)
- if (IDYES == MessageBox(NULL, TranslateTS(szWarning), TranslateT("Toolbar upgrade"), MB_ICONQUESTION | MB_YESNO))
+ if (IDYES == MessageBox(NULL, TranslateW(szWarning), TranslateT("Toolbar upgrade"), MB_ICONQUESTION | MB_YESNO))
Utils_OpenUrl(szUrl);
return 0;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index bcfec081be..adb51b8167 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -511,7 +511,7 @@ static void UpdateFilters() return;
mir_snprintf(szSetting, "%c%s_GF", 246, szBuf);
- ptrW szGF(db_get_tsa(NULL, CLVM_MODULE, szSetting));
+ ptrW szGF(db_get_wsa(NULL, CLVM_MODULE, szSetting));
if (szGF == NULL)
return;
@@ -926,7 +926,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM hwndSelector = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_SELECTMODE, g_hInst, NULL);
MakeButtonSkinned(hwndSelector);
- SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), BATF_TCHAR);
+ SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), BATF_UNICODE);
SendMessage(hwndSelector, BUTTONSETMARGINS, 0, (LPARAM)&rcMargins);
SendMessage(hwndSelector, BUTTONSETID, 0, (LPARAM) "ViewMode.Select");
SendMessage(hwndSelector, WM_SETFONT, 0, (LPARAM)FONTID_VIEMODES + 1);
@@ -938,7 +938,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HWND hwndButton = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_CONFIGUREMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
- SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), BATF_TCHAR);
+ SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), BATF_UNICODE);
SendMessage(hwndButton, BUTTONSETID, 0, (LPARAM) "ViewMode.Setup");
SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
@@ -946,7 +946,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM hwndButton = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_RESETMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
- SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), BATF_TCHAR);
+ SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), BATF_UNICODE);
SendMessage(hwndButton, BUTTONSETID, 0, (LPARAM) "ViewMode.Clear");
SendMessage(hwnd, WM_USER + 100, 0, 0);
SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0);
@@ -1167,7 +1167,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM, LPARAM) if (g_CluiData.fDisableSkinEngine) {
view_mode.bkColour = cliGetColor("ViewMode", "BkColour", CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL, "ViewMode", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- ptrW tszBitmapName(db_get_tsa(NULL, "ViewMode", "BkBitmap"));
+ ptrW tszBitmapName(db_get_wsa(NULL, "ViewMode", "BkBitmap"));
if (tszBitmapName)
view_mode.hBmpBackground = Bitmap_Load(tszBitmapName);
}
@@ -1202,7 +1202,7 @@ void CreateViewModeFrame() frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 18;
frame.TBtname = TranslateT("View modes");
- frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
+ frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_UNICODE;
frame.align = alBottom;
frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", _A2W(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
@@ -1267,7 +1267,7 @@ void ApplyViewMode(const char *Name, bool onlySelector) mir_free(dbv.pszVal);
}
mir_snprintf(szSetting, "%c%s_GF", 246, Name);
- if (!db_get_ts(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if (!db_get_ws(NULL, CLVM_MODULE, szSetting, &dbv)) {
if (mir_wstrlen(dbv.ptszVal) >= 2) {
mir_wstrncpy(g_CluiData.groupFilter, dbv.ptszVal, _countof(g_CluiData.groupFilter));
g_CluiData.groupFilter[_countof(g_CluiData.groupFilter) - 1] = 0;
|