From b3783bb50a312fa59d302aeede929377c18a6ec1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 16 Feb 2014 18:07:34 +0000 Subject: timezone api extended to support global settings git-svn-id: http://svn.miranda-ng.org/main/trunk@8139 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_cachefuncs.cpp | 2 +- plugins/Clist_nicer/src/clcitems.cpp | 5 +++-- plugins/TabSRMM/src/msgdlgutils.cpp | 2 +- plugins/UserInfoEx/src/ctrl_tzcombo.cpp | 4 ++-- plugins/UserInfoEx/src/svc_contactinfo.cpp | 2 +- plugins/UserInfoEx/src/svc_timezone.cpp | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 44415f83b4..8c9e5b4137 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -62,7 +62,7 @@ void Cache_GetTimezone(ClcData *dat, MCONTACT hContact) if (dat && dat->hWnd == pcli->hwndContactTree) { DWORD flags = dat->contact_time_show_only_if_different ? TZF_DIFONLY : 0; - pdnce->hTimeZone = tmi.createByContact ? tmi.createByContact(hContact, flags) : 0; + pdnce->hTimeZone = tmi.createByContact(hContact, 0, flags); } } diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 421e588307..fc994cb0bc 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -325,8 +325,9 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c, const char *szProto) { DWORD flags = 0; - if (cfg::dat.bShowLocalTimeSelective) flags |= TZF_DIFONLY; - c->hTimeZone = tmi.createByContact(hContact, flags); + if (cfg::dat.bShowLocalTimeSelective) + flags |= TZF_DIFONLY; + c->hTimeZone = tmi.createByContact(hContact, 0, flags); } void ReloadExtraInfo(MCONTACT hContact) diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 63dd0cddd6..06ad8cb2cc 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1629,7 +1629,7 @@ void TSAPI LoadOwnAvatar(TWindowData *dat) void TSAPI LoadTimeZone(TWindowData *dat) { if (dat) - dat->hTimeZone = tmi.createByContact ? tmi.createByContact(dat->hContact, TZF_KNOWNONLY) : 0; + dat->hTimeZone = tmi.createByContact(dat->hContact, 0, TZF_KNOWNONLY); } /* diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp index dfa4084a83..9b4ffac422 100644 --- a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp +++ b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp @@ -59,7 +59,7 @@ CBaseCtrl* CTzCombo::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting) //set the adress of our timezone handle as itemdata //caller can obtain the handle htz to extract all relevant information ctrl->_curSel = 0; - tmi.prepareList(NULL, hCtrl, TZF_PLF_CB); + tmi.prepareList(NULL, NULL, hCtrl, TZF_PLF_CB); } //fallback use old UIEX method else { @@ -206,7 +206,7 @@ void CTzCombo::OnApply(MCONTACT hContact, LPCSTR pszProto) if (_Flags.B.hasCustom || !hContact) { //use new core tz interface if (tmi.storeListResults) { - tmi.storeListResults(hContact, _hwnd, TZF_PLF_CB); + tmi.storeListResults(hContact, NULL, _hwnd, TZF_PLF_CB); if (!hContact) { _Flags.B.hasCustom = 0; _Flags.B.hasProto = 1; diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index 7e98c90852..ed30f18c8d 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp @@ -565,7 +565,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam) case CNF_TIMEZONE: //use new core tz interface if (tmi.prepareList) { - HANDLE hTz = tmi.createByContact(ci->hContact, TZF_KNOWNONLY); + HANDLE hTz = tmi.createByContact(ci->hContact, 0, TZF_KNOWNONLY); if (hTz) { LPTIME_ZONE_INFORMATION tzi = tmi.getTzi(hTz); int offset = tzi->Bias + tzi->StandardBias; diff --git a/plugins/UserInfoEx/src/svc_timezone.cpp b/plugins/UserInfoEx/src/svc_timezone.cpp index e1027f4b6a..8318e911bc 100644 --- a/plugins/UserInfoEx/src/svc_timezone.cpp +++ b/plugins/UserInfoEx/src/svc_timezone.cpp @@ -41,7 +41,7 @@ INT_PTR GetContactTimeZoneInformation(WPARAM wParam,LPARAM lParam) { //use new core tz interface LPTIME_ZONE_INFORMATION pTimeZoneInformation = (LPTIME_ZONE_INFORMATION)lParam; - (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact(wParam, 0)); + (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact(wParam, 0, 0)); return (pTimeZoneInformation == NULL); } -- cgit v1.2.3