From 57884d14f2085b95b253c37f5e142b19d42d586e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 11 Apr 2013 14:53:30 +0000 Subject: - massive extinction of clutches in tabSRMM; - loop packing git-svn-id: http://svn.miranda-ng.org/main/trunk@4424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/generic_msghandlers.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/TabSRMM/src/generic_msghandlers.cpp') diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index c3ea6cb495..39100dd91d 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1990,21 +1990,21 @@ void SI_CheckStatusIconClick(struct TWindowData *dat, HWND hwndFrom, POINT pt, R if ((int)iconNum == list_icons && code != NM_RCLICK) { if (GetKeyState(VK_SHIFT) & 0x8000) { - struct TContainerData *piContainer = pFirstContainer; - - while (piContainer) { - piContainer->dwFlags = ((dat->pContainer->dwFlags & CNT_NOSOUND) ? piContainer->dwFlags | CNT_NOSOUND : piContainer->dwFlags & ~CNT_NOSOUND); + for (TContainerData *p = pFirstContainer; p; p = p->pNext) { + p->dwFlags = ((dat->pContainer->dwFlags & CNT_NOSOUND) ? p->dwFlags | CNT_NOSOUND : p->dwFlags & ~CNT_NOSOUND); InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE); - piContainer = piContainer->pNextContainer; } - } else { + } + else { dat->pContainer->dwFlags ^= CNT_NOSOUND; InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE); } - } else if ((int)iconNum == list_icons + 1 && code != NM_RCLICK && dat->bType == SESSIONTYPE_IM) { + } + else if ((int)iconNum == list_icons + 1 && code != NM_RCLICK && dat->bType == SESSIONTYPE_IM) { SendMessage(dat->pContainer->hwndActive, WM_COMMAND, IDC_SELFTYPING, 0); InvalidateRect(dat->pContainer->hwndStatus, NULL, TRUE); - } else if ((int)iconNum == list_icons + 2) { + } + else if ((int)iconNum == list_icons + 2) { if (code == NM_CLICK) PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_TRAYICONNOTIFY, 101, WM_LBUTTONUP); else if (code == NM_RCLICK) -- cgit v1.2.3