summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 11:50:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 11:50:07 +0000
commitddd1af0fdf37364c9472faedad941b4cc5f1b465 (patch)
treed4eb46f481a47b6e16e40b39860e830e40f9dbcf /plugins/Weather
parentcc3be4384048697fe9b7716c11b7bd726b9ca650 (diff)
<tchar.h> removed from <m_system.h>
git-svn-id: http://svn.miranda-ng.org/main/trunk@17136 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather.cpp6
-rw-r--r--plugins/Weather/src/weather_conv.cpp10
-rw-r--r--plugins/Weather/src/weather_ini.cpp2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp8
-rw-r--r--plugins/Weather/src/weather_opt.cpp14
-rw-r--r--plugins/Weather/src/weather_userinfo.cpp5
6 files changed, 22 insertions, 23 deletions
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp
index 188bd35fe3..bb0e86e011 100644
--- a/plugins/Weather/src/weather.cpp
+++ b/plugins/Weather/src/weather.cpp
@@ -226,12 +226,12 @@ extern "C" int __declspec(dllexport) Load(void)
InitServices();
// add sound event
- SkinAddNewSoundExT("weatherupdated", _T(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
- SkinAddNewSoundExT("weatheralert", _T(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
+ SkinAddNewSoundExT("weatherupdated", _A2W(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
+ SkinAddNewSoundExT("weatheralert", _A2W(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
// window needed for popup commands
wchar_t SvcFunc[100];
- mir_sntprintf(SvcFunc, L"%s__PopupWindow", _T(WEATHERPROTONAME));
+ mir_sntprintf(SvcFunc, L"%s__PopupWindow", _A2W(WEATHERPROTONAME));
hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp
index 31b0e1b93a..44805cc451 100644
--- a/plugins/Weather/src/weather_conv.cpp
+++ b/plugins/Weather/src/weather_conv.cpp
@@ -96,7 +96,7 @@ void GetTemp(wchar_t *tempchar, wchar_t *unit, wchar_t* str)
}
// convert the string to an integer
- temp = _ttof(tempchar);
+ temp = _wtof(tempchar);
// convert all to F first
if (!mir_tstrcmpi(unit, L"C")) temp = (temp * 9 / 5) + 32;
@@ -135,7 +135,7 @@ void GetPressure(wchar_t *tempchar, wchar_t *unit, wchar_t* str)
// convert the string to a floating point number (always positive)
// if it end up with 0, then it's not a number, return the original string and quit
- output = _ttof(tempchar);
+ output = _wtof(tempchar);
if (output == 0) {
mir_tstrcpy(str, tempchar);
return;
@@ -194,7 +194,7 @@ void GetSpeed(wchar_t *tempchar, wchar_t *unit, wchar_t *str)
// convert the string into an integer (always positive)
// if the result is 0, then the string is not a number, return _T(""
- tempunit = _ttof(tempchar);
+ tempunit = _wtof(tempchar);
if (tempunit == 0 && tempchar[0] != '0')
return;
@@ -241,7 +241,7 @@ void GetDist(wchar_t *tempchar, wchar_t *unit, wchar_t *str)
// convert the string to a floating point number (always positive)
// if it end up with 0, then it's not a number, return the original string and quit
- output = _ttof(tempchar);
+ output = _wtof(tempchar);
if (output == 0) {
mir_tstrcpy(str, tempchar);
return;
@@ -281,7 +281,7 @@ void GetElev(wchar_t *tempchar, wchar_t *unit, wchar_t *str)
// convert the string to a floating point number (always positive)
// if it end up with 0, then it's not a number, return the original string and quit
- output = _ttof(tempchar);
+ output = _wtof(tempchar);
if (output == 0) {
mir_tstrcpy(str, tempchar);
return;
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp
index f3af9cb3f6..efa3fb7af2 100644
--- a/plugins/Weather/src/weather_ini.cpp
+++ b/plugins/Weather/src/weather_ini.cpp
@@ -247,7 +247,7 @@ static void LoadStationData(wchar_t *pszFile, wchar_t *pszShortFile, WIDATA *Dat
Data->Enabled = FALSE;
// open the ini file
- FILE *pfile = _tfsopen(pszFile, L"rt", _SH_DENYWR);
+ FILE *pfile = _wfsopen(pszFile, L"rt", _SH_DENYWR);
if (pfile != NULL) {
char Line[4096];
fgets(Line, _countof(Line), pfile);
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index fdd83c3d94..1dd09bf864 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -158,7 +158,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
{
FontIDT fntid = { 0 };
- mir_tstrcpy(fntid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fntid.group, _A2W(WEATHERPROTONAME));
mir_tstrcpy(fntid.name, LPGENW("Frame Font"));
fntc = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt);
@@ -329,7 +329,7 @@ void InitMwin(void)
mir_strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
mir_strcpy(colourid.setting, "ColorMwinFrame");
mir_tstrcpy(colourid.name, LPGENW("Frame Background"));
- mir_tstrcpy(colourid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(colourid.group, _A2W(WEATHERPROTONAME));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
ColourRegisterT(&colourid);
@@ -337,7 +337,7 @@ void InitMwin(void)
fontid.cbSize = sizeof(FontIDT);
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
mir_strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
- mir_tstrcpy(fontid.group, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.group, _A2W(WEATHERPROTONAME));
mir_tstrcpy(fontid.name, LPGENW("Frame Font"));
mir_strcpy(fontid.prefix, "fnt0");
@@ -347,7 +347,7 @@ void InitMwin(void)
fontid.deffontsettings.charset = DEFAULT_CHARSET;
mir_tstrcpy(fontid.deffontsettings.szFace, L"Verdana");
- mir_tstrcpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
+ mir_tstrcpy(fontid.backgroundGroup, _A2W(WEATHERPROTONAME));
mir_tstrcpy(fontid.backgroundName, LPGENW("Frame Background"));
FontRegisterT(&fontid);
diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp
index ea567ff901..6f866cd99a 100644
--- a/plugins/Weather/src/weather_opt.cpp
+++ b/plugins/Weather/src/weather_opt.cpp
@@ -577,25 +577,25 @@ int OptInit(WPARAM wParam, LPARAM)
odp.position = 95600;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pfnDlgProc = OptionsProc;
- odp.pwszGroup = LPGENW("Network");
- odp.pwszTitle = _T(WEATHERPROTOTEXT);
- odp.pwszTab = LPGENW("General");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.pszGroup = LPGEN("Network");
+ odp.pszTitle = WEATHERPROTOTEXT;
+ odp.pszTab = LPGEN("General");
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
// text options
odp.pszTemplate = MAKEINTRESOURCEA(IDD_TEXTOPT);
odp.pfnDlgProc = DlgProcText;
- odp.pwszTab = LPGENW("Display");
+ odp.pszTab = LPGEN("Display");
Options_AddPage(wParam, &odp);
// if popup service exists, load the weather popup options
if ((ServiceExists(MS_POPUP_ADDPOPUPT))) {
odp.position = 100000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP);
- odp.pwszGroup = LPGENW("Popups");
+ odp.pszGroup = LPGEN("Popups");
odp.groupPosition = 910000000;
- odp.pwszTab = NULL;
+ odp.pszTab = NULL;
odp.pfnDlgProc = DlgPopupOpts;
Options_AddPage(wParam, &odp);
}
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp
index b4adc2bf28..6eb376998d 100644
--- a/plugins/Weather/src/weather_userinfo.cpp
+++ b/plugins/Weather/src/weather_userinfo.cpp
@@ -316,12 +316,11 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam)
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
odp.position = 100000000;
- odp.pwszTitle = _T(WEATHERPROTONAME);
+ odp.pszTitle = WEATHERPROTONAME;
if (lParam == 0) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO);
odp.pfnDlgProc = DlgProcINIPage;
- odp.flags = ODPF_TCHAR;
UserInfo_AddPage(wParam, &odp);
}
else {
@@ -330,7 +329,7 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam)
// register the contact info page
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
odp.pfnDlgProc = DlgProcUIPage;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS;
UserInfo_AddPage(wParam, &odp);
}
}