summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/KeyboardNotify/src
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/KeyboardNotify/src')
-rw-r--r--plugins/KeyboardNotify/src/keyboard.cpp8
-rw-r--r--plugins/KeyboardNotify/src/main.cpp4
-rw-r--r--plugins/KeyboardNotify/src/options.cpp42
-rw-r--r--plugins/KeyboardNotify/src/utils.cpp2
4 files changed, 28 insertions, 28 deletions
diff --git a/plugins/KeyboardNotify/src/keyboard.cpp b/plugins/KeyboardNotify/src/keyboard.cpp
index 1b11915e45..8fd9325b5f 100644
--- a/plugins/KeyboardNotify/src/keyboard.cpp
+++ b/plugins/KeyboardNotify/src/keyboard.cpp
@@ -40,11 +40,11 @@ BOOL OpenKeyboardDevice()
TCHAR aux1[MAX_PATH+1], aux2[MAX_PATH+1];
do {
- mir_sntprintf(aux1, _T("Kbd%d"), i);
- mir_sntprintf(aux2, _T("\\Device\\KeyboardClass%d"), i);
+ mir_sntprintf(aux1, L"Kbd%d", i);
+ mir_sntprintf(aux2, L"\\Device\\KeyboardClass%d", i);
DefineDosDevice(DDD_RAW_TARGET_PATH, aux1, aux2);
- mir_sntprintf(aux1, _T("\\\\.\\Kbd%d"), i);
+ mir_sntprintf(aux1, L"\\\\.\\Kbd%d", i);
hKbdDev[i] = CreateFile(aux1, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
@@ -80,7 +80,7 @@ void CloseKeyboardDevice()
if (hKbdDev[i] != INVALID_HANDLE_VALUE)
CloseHandle(hKbdDev[i]);
- mir_sntprintf(aux, _T("Kbd%d"), i);
+ mir_sntprintf(aux, L"Kbd%d", i);
DefineDosDevice(DDD_REMOVE_DEFINITION, aux, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 54d1992fbb..9bccd96da1 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -914,9 +914,9 @@ static int ModulesLoaded(WPARAM, LPARAM)
// Create some synchronisation objects
createEventPrefix(eventPrefix, MAX_PATH - 11);
- mir_sntprintf(eventName, _T("%s/FlashEvent"), eventPrefix);
+ mir_sntprintf(eventName, L"%s/FlashEvent", eventPrefix);
hFlashEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
- mir_sntprintf(eventName, _T("%s/ExitEvent"), eventPrefix);
+ mir_sntprintf(eventName, L"%s/ExitEvent", eventPrefix);
hExitEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
hThread = mir_forkthread(FlashThreadFunction, 0);
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index 5b20e8f4b7..afd15ae342 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -34,7 +34,7 @@ extern PROCESS_LIST ProcessList;
HWND hwndProto, hwndBasic, hwndEffect, hwndTheme, hwndIgnore, hwndCurrentTab;
-TCHAR *AttendedName[]={_T("Miranda"), _T("Windows")};
+TCHAR *AttendedName[]={L"Miranda", L"Windows"};
TCHAR *OrderName[]={LPGENT("left -> right"), LPGENT("right -> left"), LPGENT("left <-> right")};
PROCESS_LIST ProcessListAux;
@@ -59,7 +59,7 @@ static void writeThemeToCombo(const TCHAR *theme, const TCHAR *custom, BOOL over
void exportThemes(const TCHAR *filename)
{
- FILE *fExport = _tfopen(filename, _T("wt"));
+ FILE *fExport = _tfopen(filename, L"wt");
if (!fExport)
return;
@@ -68,14 +68,14 @@ void exportThemes(const TCHAR *filename)
TCHAR *szTheme;
for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) {
- _ftprintf(fExport, _T("[%s]\n"), szTheme);
+ _ftprintf(fExport, L"[%s]\n", szTheme);
mir_free(szTheme);
if (szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i))) {
- _ftprintf(fExport, _T("%s\n\n"), szTheme);
+ _ftprintf(fExport, L"%s\n\n", szTheme);
mir_free(szTheme);
}
else
- _ftprintf(fExport, _T("0\n\n"));
+ _ftprintf(fExport, L"0\n\n");
}
_ftprintf(fExport, TranslateT("\n; End of automatically generated Keyboard Notify Theme file\n"));
@@ -85,7 +85,7 @@ void exportThemes(const TCHAR *filename)
void importThemes(const TCHAR *filename, BOOL overrideExisting)
{
- FILE *fImport = _tfopen(filename, _T("rt"));
+ FILE *fImport = _tfopen(filename, L"rt");
if (!fImport)
return;
@@ -245,7 +245,7 @@ static INT_PTR CALLBACK DlgProcProcesses(HWND hwndDlg, UINT msg, WPARAM wParam,
int item = SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_FINDSTRINGEXACT, -1, (LPARAM)szFileName);
SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_DELETESTRING, (WPARAM)item, 0);
if (SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_GETCOUNT, 0, 0) == 0) {
- SetDlgItemText(hwndDlg, IDC_PROGRAMS, _T(""));
+ SetDlgItemText(hwndDlg, IDC_PROGRAMS, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETEPGM), FALSE);
}
else
@@ -1037,7 +1037,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
if (str)
SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, str);
else
- SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T(""));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE);
@@ -1049,7 +1049,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
int item = SendMessage((HWND)lParam, CB_FINDSTRINGEXACT, -1, (LPARAM)theme);
if (item == CB_ERR) {
//new theme
- SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T(""));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE);
}
@@ -1058,7 +1058,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
if (str)
SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, str);
else
- SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T(""));
+ SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE);
}
@@ -1139,8 +1139,8 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
mir_free(str);
SendDlgItemMessage(hwndDlg, IDC_THEME, CB_DELETESTRING, (WPARAM)item, 0);
if (SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETCOUNT, 0, 0) == 0) {
- SetDlgItemText(hwndDlg, IDC_THEME, _T(""));
- SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T(""));
+ SetDlgItemText(hwndDlg, IDC_THEME, L"");
+ SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE);
}
else {
@@ -1163,20 +1163,20 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme"));
- mir_wstrcat(filter, _T(" (*.knt)"));
+ mir_wstrcat(filter, L" (*.knt)");
pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, _T("*.knt"));
+ mir_tstrcpy(pfilter, L"*.knt");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
mir_tstrcpy(pfilter, TranslateT("All Files"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, _T("*.*"));
+ mir_tstrcpy(pfilter, L"*.*");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = _T('\0');
ofn.lpstrFilter = filter;
ofn.lpstrFile = path;
ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_NOREADONLYRETURN | OFN_PATHMUSTEXIST;
ofn.nMaxFile = _countof(path);
- ofn.lpstrDefExt = _T("knt");
+ ofn.lpstrDefExt = L"knt";
if (GetSaveFileName(&ofn))
exportThemes(path);
}
@@ -1191,20 +1191,20 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme"));
- mir_wstrcat(filter, _T(" (*.knt)"));
+ mir_wstrcat(filter, L" (*.knt)");
pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, _T("*.knt"));
+ mir_tstrcpy(pfilter, L"*.knt");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
mir_tstrcpy(pfilter, TranslateT("All Files"));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, _T("*.*"));
+ mir_tstrcpy(pfilter, L"*.*");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = _T('\0');
ofn.lpstrFilter = filter;
ofn.lpstrFile = path;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
ofn.nMaxFile = _countof(path);
- ofn.lpstrDefExt = _T("knt");
+ ofn.lpstrDefExt = L"knt";
if (GetOpenFileName(&ofn)) {
importThemes(path, IsDlgButtonChecked(hwndDlg, IDC_OVERRIDE) == BST_CHECKED);
SendMessage(GetParent(GetParent(hwndDlg)), PSM_CHANGED, 0, 0);
@@ -1244,7 +1244,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara
if (str)
db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), str);
else
- db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), _T(""));
+ db_set_ts(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 451ac0867c..23b9408ff2 100644
--- a/plugins/KeyboardNotify/src/utils.cpp
+++ b/plugins/KeyboardNotify/src/utils.cpp
@@ -38,7 +38,7 @@ TCHAR *getAbsoluteProfileName(TCHAR *absoluteProfileName, size_t maxLen)
profilePath[0] = profileName[0] = '\0';
CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath);
CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)profileName);
- mir_sntprintf(absoluteProfileName, maxLen, _T("%s\\%s"), profilePath, profileName);
+ mir_sntprintf(absoluteProfileName, maxLen, L"%s\\%s", profilePath, profileName);
return absoluteProfileName;
}