summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Weather/weather.cpp1
-rw-r--r--protocols/Weather/weather.h4
-rw-r--r--protocols/Weather/weather_conv.cpp18
-rw-r--r--protocols/Weather/weather_userinfo.cpp12
4 files changed, 1 insertions, 34 deletions
diff --git a/protocols/Weather/weather.cpp b/protocols/Weather/weather.cpp
index b716aefa63..c0dc3c3373 100644
--- a/protocols/Weather/weather.cpp
+++ b/protocols/Weather/weather.cpp
@@ -238,7 +238,6 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
// initialize global variables
InitVar();
- InitUniConv();
// load options and set defaults
LoadOptions();
diff --git a/protocols/Weather/weather.h b/protocols/Weather/weather.h
index 047f408dd5..aee843f164 100644
--- a/protocols/Weather/weather.h
+++ b/protocols/Weather/weather.h
@@ -397,10 +397,6 @@ BOOL IsMyContact(HANDLE hContact);
// functions in weather_conv.c
BOOL is_number(char *s);
-extern unsigned lpcp;
-void InitUniConv(void);
-LPWSTR ConvToUnicode(LPCSTR str2);
-
void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR *str);
void GetSpeed(TCHAR *tempchar, TCHAR *unit, TCHAR *str);
void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR *str);
diff --git a/protocols/Weather/weather_conv.cpp b/protocols/Weather/weather_conv.cpp
index 1cf003e8e2..2bad50f0fa 100644
--- a/protocols/Weather/weather_conv.cpp
+++ b/protocols/Weather/weather_conv.cpp
@@ -642,21 +642,3 @@ TCHAR *GetError(int code)
}
return str;
}
-
-LPWSTR ConvToUnicode(LPCSTR str2)
-{
- const size_t nLength = MultiByteToWideChar(lpcp, 0, str2, -1, NULL, 0);
- LPWSTR res = ( LPWSTR )mir_alloc(sizeof(WCHAR)*nLength);
- MultiByteToWideChar(lpcp, 0, str2, -1, res, (int)nLength);
- return res;
-}
-
-unsigned lpcp;
-
-void InitUniConv(void)
-{
- lpcp = (unsigned)CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
- if (lpcp == CALLSERVICE_NOTFOUND || lpcp == GetUserDefaultLangID())
- lpcp = CP_ACP;
-}
-
diff --git a/protocols/Weather/weather_userinfo.cpp b/protocols/Weather/weather_userinfo.cpp
index ba9ee83570..c0b196bf4d 100644
--- a/protocols/Weather/weather_userinfo.cpp
+++ b/protocols/Weather/weather_userinfo.cpp
@@ -363,17 +363,7 @@ void LoadBriefInfoText(HWND hwndDlg, HANDLE hContact)
else
// set the display text and show the message box
GetDisplay(&winfo, opt.bText, str);
-
- if (lpcp != CP_ACP)
- {
- SETTEXTEX textex;
- textex.flags = ST_DEFAULT;
- textex.codepage = lpcp;
-
- SendMessage(GetDlgItem(hwndDlg, IDC_MTEXT), EM_SETTEXTEX, (WPARAM)&textex, (LPARAM)str);
- }
- else
- SetDlgItemText(hwndDlg, IDC_MTEXT, str);
+ SetDlgItemText(hwndDlg, IDC_MTEXT, str);
GetDisplay(&winfo, opt.bTitle, str);
SetWindowText(hwndDlg, str);