summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/chat')
-rw-r--r--plugins/TabSRMM/src/chat/chat.h6
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp30
-rw-r--r--plugins/TabSRMM/src/chat/main.cpp12
-rw-r--r--plugins/TabSRMM/src/chat/message.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/muchighlight.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp60
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp114
9 files changed, 36 insertions, 200 deletions
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h
index 52c2067274..6b56d1e20e 100644
--- a/plugins/TabSRMM/src/chat/chat.h
+++ b/plugins/TabSRMM/src/chat/chat.h
@@ -111,7 +111,7 @@ extern CHAT_MANAGER saveCI;
//////////////////////////////////////////////////////////////////////////////////
// log.c
-void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedraw, bool bPhaseTwo);
+void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedraw);
char* Log_CreateRtfHeader(MODULEINFO *mi);
// window.c
@@ -122,10 +122,10 @@ int GetTextPixelSize(TCHAR* pszText, HFONT hFont, bool bWidth);
enum { FONTSECTION_AUTO, FONTSECTION_IM, FONTSECTION_IP };
void LoadMsgDlgFont(int section, int i, LOGFONT * lf, COLORREF * colour, char* szMod);
void AddIcons(void);
-HICON LoadIconEx(int iIndex, char * pszIcoLibName, int iX, int iY);
+HICON LoadIconEx(char *pszIcoLibName);
// services.c
-void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground);
+void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL);
HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup);
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index f59c466ecb..8287eda7bd 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -418,33 +418,6 @@ static int EventToIcon(LOGINFO * lin)
return 0;
}
-/* replace pattern `ptrn' with the string `rplc' in string `src' points to */
-static TCHAR * _tcsrplc(TCHAR **src, const TCHAR *ptrn, const TCHAR *rplc)
-{
- size_t lSrc, lPtrn, lRplc;
- TCHAR *tszFound, *tszTail;
-
- lSrc = mir_tstrlen(*src);
- lPtrn = mir_tstrlen(ptrn);
- lRplc = mir_tstrlen(rplc);
- if (lPtrn && lSrc && lSrc >= lPtrn && (tszFound = _tcsstr(*src, ptrn)) != NULL) {
- if (lRplc > lPtrn)
- *src = (TCHAR*) mir_realloc((void*) * src,
- sizeof(TCHAR) * (lSrc + lRplc - lPtrn + 1));
- if (tszTail = (TCHAR*) mir_alloc(sizeof(TCHAR) *
- (lSrc - (tszFound - *src) - lPtrn + 1))) {
- /* save tail */
- _tcscpy(tszTail, tszFound + lPtrn);
- /* write replacement string */
- _tcscpy(tszFound, rplc);
- /* write tail */
- _tcscpy(tszFound + lRplc, tszTail);
- mir_free((void*) tszTail);
- }
- }
- return *src;
-}
-
/*
* replace pattern `ptrn' with the string `rplc' in string `src',
* `src' is supposed to be `n' character long (or no checking is done if n < 0).
@@ -786,7 +759,6 @@ char* Log_CreateRtfHeader(MODULEINFO *mi)
static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
{
- int me = 0;
LOGINFO *lin = streamData->lin;
MODULEINFO *mi = pci->MM_FindModule(streamData->si->pszModule);
@@ -954,7 +926,7 @@ static DWORD CALLBACK Log_StreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
return 0;
}
-void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedraw, bool bPhaseTwo)
+void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedraw)
{
CHARRANGE oldsel, sel, newsel;
POINT point = {0};
diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp
index 2f1517a33e..0256e0e614 100644
--- a/plugins/TabSRMM/src/chat/main.cpp
+++ b/plugins/TabSRMM/src/chat/main.cpp
@@ -42,14 +42,6 @@ static void OnAddLog(SESSION_INFO *si, int isOk)
SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0);
}
-static void OnGetLogName(SESSION_INFO *si, LPCTSTR ptszParsedName)
-{
- if (!PathIsAbsoluteT(ptszParsedName))
- mir_sntprintf(si->pszLogFileName, SIZEOF(si->pszLogFileName), _T("%s%s"), M.getChatLogPath(), ptszParsedName);
- else
- _tcsncpy_s(si->pszLogFileName, ptszParsedName, _TRUNCATE);
-}
-
static void OnCreateSession(SESSION_INFO *si, MODULEINFO *mi)
{
Chat_SetFilters(si);
@@ -122,7 +114,7 @@ static void OnChangeNick(SESSION_INFO *si)
}
}
-static void OnSetStatus(SESSION_INFO *si, int wStatus)
+static void OnSetStatus(SESSION_INFO *si, int)
{
PostMessage(si->hWnd, GC_FIXTABICONS, 0, 0);
}
@@ -205,7 +197,7 @@ static void OnLoadSettings()
void Chat_ModulesLoaded()
{
- g_Settings.hIconOverlay = LoadIconEx(IDI_OVERLAY, "overlay", 16, 16);
+ g_Settings.hIconOverlay = LoadIconEx("overlay");
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/chat/message.cpp b/plugins/TabSRMM/src/chat/message.cpp
index afc1503f53..fd20f7e7a5 100644
--- a/plugins/TabSRMM/src/chat/message.cpp
+++ b/plugins/TabSRMM/src/chat/message.cpp
@@ -83,7 +83,7 @@ static int ReadInteger(const char* p, int* result)
TCHAR* Chat_DoRtfToTags(char* pszText, SESSION_INFO *si)
{
- int i, iRemoveChars, cp = CP_ACP;
+ int i, iRemoveChars;
char InsertThis[50];
BOOL bJustRemovedRTF = TRUE;
BOOL bTextHasStarted = FALSE;
diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp
index ff9945c390..819d0e5041 100644
--- a/plugins/TabSRMM/src/chat/muchighlight.cpp
+++ b/plugins/TabSRMM/src/chat/muchighlight.cpp
@@ -282,8 +282,6 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
*/
INT_PTR CALLBACK CMUCHighlight::dlgProcAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- UINT uCmd = ::GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
switch(msg) {
case WM_INITDIALOG:
{
@@ -319,8 +317,6 @@ INT_PTR CALLBACK CMUCHighlight::dlgProcAdd(HWND hwndDlg, UINT msg, WPARAM wParam
case WM_CTLCOLORSTATIC:
{
HWND hwndChild = (HWND)lParam;
- UINT id = ::GetDlgCtrlID(hwndChild);
-
if (hwndChild == ::GetDlgItem(hwndDlg, IDC_ADDHIGHLIGHTTITLE))
::SetTextColor((HDC)wParam, RGB(60, 60, 150));
::SetBkColor((HDC)wParam, ::GetSysColor(COLOR_WINDOW));
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index d4fb1228dc..10581f86e9 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -288,57 +288,7 @@ static void SaveBranch(HWND hwndTree, branch_t *branch, int nValues)
}
}
-static void CheckHeading(HWND hwndTree, HTREEITEM hHeading)
-{
- if (hHeading == 0)
- return;
-
- BOOL bChecked = TRUE;
-
- TVITEM tvi;
- tvi.mask = TVIF_HANDLE | TVIF_STATE;
- tvi.hItem = TreeView_GetNextItem(hwndTree, hHeading, TVGN_CHILD);
- while (tvi.hItem && bChecked) {
- if (tvi.hItem != branch1[0].hItem && tvi.hItem != branch1[1].hItem) {
- TreeView_GetItem(hwndTree, &tvi);
- if (((tvi.state&TVIS_STATEIMAGEMASK) >> 12 == 2))
- bChecked = FALSE;
- }
- tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
- }
- tvi.stateMask = TVIS_STATEIMAGEMASK;
- tvi.state = INDEXTOSTATEIMAGEMASK(1); //bChecked ? 3 : 2);
- tvi.hItem = hHeading;
- TreeView_SetItem(hwndTree, &tvi);
-}
-
-static void CheckBranches(HWND hwndTree, HTREEITEM hHeading)
-{
- if (hHeading == 0)
- return;
-
- BOOL bChecked = TRUE;
-
- TVITEM tvi;
- tvi.mask = TVIF_HANDLE | TVIF_STATE;
- tvi.hItem = hHeading;
- TreeView_GetItem(hwndTree, &tvi);
- if (((tvi.state&TVIS_STATEIMAGEMASK) >> 12 == 3) || ((tvi.state & TVIS_STATEIMAGEMASK) >> 12 == 1))
- bChecked = FALSE;
-
- tvi.stateMask = TVIS_STATEIMAGEMASK;
- tvi.state = INDEXTOSTATEIMAGEMASK(bChecked ? 2 : 1);
- TreeView_SetItem(hwndTree, &tvi);
- tvi.hItem = TreeView_GetNextItem(hwndTree, hHeading, TVGN_CHILD);
- while (tvi.hItem) {
- tvi.state = INDEXTOSTATEIMAGEMASK(bChecked ? 3 : 2);
- if (tvi.hItem != branch1[0].hItem && tvi.hItem != branch1[1].hItem)
- TreeView_SetItem(hwndTree, &tvi);
- tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
- }
-}
-
-static INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData)
+static INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM)
{
char szDir[MAX_PATH];
switch (uMsg) {
@@ -397,7 +347,7 @@ void Chat_AddIcons(void)
* get icon by name from the core icon library service
*/
-HICON LoadIconEx(int iIndex, char * pszIcoLibName, int iX, int iY)
+HICON LoadIconEx(char *pszIcoLibName)
{
char szTemp[256];
mir_snprintf(szTemp, SIZEOF(szTemp), "chat_%s", pszIcoLibName);
@@ -905,9 +855,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
case WM_NOTIFY:
if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) {
- TCHAR *p2 = NULL;
- char *pszText = NULL;
- TCHAR *ptszPath = NULL;
+ char *pszText = NULL;
int iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY));
if (iLen > 0) {
@@ -1029,7 +977,7 @@ static UINT _eventorder[] =
* @return
*/
-INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM, LPARAM lParam)
{
switch (uMsg) {
case WM_INITDIALOG:
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index d7af61c6bf..9de06558f3 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -35,7 +35,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
return 0;
if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
- if ((pContainer = FindMatchingContainer(_T("default"), hContact)) == NULL) {
+ if ((pContainer = FindMatchingContainer(_T("default"))) == NULL) {
TCHAR szName[CONTAINER_NAMELEN + 1];
mir_sntprintf(szName, SIZEOF(szName), _T("default"));
if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_CLONED, hContact)) == NULL)
@@ -153,7 +153,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
return hwndNew; // return handle of the new dialog
}
-void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground)
+void ShowRoom(SESSION_INFO *si, WPARAM, BOOL)
{
if (si == NULL)
return;
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index 275036ead9..3c8e9d4c9e 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -92,7 +92,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce)
return TRUE;
}
-int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...)
+int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR*, COLORREF crBkg, const TCHAR* fmt, ...)
{
POPUPDATAT pd = { 0 };
va_list marker;
@@ -110,7 +110,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa
if (hIcon)
pd.lchIcon = hIcon;
else
- pd.lchIcon = LoadIconEx(IDI_CHANMGR, "window", 0, 0);
+ pd.lchIcon = LoadIconEx("window");
PROTOACCOUNT *pa = ProtoGetAccount(pszProtoName);
mir_sntprintf(pd.lptzContactName, SIZEOF(pd.lptzContactName), _T("%s - %s"),
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 1f320d304a..aa3a51607e 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -51,75 +51,7 @@ struct MESSAGESUBDATA
SESSION_INFO *lastSession;
};
-static const CLSID IID_ITextDocument= { 0x8CC497C0,0xA1DF,0x11CE, { 0x80,0x98, 0x00,0xAA, 0x00,0x47,0xBE,0x5D} };
-
-static void Chat_SetMessageLog(TWindowData *dat)
-{
- unsigned int iLogMode = M.GetByte(CHAT_MODULE, "useIEView", 0);
-
- if (iLogMode == WANT_IEVIEW_LOG && dat->hwndIEView == 0) {
- IEVIEWWINDOW ieWindow;
- IEVIEWEVENT iee;
-
- //CheckAndDestroyHPP(dat);
- memset(&ieWindow, 0, sizeof(ieWindow));
- memset(&iee, 0, sizeof(iee));
- ieWindow.cbSize = sizeof(ieWindow);
- ieWindow.iType = IEW_CREATE;
- ieWindow.dwFlags = 0;
- ieWindow.dwMode = IEWM_TABSRMM;
- ieWindow.parent = dat->hwnd;
- ieWindow.x = 0;
- ieWindow.y = 0;
- ieWindow.cx = 200;
- ieWindow.cy = 300;
- CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
- dat->hwndIEView = ieWindow.hwnd;
-
- memset(&iee, 0, sizeof(iee));
- iee.cbSize = sizeof(iee);
- iee.iType = IEE_CLEAR_LOG;
- iee.hwnd = dat->hwndIEView;
- iee.hContact = dat->hContact;
- iee.codepage = dat->codePage;
-
- SESSION_INFO *si = dat->si;
-
- iee.pszProto = si->pszModule;
- CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&iee);
-
- Utils::showDlgControl(dat->hwnd, IDC_CHAT_LOG, SW_HIDE);
- Utils::enableDlgControl(dat->hwnd, IDC_CHAT_LOG, FALSE);
- }
- else if (iLogMode == WANT_HPP_LOG && dat->hwndHPP == 0) {
- IEVIEWWINDOW ieWindow;
-
- memset(&ieWindow, 0, sizeof(ieWindow));
- //CheckAndDestroyIEView(dat);
- ieWindow.cbSize = sizeof(IEVIEWWINDOW);
- ieWindow.iType = IEW_CREATE;
- ieWindow.dwFlags = 0;
- ieWindow.dwMode = IEWM_MUCC;
- ieWindow.parent = dat->hwnd;
- ieWindow.x = 0;
- ieWindow.y = 0;
- ieWindow.cx = 10;
- ieWindow.cy = 10;
- CallService(MS_HPP_EG_WINDOW, 0, (LPARAM)&ieWindow);
- dat->hwndHPP = ieWindow.hwnd;
- Utils::showDlgControl(dat->hwnd, IDC_CHAT_LOG, SW_HIDE);
- Utils::enableDlgControl(dat->hwnd, IDC_CHAT_LOG, FALSE);
- }
- else {
- if (iLogMode != WANT_IEVIEW_LOG)
- CheckAndDestroyIEView(dat);
- Utils::showDlgControl(dat->hwnd, IDC_CHAT_LOG, SW_SHOW);
- Utils::enableDlgControl(dat->hwnd, IDC_CHAT_LOG, TRUE);
- dat->hwndIEView = 0;
- dat->hwndIWebBrowserControl = 0;
- dat->hwndHPP = 0;
- }
-}
+const CLSID IID_ITextDocument = { 0x8CC497C0, 0xA1DF, 0x11CE, { 0x80, 0x98, 0x00, 0xAA, 0x00, 0x47, 0xBE, 0x5D } };
/*
* checking if theres's protected text at the point
@@ -385,7 +317,6 @@ static int RoomWndResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc)
rc.bottom = rc.top = rc.left = rc.right = 0;
GetClientRect(hwndDlg, &rcTabs);
- int TabHeight = rcTabs.bottom - rcTabs.top;
if (dat->bIsAutosizingInput)
Utils::showDlgControl(hwndDlg, IDC_SPLITTERY, SW_HIDE);
@@ -620,7 +551,6 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
{
MODULEINFO *mi = pci->MM_FindModule(Parentsi->pszModule);
CHARRANGE sel, all = { 0, -1};
- int iPrivateBG = M.GetByte(mwdat->hContact, "private_bg", 0);
int idFrom = IDC_CHAT_MESSAGE;
POINT pt;
@@ -1120,7 +1050,7 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
case WM_CLOSE:
if (wParam == 1 && lParam == 1) {
int iFlags = 0, i;
- DWORD dwMask = 0, dwFlags = 0;
+ DWORD dwMask = 0;
for (i=0; i < SIZEOF(_eventorder); i++) {
int result = IsDlgButtonChecked(hwndDlg, IDC_1 + i);
@@ -1343,7 +1273,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
* show the userinfo - tooltip.
*/
-static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESSION_INFO * parentdat)
+static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *parentdat)
{
static int currentHovered = -1;
static HWND hwndToolTip = NULL;
@@ -1606,7 +1536,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwndParent, GWLP_USERDATA);
SESSION_INFO *parentdat = dat->si;
- int height;
+ int height = 0;
TVHITTESTINFO hti;
hti.pt.x = (short) LOWORD(lParam);
hti.pt.y = (short) HIWORD(lParam);
@@ -1715,7 +1645,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
if (nItemUnderMouse != -1)
SetTimer(hwnd, 1, 450, 0);
}
- else ProcessNickListHovering(hwnd, (int)nItemUnderMouse, &pt, parentdat);
+ else ProcessNickListHovering(hwnd, (int)nItemUnderMouse, parentdat);
}
else {
if (M.GetByte("adv_TipperTooltip", 1) && ServiceExists("mToolTip/HideTip")) {
@@ -1725,7 +1655,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
isToolTip = FALSE;
}
}
- else ProcessNickListHovering(hwnd, -1, &pt, NULL);
+ else ProcessNickListHovering(hwnd, -1, NULL);
}
}
break;
@@ -1790,7 +1720,7 @@ int GetTextPixelSize(TCHAR* pszText, HFONT hFont, bool bWidth)
HFONT hOldFont = (HFONT)SelectObject(hdc, hFont);
RECT rc = {0};
- int i = DrawText(hdc, pszText , -1, &rc, DT_CALCRECT);
+ DrawText(hdc, pszText , -1, &rc, DT_CALCRECT);
SelectObject(hdc, hOldFont);
ReleaseDC(NULL, hdc);
@@ -1960,7 +1890,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
break;
case DM_LOADBUTTONBARICONS:
- BB_UpdateIcons(hwndDlg, dat);
+ BB_UpdateIcons(hwndDlg);
return 0;
case GC_SETWNDPROPS:
@@ -1999,7 +1929,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
}
TCHAR szTemp[100];
- HICON hIcon;
+ HICON hIcon = 0;
switch (si->iType) {
case GCW_CHATROOM:
@@ -2017,7 +1947,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
break;
case GCW_SERVER:
mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%s: Server"), szNick);
- hIcon = LoadIconEx(IDI_CHANMGR, "window", 16, 16);
+ hIcon = LoadIconEx("window");
break;
}
@@ -2160,10 +2090,10 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if ((si->iType != GCW_CHATROOM && si->iType != GCW_PRIVMESS) || !si->bFilterEnabled || (si->iLogFilterFlags&pLog->iType) != 0)
index++;
}
- Log_StreamInEvent(hwndDlg, pLog, si, TRUE, FALSE);
+ Log_StreamInEvent(hwndDlg, pLog, si, TRUE);
mir_forkthread(phase2, si);
}
- else Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE, FALSE);
+ else Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE);
}
else SendMessage(hwndDlg, GC_EVENT_CONTROL + WM_USER + 500, WINDOW_CLEARLOG, 0);
break;
@@ -2171,13 +2101,13 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case GC_REDRAWLOG2:
si->LastTime = 0;
if (si->pLog)
- Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE, FALSE);
+ Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE);
break;
case GC_REDRAWLOG3:
si->LastTime = 0;
if (si->pLog)
- Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE, TRUE);
+ Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE);
break;
case GC_ADDLOG:
@@ -2196,7 +2126,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
}
if (si->pLogEnd)
- Log_StreamInEvent(hwndDlg, si->pLog, si, FALSE, FALSE);
+ Log_StreamInEvent(hwndDlg, si->pLog, si, FALSE);
else
SendMessage(hwndDlg, GC_EVENT_CONTROL + WM_USER + 500, WINDOW_CLEARLOG, 0);
}
@@ -2444,7 +2374,7 @@ LABEL_SHOWWINDOW:
if (si->iSplitterY > rc.bottom - rc.top - DPISCALEY_S(40))
si->iSplitterY = rc.bottom - rc.top - DPISCALEY_S(40);
g_Settings.iSplitterY = si->iSplitterY;
- CSkin::UpdateToolbarBG(dat, RDW_ALLCHILDREN);
+ CSkin::UpdateToolbarBG(dat);
SendMessage(dat->hwnd, WM_SIZE, 0, 0);
}
else if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_PANELSPLITTER)) {
@@ -2626,8 +2556,6 @@ LABEL_SHOWWINDOW:
if (iCharIndex < 0)
break;
- int iLineIndex = SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_LOG), EM_EXLINEFROMCHAR, 0, iCharIndex);
- int iChars = SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_LOG), EM_LINEINDEX, iLineIndex, 0);
int start = SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_LOG), EM_FINDWORDBREAK, WB_LEFT, iCharIndex);
int end = SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_LOG), EM_FINDWORDBREAK, WB_RIGHT, iCharIndex);
@@ -2819,7 +2747,6 @@ LABEL_SHOWWINDOW:
return TRUE;
}
else if (msg == WM_LBUTTONUP) {
- USERINFO *ui = si->pUsers;
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_EXGETSEL, 0, (LPARAM)&chr);
size_t bufSize = mir_tstrlen(tr.lpstrText) + mir_tstrlen(tszAplTmpl) + 3;
tszTmp = tszAppeal = (TCHAR*)mir_alloc(bufSize * sizeof(TCHAR));
@@ -3203,7 +3130,6 @@ LABEL_SHOWWINDOW:
UINT item_ids[3] = {ID_EXTBKUSERLIST, ID_EXTBKHISTORY, ID_EXTBKINPUTAREA};
UINT ctl_ids[3] = {IDC_LIST, IDC_CHAT_LOG, IDC_CHAT_MESSAGE};
bool bAero = M.isAero();
- bool bInfoPanel = dat->Panel->isActive();
HANDLE hbp = 0;
HDC hdcMem = 0;
HBITMAP hbm, hbmOld;
@@ -3212,8 +3138,10 @@ LABEL_SHOWWINDOW:
LONG cx = rcClient.right - rcClient.left;
LONG cy = rcClient.bottom - rcClient.top;
- if (CMimAPI::m_haveBufferedPaint)
+ if (CMimAPI::m_haveBufferedPaint) {
hbp = CSkin::InitiateBufferedPaint(hdc, rcClient, hdcMem);
+ hbm = hbmOld = 0;
+ }
else {
hdcMem = CreateCompatibleDC(hdc);
hbm = CSkin::CreateAeroCompatibleBitmap(rcClient, hdc);
@@ -3276,7 +3204,7 @@ LABEL_SHOWWINDOW:
case WM_PAINT:
{
PAINTSTRUCT ps;
- HDC hdc = BeginPaint(hwndDlg, &ps);
+ BeginPaint(hwndDlg, &ps);
EndPaint(hwndDlg, &ps);
}
return 0;
@@ -3508,7 +3436,7 @@ LABEL_SHOWWINDOW:
if (lParam)
CB_DestroyButton(hwndDlg, dat, (DWORD)wParam, (DWORD)lParam);
else
- CB_DestroyAllButtons(hwndDlg, dat);
+ CB_DestroyAllButtons(hwndDlg);
break;
case DM_CONFIGURETOOLBAR: