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/TabSRMM | |
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/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/srmm.cpp | 2 |
5 files changed, 6 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index bd339bb0eb..13e8eaa563 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1053,10 +1053,10 @@ void TSAPI DM_UpdateLastMessage(const TWindowData *dat) mir_sntprintf(szBuf, SIZEOF(szBuf), _T("UID: %s"), dat->cache->getUIN()); else if (dat->lastMessage) { TCHAR date[64], time[64]; - tmi.printTimeStamp(NULL, dat->lastMessage, _T("d"), date, SIZEOF(date), 0); + TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("d"), date, SIZEOF(date), 0); if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR && mir_tstrlen(date) > 6) date[mir_tstrlen(date) - 5] = 0; - tmi.printTimeStamp(NULL, dat->lastMessage, _T("t"), time, SIZEOF(time), 0); + TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("t"), time, SIZEOF(time), 0); mir_sntprintf(szBuf, SIZEOF(szBuf), TranslateT("Last received: %s at %s"), date, time); } else szBuf[0] = 0; diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 345b527901..747e5682bf 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -543,7 +543,7 @@ void CInfoPanel::RenderIPStatus(const HDC hdc, RECT& rcItem) TCHAR szResult[80]; szResult[0] = 0;
if (m_dat->hTimeZone) {
- tmi.printDateTime(m_dat->hTimeZone, _T("t"), szResult, SIZEOF(szResult), 0);
+ TimeZone_PrintDateTime(m_dat->hTimeZone, _T("t"), szResult, SIZEOF(szResult), 0);
GetTextExtentPoint32(hdc, szResult, (int)mir_tstrlen(szResult), &sTime);
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 62c18f8d36..8da7eac733 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1383,7 +1383,7 @@ void TSAPI LoadOwnAvatar(TWindowData *dat) void TSAPI LoadTimeZone(TWindowData *dat)
{
if (dat)
- dat->hTimeZone = tmi.createByContact(dat->hContact, 0, TZF_KNOWNONLY);
+ dat->hTimeZone = TimeZone_CreateByContact(dat->hContact, 0, TZF_KNOWNONLY);
}
// paste contents of the clipboard into the message input area and send it immediately
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index dc39ec3eed..a04ee564cd 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -367,7 +367,7 @@ static TCHAR* Template_MakeRelativeDate(HANDLE hTimeZone, time_t check, TCHAR co else
szFormat = _T("d");
- tmi.printTimeStamp(hTimeZone, check, szFormat, szResult, SIZEOF(szResult), 0);
+ TimeZone_PrintTimeStamp(hTimeZone, check, szFormat, szResult, SIZEOF(szResult), 0);
}
return szResult;
}
@@ -496,7 +496,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, // templated code starts here
if (dwEffectiveFlags & MWF_LOG_SHOWTIME) {
hTimeZone = ((dat->dwFlags & MWF_LOG_LOCALTIME) && !isSent) ? dat->hTimeZone : NULL;
- time_t local_time = tmi.timeStampToTimeZoneTimeStamp(hTimeZone, dbei.timestamp);
+ time_t local_time = TimeZone_UtcToLocal(hTimeZone, dbei.timestamp);
event_time = *gmtime(&local_time);
}
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp index dc4c16ab31..cd460b4856 100644 --- a/plugins/TabSRMM/src/srmm.cpp +++ b/plugins/TabSRMM/src/srmm.cpp @@ -36,7 +36,6 @@ LOGFONT lfDefault = { 0 }; */ int hLangpack; -TIME_API tmi = { 0 }; CLIST_INTERFACE *pcli; PLUGININFOEX pluginInfo = { @@ -74,7 +73,6 @@ extern "C" int __declspec(dllexport) Load(void) } mir_getCLI(); - mir_getTMI(&tmi); mir_getLP(&pluginInfo); SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lfDefault), &lfDefault, FALSE); |