diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-03 21:56:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-03 21:56:17 +0000 |
commit | fc3091cb598ad8401fb4af2a6e3931141c9895a1 (patch) | |
tree | cdbf34b27d1ff8d5986f687a9c51e93a0099bf55 /plugins | |
parent | 98ad0478550773f19712b598edc56ef7dbea2985 (diff) |
- old junk removed from tabSRMM & replaced with the modern calls
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@5572 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/chat/chat.h | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/manager.cpp | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 48 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/tools.cpp | 167 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 17 | ||||
-rw-r--r-- | plugins/TabSRMM/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/controls.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.h | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.h | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sidebar.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sidebar.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/tabctrl.cpp | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.h | 2 |
19 files changed, 128 insertions, 186 deletions
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h index 070deef568..f64b71728c 100644 --- a/plugins/TabSRMM/src/chat/chat.h +++ b/plugins/TabSRMM/src/chat/chat.h @@ -308,13 +308,7 @@ struct COLORCHOOSER #include "chatprototypes.h"
#include "chat_resource.h"
-#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 = 0);
-TCHAR* replaceStr(TCHAR** dest, const TCHAR* src);
-char* replaceStrA(char** dest, const char* src);
extern char *szChatIconString;
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index dc4b8d118b..86aed75e95 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -39,8 +39,8 @@ void SetActiveSession(const TCHAR* pszID, const char* pszModule) void SetActiveSessionEx(SESSION_INFO *si)
{
if (si) {
- replaceStr(&pszActiveWndID, si->ptszID);
- replaceStrA(&pszActiveWndModule, si->pszModule);
+ replaceStrT(pszActiveWndID, si->ptszID);
+ replaceStr(pszActiveWndModule, si->pszModule);
}
}
@@ -569,7 +569,7 @@ BOOL SM_ChangeUID(const TCHAR* pszID, const char* pszModule, const TCHAR* pszUID if ((!pszID || !lstrcmpi(si->ptszID, pszID)) && !lstrcmpiA(si->pszModule, pszModule)) {
USERINFO* ui = UM_FindUser(si->pUsers, pszUID);
if (ui)
- replaceStr(&ui->pszUID, pszNewUID);
+ replaceStrT(ui->pszUID, pszNewUID);
if (pszID)
return TRUE;
@@ -588,7 +588,7 @@ BOOL SM_ChangeNick(const TCHAR* pszID, const char* pszModule, GCEVENT *gce) if ((!pszID || !lstrcmpi(si->ptszID, pszID)) && !lstrcmpiA(si->pszModule, pszModule)) {
USERINFO* ui = UM_FindUser(si->pUsers, gce->ptszUID);
if (ui) {
- replaceStr(&ui->pszNick, gce->ptszText);
+ replaceStrT(ui->pszNick, gce->ptszText);
SM_MoveUser(si->ptszID, si->pszModule, ui->pszUID);
if (si->hWnd) {
SendMessage(si->hWnd, GC_UPDATENICKLIST, 0, 0);
@@ -910,7 +910,7 @@ STATUSINFO * TM_AddStatus(STATUSINFO** ppStatusList, const TCHAR* pszStatus, int if (!TM_FindStatus(*ppStatusList, pszStatus)) {
STATUSINFO *node = (STATUSINFO*) mir_alloc(sizeof(STATUSINFO));
ZeroMemory(node, sizeof(STATUSINFO));
- replaceStr(&node->pszGroup, pszStatus);
+ replaceStrT(node->pszGroup, pszStatus);
node->hIcon = (HICON)(*iCount);
while ((int)node->hIcon > STATUSICONCOUNT - 1)
node->hIcon--;
@@ -1122,7 +1122,7 @@ USERINFO* UM_AddUser(STATUSINFO* pStatusList, USERINFO** ppUserList, const TCHAR {
USERINFO *node = (USERINFO*) mir_alloc(sizeof(USERINFO));
ZeroMemory(node, sizeof(USERINFO));
- replaceStr(&node->pszUID, pszUID);
+ replaceStrT(node->pszUID, pszUID);
if (*ppUserList == NULL) { // list is empty
*ppUserList = node;
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index acc9b54222..4e06c0ff24 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -452,19 +452,15 @@ HICON LoadIconEx(int iIndex, char * pszIcoLibName, int iX, int iY) return Skin_GetIcon(szTemp);
}
-static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault)
+static void InitSetting(TCHAR* &ppPointer, const char *pszSetting, const TCHAR *pszDefault)
{
- DBVARIANT dbv;
- if (!db_get_ts(NULL, "Chat", pszSetting, &dbv)) {
- replaceStr(ppPointer, dbv.ptszVal);
- db_free(&dbv);
- } else
- replaceStr(ppPointer, pszDefault);
+ ptrT val( db_get_tsa(NULL, "Chat", pszSetting));
+ replaceStrT(ppPointer, (val != NULL) ? val : pszDefault);
}
#define OPT_FIXHEADINGS (WM_USER+1)
-static UINT _o1controls[] = {IDC_CHECKBOXES, IDC_GROUP, IDC_STATIC_ADD, 0};
+static UINT _o1controls[] = {IDC_CHECKBOXES, IDC_GROUP, IDC_STATIC_ADD};
HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle)
{
@@ -513,18 +509,15 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading1, branch1, SIZEOF(branch1), 0x0000);
FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading2, branch2, SIZEOF(branch2), 0x0000);
- {
- TCHAR* pszGroup = NULL;
- InitSetting(&pszGroup, "AddToGroup", _T("Chat rooms"));
- SetWindowText(GetDlgItem(hwndDlg, IDC_GROUP), pszGroup);
- mir_free(pszGroup);
- Utils::showDlgControl(hwndDlg, IDC_STATIC_MESSAGE, SW_HIDE);
- }
+ TCHAR* pszGroup = NULL;
+ InitSetting(pszGroup, "AddToGroup", _T("Chat rooms"));
+ SetWindowText(GetDlgItem(hwndDlg, IDC_GROUP), pszGroup);
+ mir_free(pszGroup);
+ Utils::showDlgControl(hwndDlg, IDC_STATIC_MESSAGE, SW_HIDE);
}
else {
- int i=0;
- while (_o1controls[i])
- Utils::showDlgControl(hwndDlg, _o1controls[i++], SW_HIDE);
+ for (int i=0; i < SIZEOF(_o1controls); i++)
+ Utils::showDlgControl(hwndDlg, _o1controls[i], SW_HIDE);
}
break;
@@ -1139,7 +1132,9 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM #define NR_GC_EVENTS 12
-static UINT _eventorder[] = { GC_EVENT_ACTION,
+static UINT _eventorder[] =
+{
+ GC_EVENT_ACTION,
GC_EVENT_MESSAGE,
GC_EVENT_NICK,
GC_EVENT_JOIN,
@@ -1150,8 +1145,7 @@ static UINT _eventorder[] = { GC_EVENT_ACTION, GC_EVENT_QUIT,
GC_EVENT_KICK,
GC_EVENT_NOTICE,
- GC_EVENT_HIGHLIGHT,
- 0
+ GC_EVENT_HIGHLIGHT
};
#define GC_EVENT_ALL (GC_EVENT_ACTION | GC_EVENT_MESSAGE | GC_EVENT_NICK | GC_EVENT_JOIN | \
@@ -1175,7 +1169,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM DWORD dwPopupFlags = M.GetDword("Chat", "PopupFlags", GC_EVENT_ALL);
DWORD dwLogFlags = M.GetDword("Chat", "DiskLogFlags", GC_EVENT_ALL);
- for (int i=0; _eventorder[i]; i++) {
+ for (int i=0; i < SIZEOF(_eventorder); i++) {
if (_eventorder[i] != GC_EVENT_HIGHLIGHT) {
CheckDlgButton(hwndDlg, IDC_1 + i, dwFilterFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_L1 + i, dwLogFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED);
@@ -1207,7 +1201,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM DWORD dwFilterFlags = 0, dwTrayFlags = 0,
dwPopupFlags = 0, dwLogFlags = 0;
- for (int i=0; _eventorder[i]; i++) {
+ for (int i=0; i < SIZEOF(_eventorder); i++) {
if (_eventorder[i] != GC_EVENT_HIGHLIGHT) {
dwFilterFlags |= (IsDlgButtonChecked(hwndDlg, IDC_1 + i) ? _eventorder[i] : 0);
dwLogFlags |= (IsDlgButtonChecked(hwndDlg, IDC_L1 + i) ? _eventorder[i] : 0);
@@ -1292,10 +1286,10 @@ void LoadGlobalSettings(void) DeleteObject(hListBkgBrush);
hListBkgBrush = CreateSolidBrush(M.GetDword("Chat", "ColorNicklistBG", SRMSGDEFSET_BKGCOLOUR));
- InitSetting(&g_Settings.pszTimeStamp, "HeaderTime", _T("[%H:%M]"));
- InitSetting(&g_Settings.pszTimeStampLog, "LogTimestamp", _T("[%d %b %y %H:%M]"));
- InitSetting(&g_Settings.pszIncomingNick, "HeaderIncoming", _T("%n:"));
- InitSetting(&g_Settings.pszOutgoingNick, "HeaderOutgoing", _T("%n:"));
+ InitSetting(g_Settings.pszTimeStamp, "HeaderTime", _T("[%H:%M]"));
+ InitSetting(g_Settings.pszTimeStampLog, "LogTimestamp", _T("[%d %b %y %H:%M]"));
+ InitSetting(g_Settings.pszIncomingNick, "HeaderIncoming", _T("%n:"));
+ InitSetting(g_Settings.pszOutgoingNick, "HeaderOutgoing", _T("%n:"));
DBVARIANT dbv;
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 398f0616c6..5eba351bc9 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -330,7 +330,7 @@ static int DoControl(GCEVENT *gce, WPARAM wp) if (gce->pszText) {
si = SM_FindSession(gce->pDest->ptszID, gce->pDest->pszModule);
if (si) {
- replaceStr(&si->ptszName, gce->ptszText);
+ replaceStrT(si->ptszName, gce->ptszText);
if (si->hWnd)
SendMessage(si->hWnd, GC_UPDATETITLE, 0, 0);
}
@@ -354,7 +354,7 @@ static int DoControl(GCEVENT *gce, WPARAM wp) case GC_EVENT_SETSBTEXT:
si = SM_FindSession(gce->pDest->ptszID, gce->pDest->pszModule);
if (si) {
- replaceStr(&si->ptszStatusbarText, gce->ptszText);
+ replaceStrT(si->ptszStatusbarText, gce->ptszText);
if (si->ptszStatusbarText)
db_set_ts(si->hContact, si->pszModule, "StatusBar", si->ptszStatusbarText);
else
@@ -642,7 +642,7 @@ INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) si = SM_FindSession(gce->pDest->ptszID, gce->pDest->pszModule);
if (si) {
if (gce->pszText) {
- replaceStr(&si->ptszTopic, RemoveFormatting(gce->ptszText));
+ replaceStrT(si->ptszTopic, RemoveFormatting(gce->ptszText));
db_set_ts(si->hContact, si->pszModule , "Topic", /*RemoveFormatting*/(si->ptszTopic));
if (M.GetByte("Chat", "TopicOnClist", 1))
db_set_ts(si->hContact, "CList" , "StatusMsg", /*RemoveFormatting*/(si->ptszTopic));
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index 65509b2190..f3157bd33f 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -292,7 +292,7 @@ static BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce) return TRUE;
}
-static BOOL DoPopup(SESSION_INFO *si, GCEVENT* gce, struct TWindowData* dat)
+static BOOL DoPopup(SESSION_INFO *si, GCEVENT* gce, struct TWindowData *dat)
{
int iEvent = gce->pDest->iType;
TContainerData *pContainer = dat ? dat->pContainer : NULL;
@@ -369,18 +369,18 @@ passed: case GC_EVENT_PART:
if (!gce->pszText)
ShowPopup(si->hContact, si, hIcons[ICON_PART], si->pszModule, si->ptszName, clr ? clr : aFonts[4].color,
- TranslateT("%s has left"), gce->ptszNick);
+ TranslateT("%s has left"), gce->ptszNick);
else
ShowPopup(si->hContact, si, hIcons[ICON_PART], si->pszModule, si->ptszName, clr ? clr : aFonts[4].color,
- TranslateT("%s has left (%s)"), gce->ptszNick, RemoveFormatting(gce->ptszText));
+ TranslateT("%s has left (%s)"), gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_QUIT:
if (!gce->pszText)
ShowPopup(si->hContact, si, hIcons[ICON_QUIT], si->pszModule, si->ptszName, clr ? clr : aFonts[5].color,
- TranslateT("%s has disconnected"), gce->ptszNick);
+ TranslateT("%s has disconnected"), gce->ptszNick);
else
ShowPopup(si->hContact, si, hIcons[ICON_QUIT], si->pszModule, si->ptszName, clr ? clr : aFonts[5].color,
- TranslateT("%s has disconnected (%s)"), gce->ptszNick, RemoveFormatting(gce->ptszText));
+ TranslateT("%s has disconnected (%s)"), gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_NICK:
ShowPopup(si->hContact, si, hIcons[ICON_NICK], si->pszModule, si->ptszName, clr ? clr : aFonts[7].color,
@@ -389,10 +389,10 @@ passed: case GC_EVENT_KICK:
if (!gce->pszText)
ShowPopup(si->hContact, si, hIcons[ICON_KICK], si->pszModule, si->ptszName, clr ? clr : aFonts[6].color,
- TranslateT("%s kicked %s"), (char *)gce->pszStatus, gce->ptszNick);
+ TranslateT("%s kicked %s"), (char *)gce->pszStatus, gce->ptszNick);
else
ShowPopup(si->hContact, si, hIcons[ICON_KICK], si->pszModule, si->ptszName, clr ? clr : aFonts[6].color,
- TranslateT("%s kicked %s (%s)"), (char *)gce->pszStatus, gce->ptszNick, RemoveFormatting(gce->ptszText));
+ TranslateT("%s kicked %s (%s)"), (char *)gce->pszStatus, gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_NOTICE:
ShowPopup(si->hContact, si, hIcons[ICON_NOTICE], si->pszModule, si->ptszName, clr ? clr : aFonts[8].color,
@@ -401,10 +401,10 @@ passed: case GC_EVENT_TOPIC:
if (!gce->ptszNick)
ShowPopup(si->hContact, si, hIcons[ICON_TOPIC], si->pszModule, si->ptszName, clr ? clr : aFonts[11].color,
- TranslateT("The topic is \'%s\'"), RemoveFormatting(gce->ptszText));
+ TranslateT("The topic is \'%s\'"), RemoveFormatting(gce->ptszText));
else
ShowPopup(si->hContact, si, hIcons[ICON_TOPIC], si->pszModule, si->ptszName, clr ? clr : aFonts[11].color,
- TranslateT("The topic is \'%s\' (set by %s)"), RemoveFormatting(gce->ptszText), gce->ptszNick);
+ TranslateT("The topic is \'%s\' (set by %s)"), RemoveFormatting(gce->ptszText), gce->ptszNick);
break;
case GC_EVENT_INFORMATION:
ShowPopup(si->hContact, si, hIcons[ICON_INFO], si->pszModule, si->ptszName, clr ? clr : aFonts[12].color, _T("%s"), RemoveFormatting(gce->ptszText));
@@ -425,12 +425,11 @@ passed: void TSAPI DoFlashAndSoundWorker(FLASH_PARAMS* p)
{
- SESSION_INFO* si = SM_FindSessionByHCONTACT(p->hContact);
- TWindowData* dat = 0;
-
+ SESSION_INFO *si = SM_FindSessionByHCONTACT(p->hContact);
if (si == 0)
return;
+ TWindowData *dat = 0;
if (si->hWnd) {
dat = si->dat;
if (dat) {
@@ -513,15 +512,11 @@ void TSAPI DoFlashAndSoundWorker(FLASH_PARAMS* p) BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight, int bManyFix)
{
- FLASH_PARAMS* params;
- struct TWindowData *dat = 0;
- bool fFlagUnread = false;
- WPARAM wParamForHighLight = 0;
-
if (gce == 0 || si == 0 || gce->bIsMe || si->iType == GCW_SERVER)
return FALSE;
- params = (FLASH_PARAMS*)calloc(1, sizeof(FLASH_PARAMS));
+ TWindowData *dat = NULL;
+ FLASH_PARAMS *params = (FLASH_PARAMS*)calloc(1, sizeof(FLASH_PARAMS));
params->hContact = si->hContact;
params->bInactive = TRUE;
if (si->hWnd && si->dat) {
@@ -530,16 +525,17 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight params->bInactive = FALSE;
}
params->bActiveTab = params->bMustFlash = params->bMustAutoswitch = FALSE;
-
params->iEvent = gce->pDest->iType;
+ WPARAM wParamForHighLight = 0;
+ bool bFlagUnread = false;
if (bHighlight) {
gce->pDest->iType |= GC_EVENT_HIGHLIGHT;
params->sound = "ChatHighlight";
if (db_get_b(si->hContact, "CList", "Hidden", 0) != 0)
db_unset(si->hContact, "CList", "Hidden");
if (params->bInactive) {
- fFlagUnread = true;
+ bFlagUnread = true;
DoTrayIcon(si, gce);
}
@@ -561,12 +557,13 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight params->bMustFlash = TRUE;
params->bMustAutoswitch = TRUE;
params->hNotifyIcon = hIcons[ICON_HIGHLIGHT];
- } else {
+ }
+ else {
// do blinking icons in tray
if (params->bInactive || !g_Settings.bTrayIconInactiveOnly) {
DoTrayIcon(si, gce);
if (params->iEvent == GC_EVENT_MESSAGE)
- fFlagUnread = true;
+ bFlagUnread = true;
}
// stupid thing to not create multiple popups for a QUIT event for instance
if (bManyFix == 0) {
@@ -673,7 +670,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight params->hNotifyIcon = hIcons[ICON_MESSAGE];
}
}
- if (dat && fFlagUnread) {
+ if (dat && bFlagUnread) {
dat->dwUnread++;
if (dat->pWnd)
dat->pWnd->Invalidate();
@@ -684,7 +681,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight int Chat_GetColorIndex(const char* pszModule, COLORREF cr)
{
- MODULEINFO * pMod = MM_FindModule(pszModule);
+ MODULEINFO *pMod = MM_FindModule(pszModule);
if (!pMod || pMod->nColorCount == 0)
return -1;
@@ -921,14 +918,13 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *si, TCHAR* pszUID, TCHAR* pszWordText)
{
- GCMENUITEMS gcmi = {0};
- int i;
HMENU hSubMenu = 0;
DWORD codepage = M.GetDword(si->hContact, "ANSIcodepage", 0);
- int pos;
*hMenu = GetSubMenu(g_hMenu, iIndex);
TranslateMenu(*hMenu);
+
+ GCMENUITEMS gcmi = {0};
gcmi.pszID = si->ptszID;
gcmi.pszModule = si->pszModule;
gcmi.pszUID = pszUID;
@@ -950,7 +946,8 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO TCHAR szMenuText[4096];
mir_sntprintf(szMenuText, 4096, TranslateT("Look up \'%s\':"), pszWordText);
ModifyMenu(*hMenu, 4, MF_STRING | MF_BYPOSITION, 4, szMenuText);
- } else ModifyMenu(*hMenu, 4, MF_STRING | MF_GRAYED | MF_BYPOSITION, 4, TranslateT("No word to look up"));
+ }
+ else ModifyMenu(*hMenu, 4, MF_STRING | MF_GRAYED | MF_BYPOSITION, 4, TranslateT("No word to look up"));
gcmi.Type = MENU_ON_LOG;
}
else if (iIndex == 0) {
@@ -971,9 +968,9 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO if (gcmi.nItems > 0)
AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
- for (i=0; i < gcmi.nItems; i++) {
- TCHAR* ptszDescr = a2tf(gcmi.Item[i].pszDesc, si->dwFlags);
- TCHAR* ptszText = TranslateTS(ptszDescr);
+ for (int i=0; i < gcmi.nItems; i++) {
+ TCHAR *ptszDescr = a2tf(gcmi.Item[i].pszDesc, si->dwFlags);
+ TCHAR *ptszText = TranslateTS(ptszDescr);
DWORD dwState = gcmi.Item[i].bDisabled ? MF_GRAYED : 0;
if (gcmi.Item[i].uType == MENU_NEWPOPUP) {
@@ -1003,7 +1000,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO #if !defined(__DELAYED_FOR_3_1)
if (iIndex == 0) {
AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
- pos = GetMenuItemCount(*hMenu);
+ int pos = GetMenuItemCount(*hMenu);
InsertMenu(*hMenu, pos, MF_BYPOSITION, (UINT_PTR)20020, TranslateT("Highlight User..."));
InsertMenu(*hMenu, pos, MF_BYPOSITION, (UINT_PTR)20021, TranslateT("Edit Highlight List..."));
}
@@ -1011,9 +1008,9 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO if (iIndex == 1 && si->iType != GCW_SERVER && !(si->dwFlags & GC_UNICODE)) {
AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
InsertMenu(PluginConfig.g_hMenuEncoding, 1, MF_BYPOSITION | MF_STRING, (UINT_PTR)CP_UTF8, TranslateT("UTF-8"));
- pos = GetMenuItemCount(*hMenu);
+ int pos = GetMenuItemCount(*hMenu);
InsertMenu(*hMenu, pos, MF_BYPOSITION | MF_POPUP, (UINT_PTR) PluginConfig.g_hMenuEncoding, TranslateT("Character Encoding"));
- for (i=0; i < GetMenuItemCount(PluginConfig.g_hMenuEncoding); i++)
+ for (int i=0; i < GetMenuItemCount(PluginConfig.g_hMenuEncoding); i++)
CheckMenuItem(PluginConfig.g_hMenuEncoding, i, MF_BYPOSITION | MF_UNCHECKED);
if (codepage == CP_ACP)
CheckMenuItem(PluginConfig.g_hMenuEncoding, 0, MF_BYPOSITION | MF_CHECKED);
@@ -1038,26 +1035,24 @@ void DestroyGCMenu(HMENU *hMenu, int iIndex) BOOL DoEventHookAsync(HWND hwnd, const TCHAR* pszID, const char* pszModule, int iType, TCHAR* pszUID, TCHAR* pszText, DWORD dwItem)
{
- SESSION_INFO *si;
- GCHOOK* gch = (GCHOOK*)mir_alloc(sizeof(GCHOOK));
- GCDEST* gcd = (GCDEST*)mir_alloc(sizeof(GCDEST));
-
- memset(gch, 0, sizeof(GCHOOK));
- memset(gcd, 0, sizeof(GCDEST));
-
- replaceStrA(&gcd->pszModule, pszModule);
- if ((si = SM_FindSession(pszID, pszModule)) == NULL)
+ SESSION_INFO *si = SM_FindSession(pszID, pszModule);
+ if (si == NULL)
return FALSE;
+ GCHOOK *gch = (GCHOOK*)mir_calloc(sizeof(GCHOOK));
+ GCDEST *gcd = (GCDEST*)mir_calloc(sizeof(GCDEST));
+ replaceStr(gcd->pszModule, pszModule);
+
if (!(si->dwFlags & GC_UNICODE)) {
DWORD dwCP = M.GetDword(si->hContact, "ANSIcodepage", 0);
- gcd->pszID = t2a(pszID, 0);
- gch->pszUID = t2a(pszUID, 0);
- gch->pszText = t2a(pszText, dwCP);
- } else {
- replaceStr(&gcd->ptszID, pszID);
- replaceStr(&gch->ptszUID, pszUID);
- replaceStr(&gch->ptszText, pszText);
+ gcd->pszID = mir_t2a(pszID);
+ gch->pszUID = mir_t2a(pszUID);
+ gch->pszText = mir_t2a_cp(pszText, dwCP);
+ }
+ else {
+ replaceStrT(gcd->ptszID, pszID);
+ replaceStrT(gch->ptszUID, pszUID);
+ replaceStrT(gch->ptszText, pszText);
}
gcd->iType = iType;
gch->dwData = dwItem;
@@ -1068,20 +1063,21 @@ BOOL DoEventHookAsync(HWND hwnd, const TCHAR* pszID, const char* pszModule, int BOOL DoEventHook(const TCHAR* pszID, const char* pszModule, int iType, const TCHAR* pszUID, const TCHAR* pszText, DWORD dwItem)
{
- SESSION_INFO *si;
+ SESSION_INFO *si = SM_FindSession(pszID, pszModule);
+ if (si == NULL)
+ return FALSE;
+
GCHOOK gch = {0};
GCDEST gcd = {0};
-
gcd.pszModule = (char*)pszModule;
- if ((si = SM_FindSession(pszID, pszModule)) == NULL)
- return FALSE;
if (!(si->dwFlags & GC_UNICODE)) {
DWORD dwCP = M.GetDword(si->hContact, "ANSIcodepage", 0);
- gcd.pszID = t2a(pszID, 0);
- gch.pszUID = t2a(pszUID, 0);
- gch.pszText = t2a(pszText, dwCP);
- } else {
+ gcd.pszID = mir_t2a(pszID);
+ gch.pszUID = mir_t2a(pszUID);
+ gch.pszText = mir_t2a_cp(pszText, dwCP);
+ }
+ else {
gcd.ptszID = mir_tstrdup(pszID);
gch.ptszUID = mir_tstrdup(pszUID);
gch.ptszText = mir_tstrdup(pszText);
@@ -1138,65 +1134,22 @@ TCHAR* a2tf(const TCHAR* str, int flags, DWORD cp) if (flags & GC_UNICODE)
return mir_tstrdup(str);
- else {
- int cbLen;
- TCHAR *result;
-
- if (cp == CP_UTF8)
- return(mir_utf8decodeW((char *)str));
-
- if (cp == 0)
- cp = PluginConfig.m_LangPackCP;
- cbLen = MultiByteToWideChar(cp, 0, (char*)str, -1, 0, 0);
- result = (TCHAR*)mir_alloc(sizeof(TCHAR) * (cbLen + 1));
- if (result == NULL)
- return NULL;
-
- MultiByteToWideChar(cp, 0, (char*)str, -1, result, cbLen);
- result[ cbLen ] = 0;
- return result;
- }
-}
-static char* u2a(const wchar_t* src, DWORD cp)
-{
- int cbLen;
- char *result;
+ if (cp == CP_UTF8)
+ return mir_utf8decodeW((char*)str);
if (cp == 0)
cp = PluginConfig.m_LangPackCP;
- else if (cp == CP_UTF8)
- return(mir_utf8encodeT(src));
-
- cbLen = WideCharToMultiByte(cp, 0, src, -1, NULL, 0, NULL, NULL);
- result = (char*)mir_alloc(cbLen + 1);
+ int cbLen = MultiByteToWideChar(cp, 0, (char*)str, -1, 0, 0);
+ TCHAR *result = (TCHAR*)mir_alloc(sizeof(TCHAR) * (cbLen + 1));
if (result == NULL)
return NULL;
- WideCharToMultiByte(cp, 0, src, -1, result, cbLen, NULL, NULL);
- result[ cbLen ] = 0;
+ MultiByteToWideChar(cp, 0, (char*)str, -1, result, cbLen);
+ result[cbLen] = 0;
return result;
}
-char* t2a(const TCHAR* src, DWORD cp)
-{
- return u2a(src, cp);
-}
-
-TCHAR* replaceStr(TCHAR** dest, const TCHAR* src)
-{
- mir_free(*dest);
- *dest = mir_tstrdup(src);
- return *dest;
-}
-
-char* replaceStrA(char** dest, const char* src)
-{
- mir_free(*dest);
- *dest = mir_strdup(src);
- return *dest;
-}
-
/*
* set all filters and notification config for a session
* uses per channel mask + filterbits, default config as backup
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index dd3fcbf6bd..e6590138ef 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1120,7 +1120,9 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, * session
*/
-static UINT _eventorder[] = { GC_EVENT_ACTION,
+static UINT _eventorder[] =
+{
+ GC_EVENT_ACTION,
GC_EVENT_MESSAGE,
GC_EVENT_NICK,
GC_EVENT_JOIN,
@@ -1130,8 +1132,7 @@ static UINT _eventorder[] = { GC_EVENT_ACTION, GC_EVENT_INFORMATION,
GC_EVENT_QUIT,
GC_EVENT_KICK,
- GC_EVENT_NOTICE,
- 0
+ GC_EVENT_NOTICE
};
static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -1152,7 +1153,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)si);
- for (int i=0; _eventorder[i]; i++) {
+ for (int i=0; i < SIZEOF(_eventorder); i++) {
CheckDlgButton(hwndDlg, IDC_1 + i, dwMask & _eventorder[i] ? (dwFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED) : BST_INDETERMINATE);
CheckDlgButton(hwndDlg, IDC_P1 + i, dwPopupMask & _eventorder[i] ? (dwPopupFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED) : BST_INDETERMINATE);
CheckDlgButton(hwndDlg, IDC_T1 + i, dwTrayMask & _eventorder[i] ? (dwTrayFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED) : BST_INDETERMINATE);
@@ -1172,7 +1173,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP UINT result;
DWORD dwMask = 0, dwFlags = 0;
- for (i=0; _eventorder[i]; i++) {
+ for (i=0; i < SIZEOF(_eventorder); i++) {
result = IsDlgButtonChecked(hwndDlg, IDC_1 + i);
dwMask |= (result != BST_INDETERMINATE ? _eventorder[i] : 0);
iFlags |= (result == BST_CHECKED ? _eventorder[i] : 0);
@@ -1194,7 +1195,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP dwMask = iFlags = 0;
- for (i=0; _eventorder[i]; i++) {
+ for (i=0; i < SIZEOF(_eventorder); i++) {
result = IsDlgButtonChecked(hwndDlg, IDC_P1 + i);
dwMask |= (result != BST_INDETERMINATE ? _eventorder[i] : 0);
iFlags |= (result == BST_CHECKED ? _eventorder[i] : 0);
@@ -1216,12 +1217,12 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP dwMask = iFlags = 0;
- for (i=0; _eventorder[i]; i++) {
+ for (i=0; i < SIZEOF(_eventorder); i++) {
result = IsDlgButtonChecked(hwndDlg, IDC_T1 + i);
dwMask |= (result != BST_INDETERMINATE ? _eventorder[i] : 0);
iFlags |= (result == BST_CHECKED ? _eventorder[i] : 0);
}
- if (iFlags&GC_EVENT_ADDSTATUS)
+ if (iFlags & GC_EVENT_ADDSTATUS)
iFlags |= GC_EVENT_REMOVESTATUS;
if (si) {
diff --git a/plugins/TabSRMM/src/commonheaders.h b/plugins/TabSRMM/src/commonheaders.h index 31c1faba6d..c87d5b674b 100644 --- a/plugins/TabSRMM/src/commonheaders.h +++ b/plugins/TabSRMM/src/commonheaders.h @@ -293,7 +293,7 @@ extern INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, extern INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
extern int TSAPI TBStateConvert2Flat(int state);
extern int TSAPI RBStateConvert2Flat(int state);
-extern void TSAPI FillTabBackground(const HDC hdc, int iStateId, const TWindowData* dat, RECT* rc);
+extern void TSAPI FillTabBackground(const HDC hdc, int iStateId, const TWindowData *dat, RECT* rc);
#define IS_EXTKEY(a) (a & (1 << 24))
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 0e597c52c6..d88ab05f03 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1337,7 +1337,7 @@ panel_found: memset((void*)&pContainer->mOld, -1000, sizeof(MARGINS));
break;
case SC_MINIMIZE:
- TWindowData* dat = reinterpret_cast<TWindowData *>(GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA));
+ TWindowData *dat = reinterpret_cast<TWindowData *>(GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA));
if (dat) {
//GetWindowRect(GetDlgItem(pContainer->hwndActive, dat->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_CHAT_LOG), &pContainer->rcLogSaved);
GetWindowRect(pContainer->hwndActive, &pContainer->rcLogSaved);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index 470519ac0e..5c0acceb0f 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -771,7 +771,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR BOOL fAero = M.isAero();
HANDLE hTheme = fAero ? CMimAPI::m_pfnOpenThemeData(hWnd, L"ButtonStyle") : 0;
- TWindowData* dat = 0;
+ TWindowData *dat = 0;
if (pContainer)
dat = (TWindowData *)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 025f5212c2..5c21fe093c 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -36,7 +36,7 @@ /**
* Save message log for given session as RTF document
*/
-void TSAPI DM_SaveLogAsRTF(const TWindowData* dat)
+void TSAPI DM_SaveLogAsRTF(const TWindowData *dat)
{
TCHAR szFilename[MAX_PATH];
OPENFILENAME ofn = {0};
@@ -92,7 +92,7 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData* dat) *
* If no session in the container disagrees, the container will be hidden.
*/
-void TSAPI DM_CheckAutoHide(const TWindowData* dat, WPARAM wParam, LPARAM lParam)
+void TSAPI DM_CheckAutoHide(const TWindowData *dat, WPARAM wParam, LPARAM lParam)
{
if (dat && lParam) {
BOOL *fResult = (BOOL *)lParam;
@@ -1946,7 +1946,7 @@ void DrawStatusIcons(struct TWindowData *dat, HDC hDC, RECT r, int gap) else
hIcon = si->hIcon;
- if (si->flags & MBF_DISABLED && si->hIconDisabled == (HICON)0)
+ if ((si->flags & MBF_DISABLED) && si->hIconDisabled == NULL)
CSkin::DrawDimmedIcon(hDC, x, y, cx_icon, cy_icon, hIcon, 50);
else
DrawIconEx(hDC, x, y, hIcon, 16, 16, 0, NULL, DI_NORMAL);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.h b/plugins/TabSRMM/src/generic_msghandlers.h index a1f25ad827..3ca2707809 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.h +++ b/plugins/TabSRMM/src/generic_msghandlers.h @@ -59,7 +59,7 @@ LRESULT TSAPI DM_GenericHotkeysCheck(MSG *message, TWindowData *dat); void TSAPI DM_DismissTip(TWindowData *dat, const POINT& pt);
void TSAPI DM_InitTip(TWindowData *dat);
void TSAPI DM_HandleAutoSizeRequest(TWindowData *dat, REQRESIZE* rr);
-void TSAPI DM_SaveLogAsRTF(const TWindowData* dat);
-void TSAPI DM_CheckAutoHide(const TWindowData* dat, WPARAM wParam, LPARAM lParam);
+void TSAPI DM_SaveLogAsRTF(const TWindowData *dat);
+void TSAPI DM_CheckAutoHide(const TWindowData *dat, WPARAM wParam, LPARAM lParam);
LRESULT __stdcall DM_RecalcPictureSize(TWindowData *dat);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index b3dafc94ef..f817a2acb3 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -511,7 +511,7 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam) PostMessage(hwnd, DM_UPDATESTATUSMSG, 0, 0);
if (fChanged) {
if (c && c->getStatus() == ID_STATUS_OFFLINE) { // clear typing notification in the status bar when contact goes offline
- TWindowData* dat = c->getDat();
+ TWindowData *dat = c->getDat();
if (dat) {
dat->nTypeSecs = 0;
dat->showTyping = 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index ff51a3d08c..2960f10eda 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -951,7 +951,7 @@ static DWORD CALLBACK Message_StreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, * UNICODE version returns UTF-8 encoded string.
*/
-char* TSAPI Message_GetFromStream(HWND hwndRtf, const TWindowData* dat, DWORD dwPassedFlags)
+char* TSAPI Message_GetFromStream(HWND hwndRtf, const TWindowData *dat, DWORD dwPassedFlags)
{
EDITSTREAM stream;
char *pszText = NULL;
@@ -2343,7 +2343,7 @@ void TSAPI ClearLog(TWindowData *dat) * the container will use this in its WM_GETMINMAXINFO handler to set
* minimum tracking height.
*/
-void TSAPI DetermineMinHeight(TWindowData* dat)
+void TSAPI DetermineMinHeight(TWindowData *dat)
{
if (dat) {
RECT rc;
@@ -2359,7 +2359,7 @@ void TSAPI DetermineMinHeight(TWindowData* dat) }
}
-bool TSAPI IsAutoSplitEnabled(const TWindowData* dat)
+bool TSAPI IsAutoSplitEnabled(const TWindowData *dat)
{
#if defined(__FEAT_EXP_AUTOSPLITTER)
return((dat && (dat->pContainer->dwFlags & CNT_AUTOSPLITTER) && !(dat->dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)) ? true : false);
@@ -2369,7 +2369,7 @@ bool TSAPI IsAutoSplitEnabled(const TWindowData* dat) }
#if defined(__FEAT_EXP_AUTOSPLITTER)
-LONG TSAPI GetDefaultMinimumInputHeight(const TWindowData* dat)
+LONG TSAPI GetDefaultMinimumInputHeight(const TWindowData *dat)
{
LONG height = MINSPLITTERY;
@@ -2391,7 +2391,7 @@ static std::vector<TCHAR *> vTempFilenames; /**
* send a pasted bitmap by file transfer.
*/
-void TSAPI SendHBitmapAsFile(const TWindowData* dat, HBITMAP hbmp)
+void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp)
{
const wchar_t* mirandatempdir = L"Miranda";
const wchar_t* filenametemplate = L"\\clp-%Y%m%d-%H%M%S0.jpg";
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h index aa5386052f..c004d71afe 100644 --- a/plugins/TabSRMM/src/msgdlgutils.h +++ b/plugins/TabSRMM/src/msgdlgutils.h @@ -47,7 +47,7 @@ void TSAPI ShowPicture (TWindowData *dat, BOOL showNewPic); void TSAPI AdjustBottomAvatarDisplay (TWindowData *dat);
void TSAPI SetDialogToType (HWND hwndDlg);
void TSAPI FlashOnClist (HWND hwndDlg, TWindowData *dat, HANDLE hEvent, DBEVENTINFO *dbei);
-char* TSAPI Message_GetFromStream (HWND hwndDlg, const TWindowData* dat, DWORD dwPassedFlags);
+char* TSAPI Message_GetFromStream (HWND hwndDlg, const TWindowData *dat, DWORD dwPassedFlags);
BOOL TSAPI DoRtfToTags (TCHAR * pszText, const TWindowData *dat);
void TSAPI DoTrimMessage (TCHAR *msg);
void TSAPI GetMYUIN (TWindowData *dat);
@@ -84,15 +84,15 @@ HICON TSAPI MY_GetContactIcon (const TWindowData *dat); void TSAPI CheckAndDestroyIEView (TWindowData *dat);
void TSAPI KbdState (TWindowData *dat, BOOL& isShift, BOOL& isControl, BOOL& isAlt);
void TSAPI ClearLog (TWindowData *dat);
-bool TSAPI IsAutoSplitEnabled (const TWindowData* dat);
-LONG TSAPI GetDefaultMinimumInputHeight (const TWindowData* dat);
-void TSAPI DetermineMinHeight (TWindowData* dat);
+bool TSAPI IsAutoSplitEnabled (const TWindowData *dat);
+LONG TSAPI GetDefaultMinimumInputHeight (const TWindowData *dat);
+void TSAPI DetermineMinHeight (TWindowData *dat);
// mathmod
void TSAPI MTH_updateMathWindow (const TWindowData *dat);
void TSAPI CleanTempFiles ();
-void TSAPI SendHBitmapAsFile (const TWindowData* dat, HBITMAP hbmp);
+void TSAPI SendHBitmapAsFile (const TWindowData *dat, HBITMAP hbmp);
extern INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
extern INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index cf65c48b20..3c3a86d4e9 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -899,7 +899,7 @@ void CSideBar::resizeScrollWnd(LONG x, LONG y, LONG width, LONG height) const SWP_NOCOPYBITS | SWP_NOZORDER | SWP_SHOWWINDOW | SWP_NOSENDCHANGING | SWP_DEFERERASE | SWP_ASYNCWINDOWPOS);
}
-void CSideBar::invalidateButton(const TWindowData* dat)
+void CSideBar::invalidateButton(const TWindowData *dat)
{
if (m_isActive && m_isVisible) {
ButtonIterator it = findSession(dat);
diff --git a/plugins/TabSRMM/src/sidebar.h b/plugins/TabSRMM/src/sidebar.h index 116806b2d3..c3c5578de6 100644 --- a/plugins/TabSRMM/src/sidebar.h +++ b/plugins/TabSRMM/src/sidebar.h @@ -153,7 +153,7 @@ public: const CSideBarButton* getScrollDown() const { return(m_down); }
bool isSkinnedContainer() const { return(CSkin::m_skinEnabled ? true : false); }
const UINT getLayoutId() const { return(m_uLayout); }
- void invalidateButton (const TWindowData* dat);
+ void invalidateButton (const TWindowData *dat);
const CSideBarButton* setActiveItem (const CSideBarButton *newItem)
{
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp index b82f1c9b0e..5ddd545766 100644 --- a/plugins/TabSRMM/src/tabctrl.cpp +++ b/plugins/TabSRMM/src/tabctrl.cpp @@ -135,7 +135,7 @@ static void TSAPI DrawCustomTabPage(HDC hdc, RECT& rcClient) ::DeleteObject(hPen);
}
-void TSAPI FillTabBackground(const HDC hdc, int iStateId, const TWindowData* dat, RECT* rc)
+void TSAPI FillTabBackground(const HDC hdc, int iStateId, const TWindowData *dat, RECT* rc)
{
unsigned clrIndex;
@@ -157,7 +157,7 @@ void TSAPI FillTabBackground(const HDC hdc, int iStateId, const TWindowData* dat * icon handle in dat->hTabIcon
*/
-static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, int nItem, TWindowData* dat)
+static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, int nItem, TWindowData *dat)
{
int iSize = 16;
DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER/* | DT_NOPREFIX*/;
@@ -245,7 +245,7 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in static RECT rcTabPage = {0};
-static void DrawItemRect(struct TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, int iItem, const TWindowData* dat)
+static void DrawItemRect(struct TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, int iItem, const TWindowData *dat)
{
POINT pt;
DWORD dwStyle = tabdat->dwStyle;
@@ -400,7 +400,7 @@ static int DWordAlign(int n) return n;
}
-static HRESULT DrawThemesPartWithAero(const TabControlData *tabdat, HDC hDC, int iPartId, int iStateId, LPRECT prcBox, TWindowData* dat)
+static HRESULT DrawThemesPartWithAero(const TabControlData *tabdat, HDC hDC, int iPartId, int iStateId, LPRECT prcBox, TWindowData *dat)
{
HRESULT hResult = 0;
bool fAero = M.isAero();
@@ -452,7 +452,7 @@ static HRESULT DrawThemesPart(const TabControlData *tabdat, HDC hDC, int iPartId * handles image mirroring for tabs at the bottom
*/
-static void DrawThemesXpTabItem(HDC pDC, int ixItem, RECT *rcItem, UINT uiFlag, struct TabControlData *tabdat, TWindowData* dat)
+static void DrawThemesXpTabItem(HDC pDC, int ixItem, RECT *rcItem, UINT uiFlag, struct TabControlData *tabdat, TWindowData *dat)
{
BOOL bBody = (uiFlag & 1) ? TRUE : FALSE;
BOOL bSel = (uiFlag & 2) ? TRUE : FALSE;
@@ -883,7 +883,7 @@ page_done: hti.flags = 0;
hotItem = TabCtrl_HitTest(hwnd, &hti);
for (i=0; i < nCount; i++) {
- TWindowData* dat = 0;
+ TWindowData *dat = 0;
if (i != iActive) {
TabCtrl_GetItem(hwnd, i, &item);
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 4812dedb61..bb5323d822 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -2569,7 +2569,7 @@ void CSkin::extractSkinsAndLogo(bool fForceOverwrite) const * redraw the splitter area between the message input and message log
* area only
*/
-void CSkin::UpdateToolbarBG(TWindowData* dat, DWORD dwRdwOptFlags)
+void CSkin::UpdateToolbarBG(TWindowData *dat, DWORD dwRdwOptFlags)
{
RECT rcUpdate, rcTmp;
POINT pt;
diff --git a/plugins/TabSRMM/src/themes.h b/plugins/TabSRMM/src/themes.h index 5d41062920..27ed9beb6c 100644 --- a/plugins/TabSRMM/src/themes.h +++ b/plugins/TabSRMM/src/themes.h @@ -316,7 +316,7 @@ public: static HANDLE TSAPI InitiateBufferedPaint(const HDC hdcSrc, RECT& rc, HDC& hdcOut);
static void TSAPI FinalizeBufferedPaint(HANDLE hbp, RECT *rc);
static bool __fastcall DrawItem(const HDC hdc, const RECT *rc, const CSkinItem *item);
- static void TSAPI UpdateToolbarBG(TWindowData* dat, DWORD dwRdwOptFlags = 0);
+ static void TSAPI UpdateToolbarBG(TWindowData *dat, DWORD dwRdwOptFlags = 0);
static void TSAPI FillBack(const HDC hdc, RECT* rc);
public:
|