diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 18:18:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 18:18:13 +0000 |
commit | bf37d6655a27cc3ea5af5412c9717596c9d1c30f (patch) | |
tree | 9a537b8cd5cd85b27b5a296f77a972a0ae0c3863 /plugins/UserInfoEx/src/svc_contactinfo.cpp | |
parent | d55f17dea8734cfb458fd8fcbac684d141b181af (diff) |
timezone api migrated to mir_core
git-svn-id: http://svn.miranda-ng.org/main/trunk@14266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/svc_contactinfo.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/svc_contactinfo.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
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;
//
|