diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
commit | 8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch) | |
tree | 94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/DbEditorPP | |
parent | 1e273e28d89b5838e3d0f0cafac9676577cb71ce (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/DbEditorPP')
-rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 12 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/main.cpp | 24 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/moduletree.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/settinglist.cpp | 50 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/settingsdlg.cpp | 8 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/watchedvars.cpp | 6 |
6 files changed, 51 insertions, 51 deletions
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 26e42a773b..ec10e43f29 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -3,7 +3,7 @@ TCHAR *GetFilter()
{
static TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.ini%c%s%c*.*%c"), TranslateT("INI Files"), 0, 0, TranslateT("All Files"), 0, 0);
+ mir_sntprintf(filter, L"%s%c*.ini%c%s%c*.*%c", TranslateT("INI Files"), 0, 0, TranslateT("All Files"), 0, 0);
return filter;
}
@@ -38,7 +38,7 @@ int Openfile(TCHAR *outputFile, const char *module, int maxlen) ofn.Flags = OFN_HIDEREADONLY | OFN_SHAREAWARE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT;
ofn.lpstrTitle = TranslateT("Export to file");
ofn.nMaxFile = maxlen;
- ofn.lpstrDefExt = _T("ini");
+ ofn.lpstrDefExt = L"ini";
if (!GetSaveFileName(&ofn))
return 0;
@@ -151,7 +151,7 @@ void exportDB(MCONTACT hContact, const char *module) TCHAR fileName[MAX_PATH];
if (Openfile(fileName, (hContact == INVALID_CONTACT_ID) ? NULL : module, MAX_PATH)) {
- FILE *file = _tfopen(fileName, _T("wt"));
+ FILE *file = _tfopen(fileName, L"wt");
if (!file) {
msg(TranslateT("Couldn't open file for writing"));
return;
@@ -492,7 +492,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *FilePath) DWORD offset = 0;
- mir_tstrcpy(szFileNames, _T(""));
+ mir_tstrcpy(szFileNames, L"");
if (!FilePath)
offset = Openfile2Import(szFileNames, _countof(szFileNames));
@@ -503,11 +503,11 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *FilePath) }
int index = 0;
- if (mir_tstrcmp(szFileNames, _T(""))) {
+ if (mir_tstrcmp(szFileNames, L"")) {
if ((DWORD)mir_tstrlen(szFileNames) < offset) {
index += offset;
mir_tstrncpy(szPath, szFileNames, offset);
- mir_tstrcat(szPath, _T("\\"));
+ mir_tstrcat(szPath, L"\\");
}
while (szFileNames[index]) {
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index f4d3390108..b914c6a216 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -268,16 +268,16 @@ int WriteBlobFromString(MCONTACT hContact, const char *szModule, const char *szS TCHAR *DBVType(BYTE type)
{
switch (type) {
- case DBVT_BYTE: return _T("BYTE");
- case DBVT_WORD: return _T("WORD");
- case DBVT_DWORD: return _T("DWORD");
- case DBVT_ASCIIZ: return _T("STRING");
+ case DBVT_BYTE: return L"BYTE";
+ case DBVT_WORD: return L"WORD";
+ case DBVT_DWORD: return L"DWORD";
+ case DBVT_ASCIIZ: return L"STRING";
case DBVT_WCHAR:
- case DBVT_UTF8: return _T("UNICODE");
- case DBVT_BLOB: return _T("BLOB");
- case DBVT_DELETED: return _T("DELETED");
+ case DBVT_UTF8: return L"UNICODE";
+ case DBVT_BLOB: return L"BLOB";
+ case DBVT_DELETED: return L"DELETED";
}
- return _T("");
+ return L"";
}
DWORD getNumericValue(DBVARIANT *dbv)
@@ -474,7 +474,7 @@ int GetContactName(MCONTACT hContact, const char *proto, TCHAR *value, int maxle int len = (int)mir_tstrlen(name);
if (len + 2 < _countof(name)) {
if (len)
- mir_tstrncat(name, _T(" "), _countof(name));
+ mir_tstrncat(name, L" ", _countof(name));
len++;
GetValue(hContact, szProto, "LastName", &name[len], _countof(name) - len);
}
@@ -491,15 +491,15 @@ int GetContactName(MCONTACT hContact, const char *proto, TCHAR *value, int maxle if (szProto && szProto[0]) {
if (g_Order)
- mir_sntprintf(value, maxlen, _T("(%s) %s"), _A2T(szProto), name);
+ mir_sntprintf(value, maxlen, L"(%s) %s", _A2T(szProto), name);
else
- mir_sntprintf(value, maxlen, _T("%s (%s)"), name, _A2T(szProto));
+ mir_sntprintf(value, maxlen, L"%s (%s)", name, _A2T(szProto));
}
else mir_tstrncpy(value, name, maxlen);
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (!Proto_IsAccountEnabled(pa)) {
- mir_tstrncat(value, _T(" "), maxlen);
+ mir_tstrncat(value, L" ", maxlen);
mir_tstrncat(value, TranslateT("[UNLOADED]"), maxlen);
}
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index dfc9ac6998..cea9dc8bf1 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -131,7 +131,7 @@ void doItems(ModuleSettingLL* modlist, int count) continue;
// Caption
- mir_sntprintf(percent, _T("%s %d%%"), title, (int)(100 * i / count));
+ mir_sntprintf(percent, L"%s %d%%", title, (int)(100 * i / count));
SetWindowText(hwnd, percent);
for (ModSetLinkLinkItem *module = modlist->first; module && hwnd2mainWindow; module = module->next) {
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index a5777080a1..863cfc8869 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -82,7 +82,7 @@ int convertSetting(MCONTACT hContact, const char *module, const char *setting, i case DBVT_BYTE:
case DBVT_WORD:
case DBVT_DWORD:
- if (val != 0 || !mir_tstrcmp(value, _T("0")))
+ if (val != 0 || !mir_tstrcmp(value, L"0"))
res = setNumericValue(hContact, module, setting, val, toType);
break;
@@ -194,15 +194,15 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident lvi.mask = LVIF_IMAGE;
lvi.iItem = index;
- ListView_SetItemText(hwnd2List, index, 4, resident ? _T("[R]") : _T(""));
+ ListView_SetItemText(hwnd2List, index, 4, resident ? L"[R]" : L"");
if (g_db && g_db->IsSettingEncrypted(info.module, setting)) {
lvi.iImage = IMAGE_UNICODE;
ListView_SetItem(hwnd2List, &lvi);
ListView_SetItemTextA(hwnd2List, index, 0, setting);
ListView_SetItemText(hwnd2List, index, 1, TranslateT("*** encrypted ***"));
- ListView_SetItemText(hwnd2List, index, 2, _T("UNICODE"));
- ListView_SetItemText(hwnd2List, index, 3, _T(""));
+ ListView_SetItemText(hwnd2List, index, 2, L"UNICODE");
+ ListView_SetItemText(hwnd2List, index, 3, L"");
return;
}
@@ -216,7 +216,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident ListView_SetItemTextA(hwnd2List, index, 1, ptrA(StringFromBlob(dbv->pbVal, dbv->cpbVal)));
- mir_sntprintf(data, _T("0x%04X (%u)"), dbv->cpbVal, dbv->cpbVal);
+ mir_sntprintf(data, L"0x%04X (%u)", dbv->cpbVal, dbv->cpbVal);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -224,30 +224,30 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident lvi.iImage = IMAGE_BYTE;
ListView_SetItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%02X (%u)"), dbv->bVal, dbv->bVal);
+ mir_sntprintf(data, L"0x%02X (%u)", dbv->bVal, dbv->bVal);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0001 (1)"));
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0001 (1)");
break;
case DBVT_WORD:
lvi.iImage = IMAGE_WORD;
ListView_SetItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%04X (%u)"), dbv->wVal, dbv->wVal);
+ mir_sntprintf(data, L"0x%04X (%u)", dbv->wVal, dbv->wVal);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0002 (2)"));
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0002 (2)");
break;
case DBVT_DWORD:
lvi.iImage = IMAGE_DWORD;
ListView_SetItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%08X (%u)"), dbv->dVal, dbv->dVal);
+ mir_sntprintf(data, L"0x%08X (%u)", dbv->dVal, dbv->dVal);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0004 (4)"));
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0004 (4)");
break;
case DBVT_ASCIIZ:
@@ -257,7 +257,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident ListView_SetItemTextA(hwnd2List, index, 1, dbv->pszVal);
length = (int)mir_strlen(dbv->pszVal) + 1;
- mir_sntprintf(data, _T("0x%04X (%u)"), length, length);
+ mir_sntprintf(data, L"0x%04X (%u)", length, length);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -268,7 +268,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident length = (int)mir_wstrlen(dbv->pwszVal) + 1;
ListView_SetItemText(hwnd2List, index, 1, dbv->pwszVal);
- mir_sntprintf(data, _T("0x%04X (%u)"), length, length);
+ mir_sntprintf(data, L"0x%04X (%u)", length, length);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -281,7 +281,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident ptrT tszText(mir_utf8decodeT(dbv->pszVal));
ListView_SetItemText(hwnd2List, index, 1, tszText);
}
- mir_sntprintf(data, _T("0x%04X (%u)"), length, length);
+ mir_sntprintf(data, L"0x%04X (%u)", length, length);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -306,18 +306,18 @@ void addListHandle(MCONTACT hContact) int index = ListView_InsertItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%08X (%ld)"), hContact, hContact);
+ mir_sntprintf(data, L"0x%08X (%ld)", hContact, hContact);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 2, _T("HANDLE"));
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0004 (4)"));
+ ListView_SetItemText(hwnd2List, index, 2, L"HANDLE");
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0004 (4)");
if (db_mc_isEnabled()) {
if (db_mc_isSub(hContact)) {
- ListView_SetItemText(hwnd2List, index, 4, _T("[S]"));
+ ListView_SetItemText(hwnd2List, index, 4, L"[S]");
}
else
if (db_mc_isMeta(hContact)) {
- ListView_SetItemText(hwnd2List, index, 4, _T("[M]"));
+ ListView_SetItemText(hwnd2List, index, 4, L"[M]");
}
}
}
@@ -636,7 +636,7 @@ void EditLabel(int item, int subitem) info.subitem = subitem;
if (!subitem)
- info.hwnd2Edit = CreateWindow(_T("EDIT"), _A2T(setting), WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
+ info.hwnd2Edit = CreateWindow(L"EDIT", _A2T(setting), WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
else {
TCHAR *str = NULL, value[16] = { 0 };
@@ -645,13 +645,13 @@ void EditLabel(int item, int subitem) str = mir_a2t(dbv.pszVal);
break;
case DBVT_BYTE:
- mir_sntprintf(value, (g_Hex & HEX_BYTE) ? _T("0x%02X") : _T("%u"), dbv.bVal);
+ mir_sntprintf(value, (g_Hex & HEX_BYTE) ? L"0x%02X" : L"%u", dbv.bVal);
break;
case DBVT_WORD:
- mir_sntprintf(value, (g_Hex & HEX_WORD) ? _T("0x%04X") : _T("%u"), dbv.wVal);
+ mir_sntprintf(value, (g_Hex & HEX_WORD) ? L"0x%04X" : L"%u", dbv.wVal);
break;
case DBVT_DWORD:
- mir_sntprintf(value, (g_Hex & HEX_DWORD) ? _T("0x%08X") : _T("%u"), dbv.dVal);
+ mir_sntprintf(value, (g_Hex & HEX_DWORD) ? L"0x%08X" : L"%u", dbv.dVal);
break;
case DBVT_WCHAR:
str = mir_u2t(dbv.pwszVal);
@@ -670,11 +670,11 @@ void EditLabel(int item, int subitem) GetClientRect(hwnd2List, &rclist);
if (rc.top + height > rclist.bottom && rclist.bottom - rclist.top > height)
rc.top = rc.bottom - height;
- info.hwnd2Edit = CreateWindow(_T("EDIT"), str, WS_BORDER | WS_VISIBLE | WS_CHILD | WS_VSCROLL | ES_MULTILINE | ES_AUTOHSCROLL, rc.left, rc.top, rc.right - rc.left, height, hwnd2List, 0, hInst, 0);
+ info.hwnd2Edit = CreateWindow(L"EDIT", str, WS_BORDER | WS_VISIBLE | WS_CHILD | WS_VSCROLL | ES_MULTILINE | ES_AUTOHSCROLL, rc.left, rc.top, rc.right - rc.left, height, hwnd2List, 0, hInst, 0);
mir_free(str);
}
else if (dbv.type == DBVT_BYTE || dbv.type == DBVT_WORD || dbv.type == DBVT_DWORD)
- info.hwnd2Edit = CreateWindow(_T("EDIT"), value, WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
+ info.hwnd2Edit = CreateWindow(L"EDIT", value, WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
}
db_free(&dbv);
diff --git a/plugins/DbEditorPP/src/settingsdlg.cpp b/plugins/DbEditorPP/src/settingsdlg.cpp index 876ac8262b..b712386a5b 100644 --- a/plugins/DbEditorPP/src/settingsdlg.cpp +++ b/plugins/DbEditorPP/src/settingsdlg.cpp @@ -166,13 +166,13 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l GetDlgItemText(hwnd, IDC_SETTINGVALUE, setting, settingLength + 1);
if (LOWORD(wParam) == CHK_DECIMAL && IsDlgButtonChecked(hwnd, CHK_DECIMAL))
{
- _stscanf(setting, _T("%X"), &tmp);
- mir_sntprintf(text, _T("%u"), tmp);
+ _stscanf(setting, L"%X", &tmp);
+ mir_sntprintf(text, L"%u", tmp);
}
else
{
- _stscanf(setting, _T("%u"), &tmp);
- mir_sntprintf(text, _T("%X"), tmp);
+ _stscanf(setting, L"%u", &tmp);
+ mir_sntprintf(text, L"%X", tmp);
}
SetDlgItemText(hwnd, IDC_SETTINGVALUE, text);
mir_free(setting);
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index 982eb423f1..a5ca3e7c0e 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -131,16 +131,16 @@ void addwatchtolist(HWND hwnd, struct DBsetting *lParam) break;
}
case DBVT_BYTE:
- mir_sntprintf(data, _T("0x%02X (%s)"), dbv->bVal, _ultot(dbv->bVal, tmp, 10));
+ mir_sntprintf(data, L"0x%02X (%s)", dbv->bVal, _ultot(dbv->bVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
case DBVT_WORD:
- mir_sntprintf(data, _T("0x%04X (%s)"), dbv->wVal, _ultot(dbv->wVal, tmp, 10));
+ mir_sntprintf(data, L"0x%04X (%s)", dbv->wVal, _ultot(dbv->wVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
case DBVT_DWORD:
- mir_sntprintf(data, _T("0x%08X (%s)"), dbv->dVal, _ultot(dbv->dVal, tmp, 10));
+ mir_sntprintf(data, L"0x%08X (%s)", dbv->dVal, _ultot(dbv->dVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
|