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/WebView/src | |
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/WebView/src')
-rw-r--r-- | plugins/WebView/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/WebView/src/webview.cpp | 6 | ||||
-rw-r--r-- | plugins/WebView/src/webview.h | 2 | ||||
-rw-r--r-- | plugins/WebView/src/webview_alerts.cpp | 24 | ||||
-rw-r--r-- | plugins/WebView/src/webview_datawnd.cpp | 4 | ||||
-rw-r--r-- | plugins/WebView/src/webview_opts.cpp | 10 | ||||
-rw-r--r-- | plugins/WebView/src/webview_services.cpp | 28 |
7 files changed, 38 insertions, 38 deletions
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 337c5ff94a..fbdc6e9442 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -132,7 +132,7 @@ extern "C" int __declspec(dllexport) Load() HookEvent(ME_CLIST_DOUBLECLICKED, Doubleclick);
hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXT));
- hRichEd = LoadLibrary(_T("Msftedit.dll"));
+ hRichEd = LoadLibrary(L"Msftedit.dll");
/*TIMERS*/
if ((db_get_dw(NULL, MODULENAME, REFRESH_KEY, TIME) != 0)) {
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 361afbba7c..74c4c28809 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -96,7 +96,7 @@ void TxtclrLoop() {
for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
- SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DATA, L"");
InvalidateRect(hwndDlg, NULL, 1);
}
}
@@ -106,7 +106,7 @@ void BGclrLoop() {
for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = (WindowList_Find(hWindowList, hContact));
- SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DATA, L"");
SendDlgItemMessage(hwndDlg, IDC_DATA, EM_SETBKGNDCOLOR, 0, BackgoundClr);
InvalidateRect(hwndDlg, NULL, 1);
}
@@ -222,7 +222,7 @@ int SendToRichEdit(HWND hWindow, char *truncated, COLORREF rgbText, COLORREF rgb DWORD italic = 0;
DWORD underline = 0;
- SetDlgItemText(hWindow, IDC_DATA, _T(""));
+ SetDlgItemText(hWindow, IDC_DATA, L"");
CHARFORMAT2 cfFM;
memset(&cfFM, 0, sizeof(cfFM));
diff --git a/plugins/WebView/src/webview.h b/plugins/WebView/src/webview.h index c09e9f88b8..82a264fc1b 100644 --- a/plugins/WebView/src/webview.h +++ b/plugins/WebView/src/webview.h @@ -104,7 +104,7 @@ #define TIME 60
#define Def_color_bg 0x00ffffff
#define Def_color_txt 0x00000000
-#define Def_font_face _T("Courier")
+#define Def_font_face L"Courier"
#define Def_font_size 14
#define HK_SHOWHIDE 3001
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index 706c6b8627..6397413cda 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -188,11 +188,11 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam) TCHAR *ptszContactName = pcli->pfnGetContactDisplayName(hContact, 0);
if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, MODULENAME, ERROR_POPUP_KEY, 0)) {
- mir_sntprintf(newdisplaytext, _T("%s\n%s"), ptszContactName, displaytext);
+ mir_sntprintf(newdisplaytext, L"%s\n%s", ptszContactName, displaytext);
PUShowMessageT(newdisplaytext, SM_WARNING);
}
else if ( ServiceExists("OSD/Announce") && db_get_b(NULL, MODULENAME, ERROR_POPUP_KEY, 0)) {
- mir_sntprintf(newdisplaytext, _T("%s: %s"), ptszContactName, TranslateTS(displaytext));
+ mir_sntprintf(newdisplaytext, L"%s: %s", ptszContactName, TranslateTS(displaytext));
CallService("OSD/Announce", (WPARAM)newdisplaytext, 0);
}
else if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
@@ -357,7 +357,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn //
if ((!notpresent)) {
if (alertIndex == 0) { // popup
- mir_sntprintf(displaystring, _T("%s \"%S\" %s."), Translate("The string"), alertstring, Translate("has been found on the web page"));
+ mir_sntprintf(displaystring, L"%s \"%S\" %s.", Translate("The string"), alertstring, Translate("has been found on the web page"));
WAlertPopup(hContact, displaystring);
// contactlist name//
@@ -397,7 +397,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn }
}
else if (alertIndex == 3) {
- mir_sntprintf(displaystring, _T("%s \"%s\" %s."), TranslateT("The string"), alertstring, TranslateT("has been found on the web page"));
+ mir_sntprintf(displaystring, L"%s \"%s\" %s.", TranslateT("The string"), alertstring, TranslateT("has been found on the web page"));
WAlertOSD(hContact, displaystring);
// contactlist name//
@@ -426,12 +426,12 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn cacheend++;
*cacheend = '\0';
- mir_sntprintf(cachedirectorypath, _T("%s%S%S"), cachepath, MODULENAME, "cache\\");
+ mir_sntprintf(cachedirectorypath, L"%s%S%S", cachepath, MODULENAME, "cache\\");
CreateDirectory(cachedirectorypath, NULL);
- mir_sntprintf(newcachepath, _T("%s%S%S%S%S"), cachepath, MODULENAME, "cache\\", contactname, ".txt");
+ mir_sntprintf(newcachepath, L"%s%S%S%S%S", cachepath, MODULENAME, "cache\\", contactname, ".txt");
// file exists?
if ( _taccess(newcachepath, 0) != -1) {
- if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"r")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot read from file"));
else {
memset(&cachecompare, 0, sizeof(cachecompare));
@@ -440,7 +440,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn }
}
// write to cache
- if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"w")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot write to file 1"));
else {
fwrite(tempraw, mir_strlen(tempraw), 1, pcachefile); //smaller cache
@@ -638,12 +638,12 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn cacheend++;
*cacheend = '\0';
- mir_sntprintf(cachedirectorypath, _T("%s%S%S"), cachepath, MODULENAME, "cache\\");
+ mir_sntprintf(cachedirectorypath, L"%s%S%S", cachepath, MODULENAME, "cache\\");
CreateDirectory(cachedirectorypath, NULL);
- mir_sntprintf(newcachepath, _T("%s%S%S%S%S"), cachepath, MODULENAME, "cache\\", contactname, ".txt");
+ mir_sntprintf(newcachepath, L"%s%S%S%S%S", cachepath, MODULENAME, "cache\\", contactname, ".txt");
// file exists?
if ( _taccess(newcachepath, 0) != -1) {
- if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"r")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot read from file"));
else {
memset(&cachecompare, 0, sizeof(cachecompare));
@@ -652,7 +652,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn }
}
// write to cache
- if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"w")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot write to file 2"));
else {
fwrite(raw, mir_strlen(raw), 1, pcachefile); //smaller cache
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index 78c8a99581..da1314d9a1 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -117,7 +117,7 @@ INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara /*****************************************************************************/
-static TCHAR tszSizeString[] = _T("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
+static TCHAR tszSizeString[] = L"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
static MCONTACT FindContactByUrl(HWND hwndDlg)
{
@@ -212,7 +212,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA txtcolor = TextClr;
- SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DATA, L"");
InvalidateRect(hwndDlg, NULL, 1);
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index b0a8f1bee3..dc894668fd 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -55,7 +55,7 @@ TCHAR* FixButtonText(TCHAR *url, size_t len) int posafter = (stringafter - buttontext) + 1;
strdelt(stringafter, 1);
_tcsncpy_s(stringbefore, pos, buttontext, _TRUNCATE);
- mir_sntprintf(newbuttontext, _T("%s!!%s"), stringbefore, stringafter);
+ mir_sntprintf(newbuttontext, L"%s!!%s", stringbefore, stringafter);
posafter = 0;
posbefore = 0;
@@ -170,11 +170,11 @@ INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) break;
case IDC_PD1:
- SetDlgItemText(hdlg, IDC_DELAY, _T("0"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"0");
break;
case IDC_PD2:
// Popup delay = permanent
- SetDlgItemText(hdlg, IDC_DELAY, _T("-1"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"-1");
break;
case IDC_DELAY:
@@ -446,12 +446,12 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
- ofn.lpstrFilter = _T("TEXT Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0");
+ ofn.lpstrFilter = L"TEXT Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0";
ofn.lpstrFile = szFileName;
ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
ofn.nMaxFile = _countof(szFileName);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("txt");
+ ofn.lpstrDefExt = L"txt";
if (!GetSaveFileName(&ofn))
break;
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 088f65c69d..537c83fe86 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -85,16 +85,16 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) TCHAR *cacheend = _tcsrchr(cachepath, '\\'); cacheend++; *cacheend = '\0'; - mir_sntprintf(cachedirectorypath, _T("%s")_T(MODULENAME)_T("cache\\"), cachepath); + mir_sntprintf(cachedirectorypath, L"%s" MODULENAME L"cache\\", cachepath); CreateDirectory(cachedirectorypath, NULL); TCHAR newcachepath[MAX_PATH + 50], renamedcachepath[MAX_PATH + 50]; - mir_sntprintf(newcachepath, _T("%s")_T(MODULENAME)_T("cache\\%s.txt"), cachepath, oldName); - mir_sntprintf(renamedcachepath, _T("%s")_T(MODULENAME)_T("cache\\%s.txt"), cachepath, nick); + mir_sntprintf(newcachepath, L"%s" MODULENAME L"cache\\%s.txt", cachepath, oldName); + mir_sntprintf(renamedcachepath, L"%s" MODULENAME L"cache\\%s.txt", cachepath, nick); // file exists? if ( _taccess(newcachepath, 0) != -1) { - FILE *pcachefile = _tfopen(newcachepath, _T("r")); + FILE *pcachefile = _tfopen(newcachepath, L"r"); if (pcachefile != NULL) { fclose(pcachefile); if (mir_tstrcmp(newcachepath, renamedcachepath)) { @@ -124,12 +124,12 @@ int SiteDeleted(WPARAM wParam, LPARAM) cacheend++; *cacheend = '\0'; - mir_sntprintf(cachedirectorypath, _T("%s")_T(MODULENAME)_T("cache\\"), cachepath); + mir_sntprintf(cachedirectorypath, L"%s" MODULENAME L"cache\\", cachepath); CreateDirectory(cachedirectorypath, NULL); - mir_sntprintf(newcachepath, _T("%s")_T(MODULENAME)_T("cache\\%s.txt"), cachepath, contactName); + mir_sntprintf(newcachepath, L"%s" MODULENAME L"cache\\%s.txt", cachepath, contactName); // file exists? if ( _taccess(newcachepath, 0) != -1) { - FILE *pcachefile = _tfopen(newcachepath, _T("r")); + FILE *pcachefile = _tfopen(newcachepath, L"r"); if (pcachefile != NULL) { fclose(pcachefile); DeleteFile(newcachepath); @@ -149,12 +149,12 @@ INT_PTR OpenCacheDir(WPARAM, LPARAM) cacheend++; *cacheend = '\0'; - mir_sntprintf(cachedirectorypath, _T("%s")_T(MODULENAME)_T("cache\\%s"), cachepath, cacheend); + mir_sntprintf(cachedirectorypath, L"%s" MODULENAME L"cache\\%s", cachepath, cacheend); if( _taccess(cachedirectorypath, 0) != 0) WErrorPopup((UINT_PTR)"ERROR", TranslateT("Cache folder does not exist.")); else - ShellExecute(NULL, _T("open"), cachedirectorypath, NULL, NULL, SW_SHOWNORMAL); + ShellExecute(NULL, L"open", cachedirectorypath, NULL, NULL, SW_SHOWNORMAL); return 0; } @@ -173,7 +173,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM) TCHAR Cnick[200], *Oldnick; _tcsncpy(Cnick, url, _countof(Cnick)); - if ((Oldnick = _tcsstr(Cnick, _T("://"))) != 0) + if ((Oldnick = _tcsstr(Cnick, L"://")) != 0) Oldnick += 3; else Oldnick = Cnick; @@ -181,7 +181,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM) TCHAR *Nend = _tcschr(Oldnick, '/'); if (Nend) *Nend = '\0'; - ShellExecute(NULL, _T("open"), _T("psite.bat"), Oldnick, NULL, SW_HIDE); + ShellExecute(NULL, L"open", L"psite.bat", Oldnick, NULL, SW_HIDE); return 0; } @@ -384,17 +384,17 @@ INT_PTR AddToList(WPARAM, LPARAM lParam) else Cnick[0] = 0; - TCHAR *Oldnick = _tcsstr(Cnick, _T("://")); + TCHAR *Oldnick = _tcsstr(Cnick, L"://"); if (Oldnick != 0) Oldnick += 3; else Oldnick = Cnick; - TCHAR *Newnick = _tcsstr(Oldnick, _T("www.")); + TCHAR *Newnick = _tcsstr(Oldnick, L"www."); if (Newnick != 0) Newnick += 4; else { - Newnick = _tcsstr(Oldnick, _T("WWW.")); + Newnick = _tcsstr(Oldnick, L"WWW."); if (Newnick != 0) Newnick += 4; else |