From 92ae1f2aa713c2f6ce28fda42d35e0b721e6db6e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Jun 2012 13:25:24 +0000 Subject: fix for station search in Unicode in Weather git-svn-id: http://svn.miranda-ng.org/main/trunk@509 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Weather/weather_addstn.cpp | 15 +++++++-------- protocols/Weather/weather_contacts.cpp | 6 +++--- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'protocols/Weather') diff --git a/protocols/Weather/weather_addstn.cpp b/protocols/Weather/weather_addstn.cpp index 86c58d5a9b..363dd8240d 100644 --- a/protocols/Weather/weather_addstn.cpp +++ b/protocols/Weather/weather_addstn.cpp @@ -251,8 +251,8 @@ int IDSearchProc(TCHAR *sID, const int searchId, WIIDSEARCH *sData, TCHAR *svc, mir_sntprintf(newID, SIZEOF(newID), _T("%s/%s"), svc, sID); // set the search result and broadcast it - PROTOSEARCHRESULT psr = {0}; - psr.cbSize = sizeof(psr); + PROTOSEARCHRESULT psr = { sizeof(psr) }; + psr.flags = PSR_TCHAR; psr.nick = str; psr.firstName = _T(" "); psr.lastName = svcname; @@ -282,8 +282,8 @@ int IDSearch(TCHAR *sID, const int searchId) // if the station ID is #, return a dummy result and quit the funciton else { // return an empty contact on "#" - PROTOSEARCHRESULT psr = {0}; - psr.cbSize = sizeof(psr); + PROTOSEARCHRESULT psr = { sizeof(psr) }; + psr.flags = PSR_TCHAR; psr.nick = TranslateT(""); // to be entered psr.firstName = _T(" "); psr.lastName = _T(""); @@ -343,8 +343,8 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * _tcscpy(Name, name); // set the data and broadcast it - PROTOSEARCHRESULT psr = { 0 }; - psr.cbSize = sizeof(psr); + PROTOSEARCHRESULT psr = { sizeof(psr) }; + psr.flags = PSR_TCHAR; psr.nick = Name; psr.firstName = _T(" "); psr.lastName = svcname; @@ -376,8 +376,7 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * if (Name[0] == 0) _tcscpy(Name, name); - PROTOSEARCHRESULT psr = { 0 }; - psr.cbSize = sizeof(psr); + PROTOSEARCHRESULT psr = { sizeof(psr) }; psr.flags = PSR_TCHAR; psr.nick = Name; psr.firstName = _T(""); diff --git a/protocols/Weather/weather_contacts.cpp b/protocols/Weather/weather_contacts.cpp index 4bf81197d3..fe48b1926d 100644 --- a/protocols/Weather/weather_contacts.cpp +++ b/protocols/Weather/weather_contacts.cpp @@ -36,7 +36,7 @@ static void OpenUrl( TCHAR* format, TCHAR* id ) mir_free( szUrl ); } -// == == == == == == BASIC CONTACTS FUNCTIONS AND LINKS == == == == == == +//============ BASIC CONTACTS FUNCTIONS AND LINKS ============ // view weather log for the contact // wParam = current contact @@ -94,7 +94,7 @@ INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam) return 0; } -// == == == == == == EDIT SETTINGS == == == == == == +//============ EDIT SETTINGS ============ // show edit settings dialog // wParam = current contact @@ -426,7 +426,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa return FALSE; } -// == == == == == == CONTACT DELETION == == == == == == +//============ CONTACT DELETION ============ // when a contact is deleted, make sure some other contact take over the default station // wParam = deleted contact -- cgit v1.2.3