From bf37d6655a27cc3ea5af5412c9717596c9d1c30f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 18:18:13 +0000 Subject: timezone api migrated to mir_core git-svn-id: http://svn.miranda-ng.org/main/trunk@14266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/svc_contactinfo.cpp | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'plugins/UserInfoEx/src/svc_contactinfo.cpp') diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index 3c53c8e23e..662d300256 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp @@ -563,11 +563,10 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam) break; case CNF_TIMEZONE: - //use new core tz interface - if (tmi.prepareList) { - HANDLE hTz = tmi.createByContact(ci->hContact, 0, TZF_KNOWNONLY); + { + HANDLE hTz = TimeZone_CreateByContact(ci->hContact, 0, TZF_KNOWNONLY); if (hTz) { - LPTIME_ZONE_INFORMATION tzi = tmi.getTzi(hTz); + LPTIME_ZONE_INFORMATION tzi = TimeZone_GetInfo(hTz); int offset = tzi->Bias + tzi->StandardBias; char str[80]; @@ -577,27 +576,9 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam) return 0; } ci->pszVal = NULL; + ci->type = (ci->pszVal != NULL) ? CNFT_ASCIIZ : 0; + result = ci->type == 0; } - //fallback use old UIEX method - else { - CTimeZone* ptz = GetContactTimeZone(ci->hContact, ci->szProto); - if (ptz) { - if (ci->dwFlag & CNF_UNICODE) - ci->pszVal = (LPTSTR)mir_t2u(ptz->ptszDisplay); - else - ci->pszVal = (LPTSTR)mir_t2a(ptz->ptszDisplay); - } - else { - /* If a timezone does not exist in CTzMgr, it is a invalid timezone, - because Windows and CTzMgr know all existing timezones and it - would not be shown anywhere anyway as UserInfoEx displays only - known windows timezones in the details dialog! - */ - ci->pszVal = NULL; - } - } - ci->type = (ci->pszVal != NULL) ? CNFT_ASCIIZ : 0; - result = ci->type == 0; break; // -- cgit v1.2.3