diff options
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/chat/chat.h | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/chat/services.cpp | 23 | ||||
-rw-r--r-- | plugins/TabSRMM/chat/tools.cpp | 2 |
3 files changed, 17 insertions, 18 deletions
diff --git a/plugins/TabSRMM/chat/chat.h b/plugins/TabSRMM/chat/chat.h index e06634beef..3088486831 100644 --- a/plugins/TabSRMM/chat/chat.h +++ b/plugins/TabSRMM/chat/chat.h @@ -356,11 +356,11 @@ typedef struct{ #define mir_tstrdup mir_wstrdup
-TCHAR* a2t( const char* str );
-char* t2a( const TCHAR* str, DWORD codepage );
-TCHAR* a2tf( const TCHAR* str, int flags, DWORD cp );
-TCHAR* replaceStr( TCHAR** dest, const TCHAR* src );
-char* replaceStrA( char** dest, const char* src );
+TCHAR* a2t(const char* str);
+char* t2a(const TCHAR* str, DWORD codepage);
+TCHAR* a2tf(const TCHAR* str, int flags, DWORD cp = 0);
+TCHAR* replaceStr(TCHAR** dest, const TCHAR* src);
+char* replaceStrA(char** dest, const char* src);
extern char *szChatIconString;
diff --git a/plugins/TabSRMM/chat/services.cpp b/plugins/TabSRMM/chat/services.cpp index 5e241823b7..c24af3af6b 100644 --- a/plugins/TabSRMM/chat/services.cpp +++ b/plugins/TabSRMM/chat/services.cpp @@ -179,7 +179,6 @@ INT_PTR Service_GetInfo(WPARAM wParam, LPARAM lParam) INT_PTR Service_Register(WPARAM wParam, LPARAM lParam)
{
-
GCREGISTER *gcr = (GCREGISTER *)lParam;
MODULEINFO * mi = NULL;
if (gcr == NULL)
@@ -192,7 +191,7 @@ INT_PTR Service_Register(WPARAM wParam, LPARAM lParam) mi = MM_AddModule(gcr->pszModule);
if (mi) {
- mi->ptszModDispName = a2tf( gcr->ptszModuleDispName, gcr->dwFlags, 0);
+ mi->ptszModDispName = a2tf( gcr->ptszModuleDispName, gcr->dwFlags);
mi->bBold = gcr->dwFlags & GC_BOLD;
mi->bUnderline = gcr->dwFlags & GC_UNDERLINE ;
mi->bItalics = gcr->dwFlags & GC_ITALICS ;
@@ -232,7 +231,7 @@ INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) EnterCriticalSection(&cs);
if ((mi = MM_FindModule(gcw->pszModule)) != NULL) {
- TCHAR* ptszID = a2tf(gcw->ptszID, gcw->dwFlags, 0);
+ TCHAR* ptszID = a2tf(gcw->ptszID, gcw->dwFlags);
SESSION_INFO* si = SM_AddSession(ptszID, gcw->pszModule);
// create a new session and set the defaults
@@ -244,8 +243,8 @@ INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) si->wStatus = ID_STATUS_ONLINE;
si->iType = gcw->iType;
si->dwFlags = gcw->dwFlags;
- si->ptszName = a2tf(gcw->ptszName, gcw->dwFlags, 0);
- si->ptszStatusbarText = a2tf(gcw->ptszStatusbarText, gcw->dwFlags, 0);
+ si->ptszName = a2tf(gcw->ptszName, gcw->dwFlags);
+ si->ptszStatusbarText = a2tf(gcw->ptszStatusbarText, gcw->dwFlags);
si->iSplitterX = g_Settings.iSplitterX;
si->bFilterEnabled = M->GetByte(si->hContact, "Chat", "FilterEnabled", M->GetByte("Chat", "FilterEnabled", 0));
si->bNicklistEnabled = M->GetByte("Chat", "ShowNicklist", 1);
@@ -642,15 +641,15 @@ INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) if (!(gce->dwFlags & GC_UNICODE)) {
save_gce = *gce;
save_gcd = *gce->pDest;
- gce->pDest->ptszID = a2tf(gce->pDest->ptszID, gce->dwFlags, 0);
- gce->ptszUID = a2tf(gce->ptszUID, gce->dwFlags, 0);
- gce->ptszNick = a2tf(gce->ptszNick, gce->dwFlags, 0);
- gce->ptszStatus = a2tf(gce->ptszStatus, gce->dwFlags, 0);
+ gce->pDest->ptszID = a2tf(gce->pDest->ptszID, gce->dwFlags);
+ gce->ptszUID = a2tf(gce->ptszUID, gce->dwFlags);
+ gce->ptszNick = a2tf(gce->ptszNick, gce->dwFlags);
+ gce->ptszStatus = a2tf(gce->ptszStatus, gce->dwFlags);
if (gcd->iType != GC_EVENT_MESSAGE && gcd->iType != GC_EVENT_ACTION) {
- gce->ptszText = a2tf(gce->ptszText, gce->dwFlags, 0);
+ gce->ptszText = a2tf(gce->ptszText, gce->dwFlags);
fFreeText = TRUE;
}
- gce->ptszUserInfo = a2tf(gce->ptszUserInfo, gce->dwFlags, 0);
+ gce->ptszUserInfo = a2tf(gce->ptszUserInfo, gce->dwFlags);
}
EnterCriticalSection(&cs);
@@ -718,7 +717,7 @@ INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) if (si)
gce->ptszText = a2tf(gce->ptszText, gce->dwFlags, M->GetDword(si->hContact, "ANSIcodepage", 0));
else
- gce->ptszText = a2tf(gce->ptszText, gce->dwFlags, 0);
+ gce->ptszText = a2tf(gce->ptszText, gce->dwFlags);
}
if (!gce->bIsMe && gce->pDest->pszID && gce->pszText) {
if (si)
diff --git a/plugins/TabSRMM/chat/tools.cpp b/plugins/TabSRMM/chat/tools.cpp index ed4958023d..30aa3eba9e 100644 --- a/plugins/TabSRMM/chat/tools.cpp +++ b/plugins/TabSRMM/chat/tools.cpp @@ -987,7 +987,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
for (i = 0; i < gcmi.nItems; i++) {
- TCHAR* ptszDescr = a2tf(gcmi.Item[i].pszDesc, si->dwFlags, 0);
+ TCHAR* ptszDescr = a2tf(gcmi.Item[i].pszDesc, si->dwFlags);
TCHAR* ptszText = TranslateTS(ptszDescr);
DWORD dwState = gcmi.Item[i].bDisabled ? MF_GRAYED : 0;
|