diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-30 09:09:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-30 09:09:46 +0000 |
commit | 5871d7988221ba4335469d4961c6507bd8e52983 (patch) | |
tree | 2593756d974cd672b9930a316f891ade11a1a956 /plugins/TabSRMM | |
parent | 3c1054c6e0b2b8b505cb13d720256bc8b0386721 (diff) |
- custom avatar processing removed completely, now avatar control takes charge for everything;
- avatar switching fixed in the info panel;
- unneeded AvatarChanged handler removed;
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@9989 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/functions.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 29 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 212 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 34 | ||||
-rw-r--r-- | plugins/TabSRMM/src/userprefs.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/version.h | 6 |
8 files changed, 66 insertions, 227 deletions
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h index f6572dca97..e9ea3c884a 100644 --- a/plugins/TabSRMM/src/functions.h +++ b/plugins/TabSRMM/src/functions.h @@ -33,7 +33,6 @@ #ifndef _TABSRMM_FUNCTIONS_H
#define _TABSRMM_FUNCTIONS_H
-int AvatarChanged(WPARAM wParam, LPARAM lParam);
int MyAvatarChanged(WPARAM wParam, LPARAM lParam);
int IconsChanged(WPARAM wParam, LPARAM lParam);
int IcoLibIconsChanged(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index af15b69eac..19df91547a 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -270,7 +270,6 @@ void CGlobals::hookSystemEvents() HookEvent(ME_CLIST_PREBUILDCONTACTMENU, CMimAPI::PrebuildContactMenu);
HookEvent(ME_SKIN2_ICONSCHANGED, ::IcoLibIconsChanged);
- HookEvent(ME_AV_AVATARCHANGED, ::AvatarChanged);
HookEvent(ME_AV_MYAVATARCHANGED, ::MyAvatarChanged);
}
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 6d667bd671..1adf6eaf6f 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -174,7 +174,7 @@ void CInfoPanel::showHide() const HWND hwndDlg = m_dat->hwnd;
if (!m_isChat) {
- ::ShowWindow(m_dat->hwndPanelPicParent, m_active && m_dat->hwndPanelPic ? SW_SHOW : SW_HIDE);
+ ::ShowWindow(m_dat->hwndPanelPicParent, (m_active && m_dat->hwndPanelPic) ? SW_SHOW : SW_HIDE);
m_dat->iRealAvatarHeight = 0;
::AdjustBottomAvatarDisplay(m_dat);
@@ -1015,17 +1015,15 @@ LRESULT CALLBACK CInfoPanel::avatarParentSubclass(HWND hwnd, UINT msg, WPARAM wP HDC dcWin = (HDC)wParam;
if (M.isAero()) {
- HDC hdc;
- HBITMAP hbm, hbmOld;
- LONG cx = rcItem.right - rcItem.left;
- LONG cy = rcItem.bottom - rcItem.top;
+ LONG cx = rcItem.right - rcItem.left;
+ LONG cy = rcItem.bottom - rcItem.top;
rc.left -= 3; rc.right += 3;
rc.bottom += 2;
- hdc = CreateCompatibleDC(dcWin);
- hbm = CSkin::CreateAeroCompatibleBitmap(rc, dcWin);
- hbmOld = (HBITMAP)SelectObject(hdc, hbm);
+ HDC hdc = CreateCompatibleDC(dcWin);
+ HBITMAP hbm = CSkin::CreateAeroCompatibleBitmap(rc, dcWin);
+ HBITMAP hbmOld = (HBITMAP)SelectObject(hdc, hbm);
if (CSkin::m_pCurrentAeroEffect == 0)
FillRect(hdc, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH));
@@ -1049,17 +1047,12 @@ LRESULT CALLBACK CInfoPanel::avatarParentSubclass(HWND hwnd, UINT msg, WPARAM wP }
if (CSkin::m_bAvatarBorderType == 1) {
- HRGN clipRgn;
+ RECT rcPic;
+ GetClientRect(dat->hwndPanelPic, &rcPic);
+ LONG ix = ((rcItem.right - rcItem.left) - rcPic.right) / 2 - 1;
+ LONG iy = ((rcItem.bottom - rcItem.top) - rcPic.bottom) / 2 - 1;
- if (dat->hwndPanelPic) {
- RECT rcPic;
- GetClientRect(dat->hwndPanelPic, &rcPic);
- LONG ix = ((rcItem.right - rcItem.left) - rcPic.right) / 2 - 1;
- LONG iy = ((rcItem.bottom - rcItem.top) - rcPic.bottom) / 2 - 1;
-
- clipRgn = CreateRectRgn(ix, iy, ix + rcPic.right + 2, iy + rcPic.bottom + 2);
- }
- else clipRgn = CreateRectRgn(rcItem.left, rcItem.top, rcItem.right, rcItem.bottom);
+ HRGN clipRgn = CreateRectRgn(ix, iy, ix + rcPic.right + 2, iy + rcPic.bottom + 2);
HBRUSH hbr = CreateSolidBrush(CSkin::m_avatarBorderClr);
FrameRgn(dcWin, clipRgn, hbr, 1, 1);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 9537721493..ee9471ab64 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1639,12 +1639,10 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP rc.right = cx;
rc.bottom--;
- if (dat->bShowInfoAvatar && dat->hwndPanelPic) {
+ if (dat->bShowInfoAvatar) {
SetWindowPos(dat->hwndPanelPicParent, HWND_TOP, rc.left - 2, rc.top, rc.right - rc.left, (rc.bottom - rc.top) + 1, 0);
ShowWindow(dat->hwndPanelPicParent, (dat->panelWidth == -1) || !dat->Panel->isActive() ? SW_HIDE : SW_SHOW);
}
- else if (dat->hwndPanelPicParent)
- ShowWindow(dat->hwndPanelPicParent, SW_HIDE);
dat->rcPic = rc;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 7cefbf6f5f..b6faa067d4 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -592,14 +592,9 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) // panel and contact is shown, reloads contact's avatar -> panel
// user avatar -> bottom picture
Utils::setAvatarContact(dat->hwndPanelPic, dat->hContact);
- if (dat->hwndContactPic)
- SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
- }
- else {
- //show only user picture(contact is unaccessible)
- if (dat->hwndContactPic)
- SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
}
+
+ SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
}
else {
dat->bShowInfoAvatar = false;
@@ -628,12 +623,14 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) dat->bShowAvatar = hideOverride == 1 ? 1 : dat->bShowAvatar;
// reloads avatars
- if (dat->bShowAvatar)
- if (dat->hwndPanelPic) // shows contact or user picture, depending on panel visibility
- SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
-
- if (dat->hwndContactPic)
- Utils::setAvatarContact(dat->hwndContactPic, dat->hContact);
+ if (!dat->bShowAvatar)
+ return false;
+
+ if (dat->hwndPanelPic) { // shows contact or user picture, depending on panel visibility
+ SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
+ Utils::setAvatarContact(dat->hwndPanelPic, dat->hContact);
+ }
+ else Utils::setAvatarContact(dat->hwndContactPic, dat->hContact);
}
return dat->bShowAvatar;
}
@@ -719,34 +716,32 @@ TCHAR* TSAPI QuoteText(const TCHAR *text, int charsPerLine, int removeExistingQu void TSAPI AdjustBottomAvatarDisplay(TWindowData *dat)
{
- if (dat) {
- bool bInfoPanel = dat->Panel->isActive();
- HWND hwndDlg = dat->hwnd;
-
- HBITMAP hbm = (bInfoPanel && dat->pContainer->avatarMode != 3) ? dat->hOwnPic : (dat->ace ? dat->ace->hbmPic : PluginConfig.g_hbmUnknown);
- if (hbm) {
- dat->bShowAvatar = GetAvatarVisibility(hwndDlg, dat);
- if (dat->dynaSplitter == 0 || dat->splitterY == 0)
- LoadSplitter(dat);
- dat->dynaSplitter = dat->splitterY - DPISCALEY_S(34);
- DM_RecalcPictureSize(dat);
- Utils::showDlgControl(hwndDlg, IDC_CONTACTPIC, dat->bShowAvatar ? SW_SHOW : SW_HIDE);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_CONTACTPIC), NULL, TRUE);
- }
- else {
- dat->bShowAvatar = GetAvatarVisibility(hwndDlg, dat);
- Utils::showDlgControl(hwndDlg, IDC_CONTACTPIC, dat->bShowAvatar ? SW_SHOW : SW_HIDE);
- dat->pic.cy = dat->pic.cx = DPISCALEY_S(60);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_CONTACTPIC), NULL, TRUE);
- }
+ if (!dat)
+ return;
+
+ HWND hwndDlg = dat->hwnd;
+ dat->bShowAvatar = GetAvatarVisibility(hwndDlg, dat);
+
+ bool bInfoPanel = dat->Panel->isActive();
+ HBITMAP hbm = (bInfoPanel && dat->pContainer->avatarMode != 3) ? dat->hOwnPic : (dat->ace ? dat->ace->hbmPic : PluginConfig.g_hbmUnknown);
+ if (hbm) {
+ if (dat->dynaSplitter == 0 || dat->splitterY == 0)
+ LoadSplitter(dat);
+ dat->dynaSplitter = dat->splitterY - DPISCALEY_S(34);
+ DM_RecalcPictureSize(dat);
+ Utils::showDlgControl(hwndDlg, IDC_CONTACTPIC, dat->bShowAvatar ? SW_SHOW : SW_HIDE);
+ InvalidateRect(GetDlgItem(hwndDlg, IDC_CONTACTPIC), NULL, TRUE);
+ }
+ else {
+ Utils::showDlgControl(hwndDlg, IDC_CONTACTPIC, dat->bShowAvatar ? SW_SHOW : SW_HIDE);
+ dat->pic.cy = dat->pic.cx = DPISCALEY_S(60);
+ InvalidateRect(GetDlgItem(hwndDlg, IDC_CONTACTPIC), NULL, TRUE);
}
}
void TSAPI ShowPicture(TWindowData *dat, BOOL showNewPic)
{
- DBVARIANT dbv = { 0 };
- RECT rc;
- HWND hwndDlg = dat->hwnd;
+ HWND hwndDlg = dat->hwnd;
if (!dat->Panel->isActive())
dat->pic.cy = dat->pic.cx = DPISCALEY_S(60);
@@ -767,6 +762,8 @@ void TSAPI ShowPicture(TWindowData *dat, BOOL showNewPic) dat->bShowAvatar = dat->bShowAvatar ? 0 : 1;
db_set_b(dat->hContact, SRMSGMOD_T, "MOD_ShowPic", (BYTE)dat->bShowAvatar);
}
+
+ RECT rc;
GetWindowRect(GetDlgItem(hwndDlg, IDC_CONTACTPIC), &rc);
if (dat->minEditBoxSize.cy + DPISCALEY_S(3) > dat->splitterY)
SendMessage(hwndDlg, DM_SPLITTERMOVED, (WPARAM)rc.bottom - dat->minEditBoxSize.cy, (LPARAM)GetDlgItem(hwndDlg, IDC_SPLITTER));
@@ -863,7 +860,6 @@ char* TSAPI Message_GetFromStream(HWND hwndRtf, const TWindowData *dat, DWORD dw BOOL TSAPI DoRtfToTags(TCHAR * pszText, const TWindowData *dat)
{
- TCHAR * p1;
BOOL bJustRemovedRTF = TRUE;
BOOL bTextHasStarted = FALSE;
static int inColor = 0;
@@ -881,7 +877,7 @@ BOOL TSAPI DoRtfToTags(TCHAR * pszText, const TWindowData *dat) Utils::CreateColorMap(pszText);
// scan the file for rtf commands and remove or parse them
inColor = 0;
- p1 = _tcsstr(pszText, _T("\\pard"));
+ TCHAR *p1 = _tcsstr(pszText, _T("\\pard"));
if (!p1)
return FALSE;
@@ -1140,41 +1136,6 @@ UINT TSAPI GetIEViewMode(HWND hwndDlg, MCONTACT hContact) return iWantHPP ? WANT_HPP_LOG : (iWantIEView ? WANT_IEVIEW_LOG : 0);
}
-#if defined(__FEAT_DEPRECATED_DYNAMICSWITCHLOGVIEWER)
-static void CheckAndDestroyHPP(TWindowData *dat)
-{
- if (dat->hwndHPP) {
- IEVIEWWINDOW ieWindow;
- ieWindow.cbSize = sizeof(IEVIEWWINDOW);
- ieWindow.iType = IEW_DESTROY;
- ieWindow.hwnd = dat->hwndHPP;
- if (dat->oldIEViewProc) {
- SetWindowLongPtr(dat->hwndHPP, GWLP_WNDPROC, (LONG_PTR)dat->oldIEViewProc);
- dat->oldIEViewProc = 0;
- }
- CallService(MS_HPP_EG_WINDOW, 0, (LPARAM)&ieWindow);
- dat->hwndHPP = 0;
- }
-}
-
-void TSAPI CheckAndDestroyIEView(TWindowData *dat)
-{
- if (dat->hwndIEView) {
- IEVIEWWINDOW ieWindow;
- ieWindow.cbSize = sizeof(IEVIEWWINDOW);
- ieWindow.iType = IEW_DESTROY;
- ieWindow.hwnd = dat->hwndIEView;
- if (dat->oldIEViewProc){
- SetWindowLongPtr(dat->hwndIEView, GWLP_WNDPROC, (LONG_PTR)dat->oldIEViewProc);
- dat->oldIEViewProc =0;
- }
- CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
- dat->oldIEViewProc = 0;
- dat->hwndIEView = 0;
- }
-}
-#endif
-
void TSAPI SetMessageLog(TWindowData *dat)
{
HWND hwndDlg = dat->hwnd;
@@ -1184,9 +1145,6 @@ void TSAPI SetMessageLog(TWindowData *dat) IEVIEWWINDOW ieWindow;
ZeroMemory(&ieWindow, sizeof(ieWindow));
-#if defined(__FEAT_DEPRECATED_DYNAMICSWITCHLOGVIEWER)
- CheckAndDestroyHPP(dat);
-#endif
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_CREATE;
ieWindow.dwFlags = 0;
@@ -1203,9 +1161,6 @@ void TSAPI SetMessageLog(TWindowData *dat) }
else if (iLogMode == WANT_HPP_LOG && dat->hwndHPP == 0) {
IEVIEWWINDOW ieWindow;
-#if defined(__FEAT_DEPRECATED_DYNAMICSWITCHLOGVIEWER)
- CheckAndDestroyIEView(dat);
-#endif
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_CREATE;
ieWindow.dwFlags = 0;
@@ -1220,52 +1175,8 @@ void TSAPI SetMessageLog(TWindowData *dat) Utils::showDlgControl(hwndDlg, IDC_LOG, SW_HIDE);
Utils::enableDlgControl(hwndDlg, IDC_LOG, FALSE);
}
- else {
-#if defined(__FEAT_DEPRECATED_DYNAMICSWITCHLOGVIEWER)
- if (iLogMode != WANT_IEVIEW_LOG)
- CheckAndDestroyIEView(dat);
- if (iLogMode != WANT_HPP_LOG)
- CheckAndDestroyHPP(dat);
- Utils::showDlgControl(hwndDlg, IDC_LOG, SW_SHOW);
- Utils::enableDlgControl(hwndDlg, IDC_LOG, TRUE);
- dat->hwndIEView = 0;
- dat->hwndIWebBrowserControl = 0;
- dat->hwndHPP = 0;
-#endif
- }
}
-#if defined(__FEAT_DEPRECATED_DYNAMICSWITCHLOGVIEWER)
-void TSAPI SwitchMessageLog(TWindowData *dat, int iMode)
-{
- HWND hwndDlg = dat->hwnd;
-
- if (iMode) { // switch from rtf to IEview or hpp
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
- Utils::enableDlgControl(hwndDlg, IDC_LOG, FALSE);
- Utils::showDlgControl(hwndDlg, IDC_LOG, SW_HIDE);
- SetMessageLog(dat);
- } else // switch from IEView or hpp to rtf
- SetMessageLog(dat);
-
- SetDialogToType(hwndDlg);
- SendMessage(hwndDlg, DM_REMAKELOG, 0, 0);
- SendMessage(hwndDlg, WM_SIZE, 0, 0);
-
- if (dat->hwndIEView) {
- if (M.GetByte("subclassIEView", 0)&&dat->oldIEViewProc == 0) {
- WNDPROC wndProc = (WNDPROC)SetWindowLongPtr(dat->hwndIEView, GWLP_WNDPROC, (LONG_PTR)IEViewSubclassProc);
- dat->oldIEViewProc = wndProc;
- }
- } else if (dat->hwndHPP) {
- if (dat->oldIEViewProc == 0) {
- WNDPROC wndProc = (WNDPROC)SetWindowLongPtr(dat->hwndHPP, GWLP_WNDPROC, (LONG_PTR)HPPKFSubclassProc);
- dat->oldIEViewProc = wndProc;
- }
- }
-}
-#endif
-
void TSAPI FindFirstEvent(TWindowData *dat)
{
int historyMode = db_get_b(dat->hContact, SRMSGMOD, SRMSGSET_LOADHISTORY, -1);
@@ -1480,23 +1391,23 @@ void TSAPI LoadContactAvatar(TWindowData *dat) dat->ace = Utils::loadAvatarFromAVS(dat->bIsMeta ? db_mc_getSrmmSub(dat->hContact) : dat->hContact);
+ BITMAP bm;
+ if (dat->ace && dat->ace->hbmPic)
+ GetObject(dat->ace->hbmPic, sizeof(bm), &bm);
+ else if (dat->ace == NULL)
+ GetObject(PluginConfig.g_hbmUnknown, sizeof(bm), &bm);
+ else
+ return;
+
+ AdjustBottomAvatarDisplay(dat);
+ CalcDynamicAvatarSize(dat, &bm);
+
if (!dat->Panel->isActive() || dat->pContainer->avatarMode == 3) {
- BITMAP bm;
dat->iRealAvatarHeight = 0;
-
- if (dat->ace && dat->ace->hbmPic) {
- AdjustBottomAvatarDisplay(dat);
- GetObject(dat->ace->hbmPic, sizeof(bm), &bm);
- CalcDynamicAvatarSize(dat, &bm);
- PostMessage(dat->hwnd, WM_SIZE, 0, 0);
- }
- else if (dat->ace == NULL) {
- AdjustBottomAvatarDisplay(dat);
- GetObject(PluginConfig.g_hbmUnknown, sizeof(bm), &bm);
- CalcDynamicAvatarSize(dat, &bm);
- PostMessage(dat->hwnd, WM_SIZE, 0, 0);
- }
+ PostMessage(dat->hwnd, WM_SIZE, 0, 0);
}
+ else if (dat->Panel->isActive())
+ GetAvatarVisibility(dat->hwnd, dat);
}
void TSAPI LoadOwnAvatar(TWindowData *dat)
@@ -1772,30 +1683,9 @@ int TSAPI MsgWindowDrawHandler(WPARAM wParam, LPARAM lParam, TWindowData *dat) rcFrame.top += height_off;
rcFrame.bottom += height_off;
- // prepare border drawing (if avatar is rendered by ACC, the parent control will be responsible for
- // the border, so skip it here)
- if (dat->hwndPanelPic == 0) {
- OffsetRect(&rcClient, -2, 0);
- if (CSkin::m_bAvatarBorderType == 1)
- clipRgn = CreateRectRgn(rcClient.left + rcFrame.left, rcClient.top + rcFrame.top, rcClient.left + rcFrame.right,
- rcClient.top + rcFrame.bottom);
- else if (CSkin::m_bAvatarBorderType == 2) {
- clipRgn = CreateRoundRectRgn(rcClient.left + rcFrame.left, rcClient.top + rcFrame.top, rcClient.left + rcFrame.right + 1,
- rcClient.top + rcFrame.bottom + 1, iRad, iRad);
- SelectClipRgn(dis->hDC, clipRgn);
- }
- }
-
- if (dat->hwndPanelPic) {
- // paint avatar using ACC
- SendMessage(dat->hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, bAero ? TRUE : FALSE);
- SetWindowPos(dat->hwndPanelPic, HWND_TOP, rcFrame.left + border_off, rcFrame.top + border_off,
- rb.max_width, rb.max_height, SWP_SHOWWINDOW | SWP_ASYNCWINDOWPOS | SWP_DEFERERASE | SWP_NOSENDCHANGING);
- }
- else
- GdiAlphaBlend(dis->hDC, rcClient.left + rcFrame.left + border_off, rcClient.top + rcFrame.top + border_off,
- rb.max_width, rb.max_height, hdcMem, 0, 0,
- rb.max_width, rb.max_height, CSkin::m_default_bf);
+ SendMessage(dat->hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, bAero ? TRUE : FALSE);
+ SetWindowPos(dat->hwndPanelPic, HWND_TOP, rcFrame.left + border_off, rcFrame.top + border_off,
+ rb.max_width, rb.max_height, SWP_SHOWWINDOW | SWP_ASYNCWINDOWPOS | SWP_DEFERERASE | SWP_NOSENDCHANGING);
SelectObject(hdcMem, hbmMem);
DeleteDC(hdcMem);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index de04c3fe6f..9225b1d489 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -380,40 +380,6 @@ int MyAvatarChanged(WPARAM wParam, LPARAM lParam) return 0; } -int AvatarChanged(WPARAM wParam, LPARAM lParam) -{ - avatarCacheEntry *ace = (avatarCacheEntry *)lParam; - HWND hwnd = M.FindWindow(wParam); - - if (wParam == 0) { // protocol picture has changed... - M.BroadcastMessage(DM_PROTOAVATARCHANGED, wParam, lParam); - return 0; - } - if (hwnd) { - TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA); - if (dat) { - dat->ace = ace; - if (dat->hTaskbarIcon) - DestroyIcon(dat->hTaskbarIcon); - dat->hTaskbarIcon = 0; - DM_RecalcPictureSize(dat); - if (!dat->bShowAvatar || !dat->bShowInfoAvatar) - GetAvatarVisibility(hwnd, dat); - if (dat->hwndPanelPic) { - dat->panelWidth = -1; // force new size calculations (not for flash avatars) - SendMessage(dat->hwnd, WM_SIZE, 0, 1); - } - dat->panelWidth = -1; // force new size calculations (not for flash avatars) - RedrawWindow(dat->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN); - SendMessage(dat->hwnd, WM_SIZE, 0, 1); - ShowPicture(dat, TRUE); - dat->dwFlagsEx |= MWF_EX_AVATARCHANGED; - dat->pContainer->SideBar->updateSession(dat); - } - } - return 0; -} - int IcoLibIconsChanged(WPARAM wParam, LPARAM lParam) { LoadFromIconLib(); diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index bd5f5ee6b3..65b1a968af 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -538,12 +538,6 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (dat) {
DWORD dwOldFlags = (dat->dwFlags & MWF_LOG_ALL);
SetDialogToType(hwnd);
-#if defined(__FEAT_DEPRECATED_DYNAMICSWITCHLOGVIEWER)
- if (dwActionToTake & UPREF_ACTION_SWITCHLOGVIEWER) {
- unsigned int mode = GetIEViewMode(hwndDlg, dat->hContact);
- SwitchMessageLog(dat, mode);
- }
-#endif
LoadLocalFlags(hwnd, dat);
if ((dat->dwFlags & MWF_LOG_ALL) != dwOldFlags) {
bool fShouldHide = true;
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index 275a52a6a2..639209972d 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3
-#define __MINOR_VERSION 3
-#define __RELEASE_NUM 1
-#define __BUILD_NUM 7
+#define __MINOR_VERSION 4
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 1
#include <stdver.h>
|