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 /utils | |
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 'utils')
-rw-r--r-- | utils/mir_fonts.cpp | 16 | ||||
-rw-r--r-- | utils/mir_options.cpp | 20 |
2 files changed, 18 insertions, 18 deletions
diff --git a/utils/mir_fonts.cpp b/utils/mir_fonts.cpp index cb0dba3571..9b8c32cb23 100644 --- a/utils/mir_fonts.cpp +++ b/utils/mir_fonts.cpp @@ -8,7 +8,7 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, const wchar_t *pszSection, const wchar_t *pszDescription, const wchar_t *pszBackgroundGroup, const wchar_t *pszBackgroundName, int position, BOOL bAllowEffects, LOGFONT *plfDefault, COLORREF clrDefault) { - FontIDT fid = { 0 }; + FontIDW fid = { 0 }; fid.cbSize = sizeof(fid); mir_strncpy(fid.dbSettingsGroup, pszDbModule, sizeof(fid.dbSettingsGroup)); /* buffer safe */ mir_strncpy(fid.prefix, pszDbName, sizeof(fid.prefix)); /* buffer safe */ @@ -30,38 +30,38 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, con fid.deffontsettings.charset = plfDefault->lfCharSet; mir_wstrncpy(fid.deffontsettings.szFace, plfDefault->lfFaceName, _countof(fid.deffontsettings.szFace)); /* buffer safe */ } - FontRegisterT(&fid); + FontRegisterW(&fid); return 0; } int FontService_GetFont(const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF *pclr, LOGFONT *plf) { - FontIDT fid = { 0 }; + FontIDW fid = { 0 }; mir_wstrncpy(fid.group, pszSection, _countof(fid.group)); /* buffer sfae */ mir_wstrncpy(fid.name, pszDescription, _countof(fid.name)); /* buffer safe */ - *pclr = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)plf); /* uses fallback font on error */ + *pclr = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)plf); /* uses fallback font on error */ return (int)*pclr == -1; } int FontService_RegisterColor(const char *pszDbModule, const char *pszDbName, const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF clrDefault) { - ColourIDT cid = { 0 }; + ColourIDW cid = { 0 }; cid.cbSize = sizeof(cid); cid.defcolour = clrDefault; mir_strncpy(cid.dbSettingsGroup, pszDbModule, sizeof(cid.dbSettingsGroup)); /* buffer safe */ mir_strncpy(cid.setting, pszDbName, sizeof(cid.setting)); /* buffer safe */ mir_wstrncpy(cid.group, pszSection, _countof(cid.group)); /* buffer safe */ mir_wstrncpy(cid.name, pszDescription, _countof(cid.name)); /* buffer safe */ - ColourRegisterT(&cid); + ColourRegisterW(&cid); return 0; } int FontService_GetColor(const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF *pclr) { - ColourIDT cid = { 0 }; + ColourIDW cid = { 0 }; cid.cbSize = sizeof(cid); wcsncpy_s(cid.group, pszSection, _TRUNCATE); wcsncpy_s(cid.name, pszDescription, _TRUNCATE); - *pclr = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, 0); + *pclr = (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, 0); return (int)*pclr == -1; } diff --git a/utils/mir_options.cpp b/utils/mir_options.cpp index dcba3e6b26..71f9ae0ea9 100644 --- a/utils/mir_options.cpp +++ b/utils/mir_options.cpp @@ -37,7 +37,7 @@ static wchar_t* MyDBGetContactSettingTString(MCONTACT hContact, char* module, ch out[0] = '\0'; - if (!db_get_ts(hContact, module, setting, &dbv)) { + if (!db_get_ws(hContact, module, setting, &dbv)) { mir_wstrncpy(out, dbv.ptszVal, (int)len); db_free(&dbv); } @@ -126,7 +126,7 @@ static void LoadOpt(OptPageControl *ctrl, char *module) break; case CONTROL_TEXT: - MyDBGetContactSettingTString(NULL, module, ctrl->setting, ((wchar_t *)ctrl->var), min(ctrl->max <= 0 ? 1024 : ctrl->max, 1024), ctrl->tszDefValue == NULL ? NULL : TranslateTS(ctrl->tszDefValue)); + MyDBGetContactSettingTString(NULL, module, ctrl->setting, ((wchar_t *)ctrl->var), min(ctrl->max <= 0 ? 1024 : ctrl->max, 1024), ctrl->tszDefValue == NULL ? NULL : TranslateW(ctrl->tszDefValue)); break; case CONTROL_INT: @@ -140,7 +140,7 @@ static void LoadOpt(OptPageControl *ctrl, char *module) case CONTROL_COMBO_TEXT: case CONTROL_COMBO_ITEMDATA: - MyDBGetContactSettingTString(NULL, module, ctrl->setting, ((wchar_t *)ctrl->var), min(ctrl->max <= 0 ? 1024 : ctrl->max, 1024), ctrl->tszDefValue == NULL ? NULL : TranslateTS(ctrl->tszDefValue)); + MyDBGetContactSettingTString(NULL, module, ctrl->setting, ((wchar_t *)ctrl->var), min(ctrl->max <= 0 ? 1024 : ctrl->max, 1024), ctrl->tszDefValue == NULL ? NULL : TranslateW(ctrl->tszDefValue)); break; } } @@ -236,7 +236,7 @@ INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, cha break; case CONTROL_TEXT: - SetDlgItemText(hwndDlg, ctrl->nID, MyDBGetContactSettingTString(NULL, module, ctrl->setting, tmp, 1024, ctrl->tszDefValue == NULL ? NULL : TranslateTS(ctrl->tszDefValue))); + SetDlgItemText(hwndDlg, ctrl->nID, MyDBGetContactSettingTString(NULL, module, ctrl->setting, tmp, 1024, ctrl->tszDefValue == NULL ? NULL : TranslateW(ctrl->tszDefValue))); SendDlgItemMessage(hwndDlg, ctrl->nID, EM_LIMITTEXT, min(ctrl->max <= 0 ? 1024 : ctrl->max, 1024), 0); break; @@ -256,12 +256,12 @@ INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, cha break; case CONTROL_COMBO_TEXT: - MyDBGetContactSettingTString(NULL, module, ctrl->setting, tmp, 1024, ctrl->tszDefValue == NULL ? NULL : TranslateTS(ctrl->tszDefValue)); + MyDBGetContactSettingTString(NULL, module, ctrl->setting, tmp, 1024, ctrl->tszDefValue == NULL ? NULL : TranslateW(ctrl->tszDefValue)); SendDlgItemMessage(hwndDlg, ctrl->nID, CB_SELECTSTRING, 0, (WPARAM)tmp); break; case CONTROL_COMBO_ITEMDATA: - MyDBGetContactSettingTString(NULL, module, ctrl->setting, tmp, 1024, ctrl->tszDefValue == NULL ? NULL : TranslateTS(ctrl->tszDefValue)); + MyDBGetContactSettingTString(NULL, module, ctrl->setting, tmp, 1024, ctrl->tszDefValue == NULL ? NULL : TranslateW(ctrl->tszDefValue)); { int count = SendDlgItemMessage(hwndDlg, ctrl->nID, CB_GETCOUNT, 0, 0); int k; @@ -357,7 +357,7 @@ INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, cha case CONTROL_TEXT: GetDlgItemText(hwndDlg, ctrl->nID, tmp, _countof(tmp)); - db_set_ts(NULL, module, ctrl->setting, tmp); + db_set_ws(NULL, module, ctrl->setting, tmp); break; case CONTROL_INT: @@ -379,18 +379,18 @@ INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, cha { wchar_t rel[1024]; PathToRelative(rel, 1024, tmp); - db_set_ts(NULL, module, ctrl->setting, rel); + db_set_ws(NULL, module, ctrl->setting, rel); } break; case CONTROL_COMBO_TEXT: GetDlgItemText(hwndDlg, ctrl->nID, tmp, _countof(tmp)); - db_set_ts(NULL, module, ctrl->setting, tmp); + db_set_ws(NULL, module, ctrl->setting, tmp); break; case CONTROL_COMBO_ITEMDATA: int sel = SendDlgItemMessage(hwndDlg, ctrl->nID, CB_GETCURSEL, 0, 0); - db_set_ts(NULL, module, ctrl->setting, (wchar_t *)SendDlgItemMessage(hwndDlg, ctrl->nID, CB_GETITEMDATA, (WPARAM)sel, 0)); + db_set_ws(NULL, module, ctrl->setting, (wchar_t *)SendDlgItemMessage(hwndDlg, ctrl->nID, CB_GETITEMDATA, (WPARAM)sel, 0)); break; } |