summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-26 16:50:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-26 16:50:14 +0000
commitc992cb2fdc11f1cac4bc5cbce26e8e2bb3b57da0 (patch)
tree697bdbf38a8a1f6b828a8bfbd08a478e19a82c6b /plugins/TabSRMM/src
parentf616294363c642d138f9dc0ef6eceae639e2434c (diff)
- microkernel addded;
- version bumped to 0.92.2 git-svn-id: http://svn.miranda-ng.org/main/trunk@641 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp32
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp42
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp8
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp6
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp8
-rw-r--r--plugins/TabSRMM/src/srmm.cpp2
-rw-r--r--plugins/TabSRMM/src/themeio.cpp12
-rw-r--r--plugins/TabSRMM/src/utils.cpp2
10 files changed, 37 insertions, 79 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 2f2c59ad6e..8822e094fd 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -41,7 +41,7 @@ static void li_ListDestruct(SortedList *pList, ItemDestuctor pItemDestructor)
int i = 0;
if (!pList) return;
for (i = 0; i < pList->realCount; i++) pItemDestructor(pList->items[i]);
- li.List_Destroy(pList);
+ List_Destroy(pList);
mir_free(pList);
}
@@ -49,13 +49,13 @@ static void li_RemoveDestruct(SortedList *pList, int index, ItemDestuctor pItemD
{
if (index >= 0 && index < pList->realCount) {
pItemDestructor(pList->items[index]);
- li.List_Remove(pList, index);
+ List_Remove(pList, index);
}
}
static void li_RemovePtrDestruct(SortedList *pList, void * ptr, ItemDestuctor pItemDestructor)
{
- if (li.List_RemovePtr(pList, ptr))
+ if (List_RemovePtr(pList, ptr))
pItemDestructor(ptr);
}
@@ -137,8 +137,8 @@ static int Hlp_RemoveDatabaseSettings(HANDLE hContact, char *szModule, char *szP
void CB_InitCustomButtons()
{
- LButtonsList = li.List_Create(0, 1);
- RButtonsList = li.List_Create(0, 1);
+ LButtonsList = List_Create(0, 1);
+ RButtonsList = List_Create(0, 1);
InitializeCriticalSection(&ToolBarCS);
dwSepCount = M->GetDword("TabSRMM_Toolbar", "SeparatorsCount", 0);
@@ -228,9 +228,9 @@ void CB_ReInitCustomButtons()
cbd->opFlags ^= BBSF_NTBSWAPED;
if (!(cbd->opFlags&BBSF_NTBDESTRUCT))
- li.List_InsertPtr(RButtonsList, cbd);
+ List_InsertPtr(RButtonsList, cbd);
- li.List_Remove(LButtonsList, i);
+ List_Remove(LButtonsList, i);
i--;
}
}
@@ -241,9 +241,9 @@ void CB_ReInitCustomButtons()
cbd->opFlags ^= BBSF_NTBSWAPED;
if (!(cbd->opFlags&BBSF_NTBDESTRUCT))
- li.List_InsertPtr(LButtonsList, cbd);
+ List_InsertPtr(LButtonsList, cbd);
- li.List_Remove(RButtonsList, i);
+ List_Remove(RButtonsList, i);
i--;
}
}
@@ -257,8 +257,8 @@ void CB_HardReInit()
EnterCriticalSection(&ToolBarCS);
li_ListDestruct(LButtonsList, listdestructor);
li_ListDestruct(RButtonsList, listdestructor);
- LButtonsList = li.List_Create(0, 1);
- RButtonsList = li.List_Create(0, 1);
+ LButtonsList = List_Create(0, 1);
+ RButtonsList = List_Create(0, 1);
LeaveCriticalSection(&ToolBarCS);
LastCID = 4000;
dwSepCount = 0;
@@ -313,9 +313,9 @@ static INT_PTR CB_AddButton(WPARAM wParam, LPARAM lParam)
CB_GetButtonSettings(NULL, cbd);
if (cbd->bLSided)
- li.List_InsertPtr(LButtonsList, cbd);
+ List_InsertPtr(LButtonsList, cbd);
else if (cbd->bRSided)
- li.List_InsertPtr(RButtonsList, cbd);
+ List_InsertPtr(RButtonsList, cbd);
else return 1;
if (cbd->dwButtonCID != cbd->dwButtonOrigID)
@@ -415,7 +415,7 @@ static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam)
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
tempCID = cbd->dwButtonCID;
dwFlags = cbd->bLSided ? BBBF_ISLSIDEBUTTON : BBBF_ISRSIDEBUTTON;
- li.List_Remove(LButtonsList, i);
+ List_Remove(LButtonsList, i);
i--;
}
}
@@ -427,7 +427,7 @@ static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam)
if (!strcmp(cbd->pszModuleName, bbdi->pszModuleName) && (cbd->dwButtonOrigID == bbdi->dwButtonID)) {
tempCID = cbd->dwButtonCID;
dwFlags = cbd->bLSided ? BBBF_ISLSIDEBUTTON : BBBF_ISRSIDEBUTTON;
- li.List_Remove(RButtonsList, i);
+ List_Remove(RButtonsList, i);
i--;
}
}
@@ -1420,7 +1420,7 @@ INT_PTR CALLBACK DlgProcToolBar(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
cbd->pszModuleName = "Tabsrmm_sep";
cbd->iButtonWidth = 22;
cbd->opFlags = BBSF_NTBDESTRUCT;
- li.List_InsertPtr(LButtonsList, cbd);
+ List_InsertPtr(LButtonsList, cbd);
tvis.hParent = NULL;
tvis.hInsertAfter = hti;
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index a1c7d1033e..aa242d977c 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -825,7 +825,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
mir_sntprintf(buffer, safe_sizeof(buffer), TranslateT("changed status from %s to %s."), szOldStatus, szNewStatus);
}
- char *szMsg = M->utf8_encodeT(buffer);
+ char *szMsg = mir_utf8encodeT(buffer);
dbei.pBlob = (PBYTE)szMsg;
dbei.cbBlob = lstrlenA(szMsg) + 1;
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index 11ede3460e..95b5375132 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -1389,7 +1389,7 @@ CTip::CTip(const HWND hwndParent, const HANDLE hContact, const TCHAR *pszText, c
m_hContact = hContact;
if(pszText)
- m_pszText = M->utf8_encodeT(pszText);
+ m_pszText = mir_utf8encodeT(pszText);
else
m_pszText = 0;
m_panel = panel;
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index dfd38998fd..dd4999d480 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -182,48 +182,6 @@ INT_PTR CMimAPI::WriteTString(const HANDLE hContact, const char *szModule = 0, c
return(DBWriteContactSettingTString(hContact, szModule, szSetting, str));
}
-void CMimAPI::GetUTFI()
-{
- mir_getUTFI(&m_utfi);
-}
-char *CMimAPI::utf8_decode(char* str, wchar_t** ucs2) const
-{
- return(m_utfi.utf8_decode(str, ucs2));
-}
-char *CMimAPI::utf8_decodecp(char* str, int codepage, wchar_t** ucs2 ) const
-{
- return(m_utfi.utf8_decodecp(str, codepage, ucs2));
-}
-char *CMimAPI::utf8_encode(const char* src) const
-{
- return(m_utfi.utf8_encode(src));
-}
-
-char *CMimAPI::utf8_encodecp(const char* src, int codepage) const
-{
- return(m_utfi.utf8_encodecp(src, codepage));
-}
-
-char *CMimAPI::utf8_encodeW(const wchar_t* src) const
-{
- return(m_utfi.utf8_encodeW(src));
-}
-
-char *CMimAPI::utf8_encodeT(const TCHAR* src) const
-{
- return(m_utfi.utf8_encodeW(src));
-}
-
-TCHAR *CMimAPI::utf8_decodeT(const char* src) const
-{
- return(m_utfi.utf8_decodeW(src));
-}
-
-wchar_t *CMimAPI::utf8_decodeW(const char* str) const
-{
- return(m_utfi.utf8_decodeW(str));
-}
-
/**
* Case insensitive _tcsstr
*
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 9f59917293..5699b03e3c 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -3009,7 +3009,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
streamOut = Message_GetFromStream(GetDlgItem(hwndDlg, IDC_MESSAGE), dat, final_sendformat ? 0 : (CP_UTF8 << 16) | (SF_TEXT | SF_USECODEPAGE));
if (streamOut != NULL) {
- decoded = M->utf8_decodeW(streamOut);
+ decoded = mir_utf8decodeW(streamOut);
if (decoded != NULL) {
char* utfResult = NULL;
if (final_sendformat)
@@ -3022,7 +3022,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
memRequired = bufSize + ((lstrlenW(decoded) + 1) * sizeof(WCHAR));
} else {
flags |= PREF_UTF;
- utfResult = M->utf8_encodeW(decoded);
+ utfResult = mir_utf8encodeT(decoded);
memRequired = (int)(strlen(utfResult)) + 1;
}
@@ -3158,7 +3158,7 @@ quote_from_last:
CallService(MS_DB_EVENT_GET, (WPARAM)hDBEvent, (LPARAM)&dbei);
iSize = (int)(strlen((char *)dbei.pBlob)) + 1;
if (dbei.flags & DBEF_UTF) {
- szConverted = M->utf8_decodeW((char*)szText);
+ szConverted = mir_utf8decodeW((char*)szText);
iAlloced = TRUE;
} else {
if (iSize != dbei.cbBlob)
@@ -3188,7 +3188,7 @@ quote_from_last:
} else {
wchar_t *converted = 0;
szFromStream = Message_GetFromStream(GetDlgItem(hwndDlg, IDC_LOG), dat, SF_TEXT | SF_USECODEPAGE | SFF_SELECTION);
- converted = M->utf8_decodeW(szFromStream);
+ converted = mir_utf8decodeW(szFromStream);
Utils::FilterEventMarkers(converted);
szQuoted = QuoteText(converted, iCharsPerLine, 0);
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)szQuoted);
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index 4490f8b2e6..1cc4a68785 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -367,7 +367,7 @@ int CSendLater::addJob(const char *szSetting, LPARAM lParam)
* construct conventional send buffer
*/
- szAnsi = M->utf8_decodecp(szOrig_Utf, CP_ACP, &szWchar);
+ szAnsi = mir_utf8decodecp(szOrig_Utf, CP_ACP, &szWchar);
iLen = lstrlenA(szAnsi);
if(szWchar)
required = iLen + 1 + ((lstrlenW(szWchar) + 1) * sizeof(wchar_t));
@@ -640,7 +640,7 @@ void CSendLater::qMgrFillList(bool fClear)
lvItem.iSubItem = 1;
::SendMessage(m_hwndList, LVM_SETITEM, 0, reinterpret_cast<LPARAM>(&lvItem));
- TCHAR* msg = M->utf8_decodeT((*it)->sendBuffer);
+ TCHAR* msg = mir_utf8decodeT((*it)->sendBuffer);
TCHAR* preview = Utils::GetPreviewWithEllipsis(msg, 255);
lvItem.pszText = preview;
lvItem.iSubItem = 2;
@@ -919,7 +919,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
job->writeFlags();
break;
case ID_QUEUEMANAGER_COPYMESSAGETOCLIPBOARD: {
- TCHAR *msg = M->utf8_decodeT(job->sendBuffer);
+ TCHAR *msg = mir_utf8decodeT(job->sendBuffer);
Utils::CopyToClipBoard(msg, m_hwndDlg);
mir_free(msg);
break;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index baf1289713..e3d22eb415 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -364,7 +364,7 @@ int SendQueue::getSendLength(const int iEntry, int sendMode)
char *utf8;
iLen = lstrlenA(m_jobs[iEntry].sendBuffer);
wszBuf = (WCHAR *) & m_jobs[iEntry].sendBuffer[iLen + 1];
- utf8 = M->utf8_encodeW(wszBuf);
+ utf8 = mir_utf8encodeT(wszBuf);
m_jobs[iEntry].iSendLength = lstrlenA(utf8);
mir_free(utf8);
return(m_jobs[iEntry].iSendLength);
@@ -901,7 +901,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, HANDLE hContact, boo
else
szNote = TranslateT("The send later feature is not available on this protocol.");
- char *utfText = M->utf8_encodeT(szNote);
+ char *utfText = mir_utf8encodeT(szNote);
DBEVENTINFO dbei;
dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
@@ -943,7 +943,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, HANDLE hContact, boo
mir_sntprintf(tszHeader, safe_sizeof(tszHeader), _T("M%d|"), time(0));
if(job->dwFlags & PREF_UTF || !(job->dwFlags & PREF_UNICODE)) {
- char *utf_header = M->utf8_encodeT(tszHeader);
+ char *utf_header = mir_utf8encodeT(tszHeader);
UINT required = lstrlenA(utf_header) + lstrlenA(job->sendBuffer) + 10;
char *tszMsg = reinterpret_cast<char *>(mir_alloc(required));
@@ -969,7 +969,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, HANDLE hContact, boo
mir_sntprintf(tszMsg, required, _T("%s%s"), wszMsg, tszHeader);
else
mir_sntprintf(tszMsg, required, _T("%s%s"), tszHeader, wszMsg);
- char *utf = M->utf8_encodeT(tszMsg);
+ char *utf = mir_utf8encodeT(tszMsg);
if(fIsSendLater)
DBWriteContactSettingString(hContact ? hContact : job->hOwner, "SendLater", szKeyName, utf);
else
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index ebb6cb002c..7e009b436b 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -164,7 +164,7 @@ int _DebugTraceW(const wchar_t *fmt, ...)
mir_snprintf(szLogFileName, MAX_PATH, "%s\\%s", szDataPath, "tabsrmm_debug.log");
f = fopen(szLogFileName, "a+");
if (f) {
- char *szDebug = M->utf8_encodeW(debug);
+ char *szDebug = mir_utf8encodeT(debug);
fputs(tszTime, f);
fputs(szDebug, f);
fputs("\n", f);
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp
index 2eb29884dd..b5998c2fe9 100644
--- a/plugins/TabSRMM/src/themeio.cpp
+++ b/plugins/TabSRMM/src/themeio.cpp
@@ -234,15 +234,15 @@ void TSAPI WriteThemeToINI(const TCHAR *szIniFilenameT, struct TWindowData *dat)
for (i = 0; i <= TMPL_ERRMSG; i++) {
char *encoded;
if (dat == 0)
- encoded = M->utf8_encodeW(LTR_Active.szTemplates[i]);
+ encoded = mir_utf8encodeT(LTR_Active.szTemplates[i]);
else
- encoded = M->utf8_encodeW(dat->pContainer->ltr_templates->szTemplates[i]);
+ encoded = mir_utf8encodeT(dat->pContainer->ltr_templates->szTemplates[i]);
WritePrivateProfileStringA("Templates", TemplateNames[i], encoded, szIniFilename);
mir_free(encoded);
if (dat == 0)
- encoded = M->utf8_encodeW(RTL_Active.szTemplates[i]);
+ encoded = mir_utf8encodeT(RTL_Active.szTemplates[i]);
else
- encoded = M->utf8_encodeW(dat->pContainer->rtl_templates->szTemplates[i]);
+ encoded = mir_utf8encodeT(dat->pContainer->rtl_templates->szTemplates[i]);
WritePrivateProfileStringA("RTLTemplates", TemplateNames[i], encoded, szIniFilename);
mir_free(encoded);
}
@@ -406,7 +406,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
if (strcmp(szTemplateBuffer, "[undef]")) {
if (dat == 0)
DBWriteContactSettingStringUtf(NULL, TEMPLATES_MODULE, TemplateNames[i], szTemplateBuffer);
- decoded = M->utf8_decodeW(szTemplateBuffer);
+ decoded = mir_utf8decodeW(szTemplateBuffer);
if (dat == 0)
mir_sntprintf(LTR_Active.szTemplates[i], TEMPLATE_LENGTH, L"%s", decoded);
else
@@ -419,7 +419,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in
if (strcmp(szTemplateBuffer, "[undef]")) {
if (dat == 0)
DBWriteContactSettingStringUtf(NULL, RTLTEMPLATES_MODULE, TemplateNames[i], szTemplateBuffer);
- decoded = M->utf8_decodeW(szTemplateBuffer);
+ decoded = mir_utf8decodeW(szTemplateBuffer);
if (dat == 0)
mir_sntprintf(RTL_Active.szTemplates[i], TEMPLATE_LENGTH, L"%s", decoded);
else
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index e80882a456..bfe5f0cb7b 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -1412,7 +1412,7 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
str->insert(pos, L"\\line ");
}
- char *utf8 = M->utf8_encodeT(str->c_str());
+ char *utf8 = mir_utf8encodeT(str->c_str());
::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)utf8);
mir_free(utf8);
delete str;