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/KeyboardNotify | |
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/KeyboardNotify')
-rw-r--r-- | plugins/KeyboardNotify/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/KeyboardNotify/src/options.cpp | 26 | ||||
-rw-r--r-- | plugins/KeyboardNotify/src/utils.cpp | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 2ccf62e6f1..51eb50200b 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -521,7 +521,7 @@ void createProcessList(void) ProcessList.szFileName = (wchar_t **)mir_alloc(count * sizeof(wchar_t *));
if (ProcessList.szFileName) {
for (int i = 0; i < count; i++)
- ProcessList.szFileName[i] = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i));
+ ProcessList.szFileName[i] = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i));
ProcessList.count = count;
}
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index 1fdc35eae0..8296b4ea27 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -67,10 +67,10 @@ void exportThemes(const wchar_t *filename) fwprintf(fExport, TranslateT("\n; Automatically generated Keyboard Notify Theme file\n\n\n")); wchar_t *szTheme; - for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) { + for (int i = 0; szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) { fwprintf(fExport, L"[%s]\n", szTheme); mir_free(szTheme); - if (szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i))) { + if (szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i))) { fwprintf(fExport, L"%s\n\n", szTheme); mir_free(szTheme); } @@ -340,11 +340,11 @@ static INT_PTR CALLBACK DlgProcXstatusList(HWND hwndDlg, UINT msg, WPARAM wParam wchar_t szDefaultName[1024]; CUSTOM_STATUS xstatus = { 0 }; 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 = &j; CallProtoService(ProtoList.protoInfo[i].szProto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&xstatus); - tvis.item.pszText = TranslateTS(szDefaultName); + tvis.item.pszText = TranslateW(szDefaultName); } tvis.item.lParam = (LPARAM)j; tvis.item.iImage = tvis.item.iSelectedImage = j ? ImageList_AddIcon(hImageList, hIconAux = (HICON)CallProtoService(ProtoList.protoInfo[i].szProto, PS_GETCUSTOMSTATUSICON, (WPARAM)j, 0)) : 0; @@ -807,7 +807,7 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara int i = 0; for (int j = 0; j < ProcessListAux.count; j++) if (ProcessListAux.szFileName[j]) - db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i++), ProcessListAux.szFileName[j]); + db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i++), ProcessListAux.szFileName[j]); db_set_w(NULL, KEYBDMODULE, "processcount", (WORD)i); while (!db_unset(NULL, KEYBDMODULE, fmtDBSettingName("process%d", i++))); @@ -855,7 +855,7 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar CheckDlgButton(hwndDlg, IDC_INTURN, bFlashEffect == FLASH_INTURN ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_INSEQUENCE, bFlashEffect == FLASH_INSEQUENCE ? BST_CHECKED : BST_UNCHECKED); for (int i = 0; i < 3; i++) { - int index = SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_INSERTSTRING, -1, (LPARAM)TranslateTS(OrderName[i])); + int index = SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_INSERTSTRING, -1, (LPARAM)TranslateW(OrderName[i])); if (index != CB_ERR && index != CB_ERRSPACE) SendDlgItemMessage(hwndDlg, IDC_SEQORDER, CB_SETITEMDATA, (WPARAM)index, (LPARAM)i); } @@ -865,7 +865,7 @@ static INT_PTR CALLBACK DlgProcEffectOptions(HWND hwndDlg, UINT msg, WPARAM wPar CheckDlgButton(hwndDlg, IDC_CUSTOM, bFlashEffect == FLASH_CUSTOM ? BST_CHECKED : BST_UNCHECKED); wchar_t *szTheme; - for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) { + for (int i = 0; szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) { int index = SendDlgItemMessage(hwndDlg, IDC_SCUSTOM, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)szTheme); mir_free(szTheme); if (index != CB_ERR && index != CB_ERRSPACE) @@ -1001,11 +1001,11 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara SendDlgItemMessage(hwndDlg, IDC_CUSTOMSTRING, EM_LIMITTEXT, MAX_PATH, 0); wchar_t *szTheme; - for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) { + for (int i = 0; szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) { int index = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)szTheme); mir_free(szTheme); if (index != CB_ERR && index != CB_ERRSPACE) { - wchar_t *str = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i)); + wchar_t *str = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i)); if (str) SendDlgItemMessage(hwndDlg, IDC_THEME, CB_SETITEMDATA, (WPARAM)index, (LPARAM)str); } @@ -1226,7 +1226,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - if (szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", wCustomTheme))) { + if (szTheme = db_get_wsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", wCustomTheme))) { mir_wstrcpy(theme, szTheme); mir_free(szTheme); } @@ -1239,12 +1239,12 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara count = SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETCOUNT, 0, 0); for (int i = 0; i < count; i++) { SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETLBTEXT, (WPARAM)i, (LPARAM)themeAux); - db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i), themeAux); + db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i), themeAux); wchar_t *str = (wchar_t *)SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETITEMDATA, (WPARAM)i, 0); if (str) - db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), str); + db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), str); else - db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), L""); + db_set_ws(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), L""); if (!mir_wstrcmp(theme, themeAux)) wCustomTheme = i; diff --git a/plugins/KeyboardNotify/src/utils.cpp b/plugins/KeyboardNotify/src/utils.cpp index f7d8bc4ab8..1c4920c876 100644 --- a/plugins/KeyboardNotify/src/utils.cpp +++ b/plugins/KeyboardNotify/src/utils.cpp @@ -36,8 +36,8 @@ wchar_t *getAbsoluteProfileName(wchar_t *absoluteProfileName, size_t maxLen) wchar_t profilePath[MAX_PATH+1], profileName[MAX_PATH+1];
profilePath[0] = profileName[0] = '\0';
- CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath);
- CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)profileName);
+ CallService(MS_DB_GETPROFILEPATHW, MAX_PATH, (LPARAM)profilePath);
+ CallService(MS_DB_GETPROFILENAMEW, MAX_PATH, (LPARAM)profileName);
mir_snwprintf(absoluteProfileName, maxLen, L"%s\\%s", profilePath, profileName);
return absoluteProfileName;
|