summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 18:18:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 18:18:13 +0000
commitbf37d6655a27cc3ea5af5412c9717596c9d1c30f (patch)
tree9a537b8cd5cd85b27b5a296f77a972a0ae0c3863 /src/core
parentd55f17dea8734cfb458fd8fcbac684d141b181af (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 'src/core')
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp2
-rw-r--r--src/core/stdfile/src/main.cpp2
-rw-r--r--src/core/stdhelp/src/main.cpp2
-rw-r--r--src/core/stdidle/src/main.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp10
-rw-r--r--src/core/stdmsg/src/msglog.cpp2
-rw-r--r--src/core/stdmsg/src/srmm.cpp3
-rw-r--r--src/core/stduihist/src/history.cpp2
-rw-r--r--src/core/stduihist/src/main.cpp2
-rw-r--r--src/core/stdurl/main.cpp2
-rw-r--r--src/core/stdurl/urldialogs.cpp2
-rw-r--r--src/core/stduserinfo/src/main.cpp2
-rw-r--r--src/core/stduserinfo/src/stdinfo.cpp6
13 files changed, 12 insertions, 27 deletions
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index a092b1449f..16edf1c4a0 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -254,7 +254,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
else DestroyWindow(hwndDlg);
TCHAR datetimestr[64];
- tmi.printTimeStamp(NULL, dbei.timestamp, _T("t d"), datetimestr, SIZEOF(datetimestr), 0);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("t d"), datetimestr, SIZEOF(datetimestr), 0);
SetDlgItemText(hwndDlg, IDC_DATE, datetimestr);
char* szProto = GetContactProto(dat->hContact);
diff --git a/src/core/stdfile/src/main.cpp b/src/core/stdfile/src/main.cpp
index cd849b43b6..b49d593f10 100644
--- a/src/core/stdfile/src/main.cpp
+++ b/src/core/stdfile/src/main.cpp
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadSendRecvFileModule(void);
CLIST_INTERFACE* pcli;
-TIME_API tmi;
HINSTANCE hInst;
int hLangpack;
@@ -60,7 +59,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRFILE
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- mir_getTMI(&tmi);
mir_getCLI();
if ( IsWinVer7Plus())
diff --git a/src/core/stdhelp/src/main.cpp b/src/core/stdhelp/src/main.cpp
index bd42b15c6d..d1a4729250 100644
--- a/src/core/stdhelp/src/main.cpp
+++ b/src/core/stdhelp/src/main.cpp
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadHelpModule(void);
CLIST_INTERFACE* pcli;
-TIME_API tmi;
HINSTANCE hInst;
int hLangpack;
@@ -58,7 +57,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHELP
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- mir_getTMI(&tmi);
mir_getCLI();
LoadHelpModule();
diff --git a/src/core/stdidle/src/main.cpp b/src/core/stdidle/src/main.cpp
index 6c06ad4be3..2f21ff9097 100644
--- a/src/core/stdidle/src/main.cpp
+++ b/src/core/stdidle/src/main.cpp
@@ -25,7 +25,6 @@ int LoadIdleModule(void);
void UnloadIdleModule(void);
CLIST_INTERFACE* pcli;
-TIME_API tmi;
HINSTANCE hInst;
int hLangpack;
@@ -59,7 +58,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_IDLE,
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- mir_getTMI(&tmi);
mir_getCLI();
LoadIdleModule();
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index b3a9bc050a..c4ca134216 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -136,7 +136,7 @@ static void ShowTime(SrmmWindowData *dat)
TCHAR buf[32];
unsigned i = (g_dat.flags & SMF_SHOWREADCHAR) ? 2 : 1;
- tmi.printDateTime(dat->hTimeZone, _T("t"), buf, SIZEOF(buf), 0);
+ TimeZone_PrintDateTime(dat->hTimeZone, _T("t"), buf, SIZEOF(buf), 0);
SendMessage(dat->hwndStatus, SB_SETTEXT, i, (LPARAM)buf);
dat->wMinute = st.wMinute;
}
@@ -618,7 +618,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dat->hContact = newData->hContact;
dat->bIsMeta = db_mc_isMeta(dat->hContact) != 0;
- dat->hTimeZone = tmi.createByContact(dat->hContact, 0, TZF_KNOWNONLY);
+ dat->hTimeZone = TimeZone_CreateByContact(dat->hContact, 0, TZF_KNOWNONLY);
dat->wMinute = 61;
NotifyLocalWinEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_OPENING);
@@ -957,8 +957,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (dat->lastMessage) {
TCHAR date[64], time[64], fmt[128];
- tmi.printTimeStamp(NULL, dat->lastMessage, _T("d"), date, SIZEOF(date), 0);
- tmi.printTimeStamp(NULL, dat->lastMessage, _T("t"), time, SIZEOF(time), 0);
+ TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("d"), date, SIZEOF(date), 0);
+ TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("t"), time, SIZEOF(time), 0);
mir_sntprintf(fmt, SIZEOF(fmt), TranslateT("Last message received on %s at %s."), date, time);
SendMessage(dat->hwndStatus, SB_SETTEXT, 0, (LPARAM)fmt);
}
@@ -1080,7 +1080,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
break;
case DM_NEWTIMEZONE:
- dat->hTimeZone = tmi.createByContact(dat->hContact, 0, TZF_KNOWNONLY);
+ dat->hTimeZone = TimeZone_CreateByContact(dat->hContact, 0, TZF_KNOWNONLY);
dat->wMinute = 61;
SendMessage(hwndDlg, WM_SIZE, 0, 0);
break;
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index 22fd62bf67..aa214357fc 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -293,7 +293,7 @@ static char *CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, MEVENT
else
szFormat = g_dat.flags & SMF_SHOWDATE ? _T("d t") : _T("t");
- tmi.printTimeStamp(NULL, dbei.timestamp, szFormat, str, SIZEOF(str), 0);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, szFormat, str, SIZEOF(str), 0);
AppendToBuffer(buffer, bufferEnd, bufferAlloced, " %s ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME));
AppendToBufferWithRTF(buffer, bufferEnd, bufferAlloced, str);
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp
index b629c3598f..8136de9f46 100644
--- a/src/core/stdmsg/src/srmm.cpp
+++ b/src/core/stdmsg/src/srmm.cpp
@@ -28,8 +28,6 @@ CLIST_INTERFACE *pcli;
HINSTANCE g_hInst;
int hLangpack;
-TIME_API tmi;
-
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -58,7 +56,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SRMM, M
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
mir_getCLI();
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp
index 0297875807..0748d76e54 100644
--- a/src/core/stduihist/src/history.cpp
+++ b/src/core/stduihist/src/history.cpp
@@ -164,7 +164,7 @@ static void FillHistoryThread(void* param)
TCHAR str[200], eventText[256], strdatetime[64];
GetObjectSummary(&dbei, str, SIZEOF(str));
if (str[0]) {
- tmi.printTimeStamp(NULL, dbei.timestamp, _T("d t"), strdatetime, SIZEOF(strdatetime), 0);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("d t"), strdatetime, SIZEOF(strdatetime), 0);
mir_sntprintf(eventText, SIZEOF(eventText), _T("%s: %s"), strdatetime, str);
i = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)eventText);
SendMessage(hwndList, LB_SETITEMDATA, i, (LPARAM)hDbEvent);
diff --git a/src/core/stduihist/src/main.cpp b/src/core/stduihist/src/main.cpp
index 76562307c3..dfb8a0d36a 100644
--- a/src/core/stduihist/src/main.cpp
+++ b/src/core/stduihist/src/main.cpp
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadHistoryModule(void);
CLIST_INTERFACE* pcli;
-TIME_API tmi;
HINSTANCE hInst;
int hLangpack;
@@ -58,7 +57,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHIST
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- mir_getTMI(&tmi);
mir_getCLI();
LoadHistoryModule();
diff --git a/src/core/stdurl/main.cpp b/src/core/stdurl/main.cpp
index 16caf83712..4351ea95c3 100644
--- a/src/core/stdurl/main.cpp
+++ b/src/core/stdurl/main.cpp
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadSendRecvUrlModule(void);
CLIST_INTERFACE* pcli;
-TIME_API tmi;
HINSTANCE hInst;
int hLangpack;
@@ -58,7 +57,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRURL,
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- mir_getTMI(&tmi);
mir_getCLI();
LoadSendRecvUrlModule();
diff --git a/src/core/stdurl/urldialogs.cpp b/src/core/stdurl/urldialogs.cpp
index f65bf202b9..157725362b 100644
--- a/src/core/stdurl/urldialogs.cpp
+++ b/src/core/stdurl/urldialogs.cpp
@@ -114,7 +114,7 @@ INT_PTR CALLBACK DlgProcUrlRecv(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETARROW, 1, 0);
TCHAR str[128];
- tmi.printTimeStamp(NULL, dbei.timestamp, _T("t d"), str, SIZEOF(str), 0);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("t d"), str, SIZEOF(str), 0);
SetDlgItemText(hwndDlg, IDC_DATE, str);
}
diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp
index ea49811c26..6289d9b209 100644
--- a/src/core/stduserinfo/src/main.cpp
+++ b/src/core/stduserinfo/src/main.cpp
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadUserInfoModule(void);
CLIST_INTERFACE* pcli;
-TIME_API tmi;
HINSTANCE hInst;
int hLangpack;
@@ -58,7 +57,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_UIUSERI
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- mir_getTMI(&tmi);
mir_getCLI();
LoadUserInfoModule();
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp
index 197d24440c..3ad3f9432c 100644
--- a/src/core/stduserinfo/src/stdinfo.cpp
+++ b/src/core/stduserinfo/src/stdinfo.cpp
@@ -241,7 +241,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
TranslateDialogDefault(hwndDlg);
SetTimer(hwndDlg, 1, 1000, NULL);
- tmi.prepareList(lParam, NULL, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
+ TimeZone_PrepareList(lParam, NULL, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
SendMessage(hwndDlg, WM_TIMER, 0, 0);
break;
@@ -250,7 +250,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (hContact != NULL) {
TCHAR szTime[80];
- if (tmi.printDateTimeByContact(hContact, _T("s"), szTime, SIZEOF(szTime), TZF_KNOWNONLY)) {
+ if (printDateTimeByContact(hContact, _T("s"), szTime, SIZEOF(szTime), TZF_KNOWNONLY)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_LOCALTIME), FALSE);
SetDlgItemText(hwndDlg, IDC_LOCALTIME, TranslateT("<not specified>"));
}
@@ -297,7 +297,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- tmi.storeListResults(hContact, NULL, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
+ TimeZone_StoreListResult(hContact, NULL, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
}
}
break;