summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/themes.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-11 14:53:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-11 14:53:30 +0000
commit57884d14f2085b95b253c37f5e142b19d42d586e (patch)
tree687170ffcd0dc02fef625607b0a074f1c0be9b6f /plugins/TabSRMM/src/themes.cpp
parent8725517f626b8c7c43e3800ad7dcae99cec0649c (diff)
- massive extinction of clutches in tabSRMM;
- loop packing git-svn-id: http://svn.miranda-ng.org/main/trunk@4424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/themes.cpp')
-rw-r--r--plugins/TabSRMM/src/themes.cpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 09ed80222b..56defcc5ff 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1092,16 +1092,17 @@ void CSkin::Init(bool fStartup)
*/
bool CSkin::warnToClose() const
{
- if (::pFirstContainer) {
- if (MessageBox(0, TranslateT("All message containers need to close before the skin can be changed\nProceed?"),
- TranslateT("Change skin"), MB_YESNO | MB_ICONQUESTION) == IDYES) {
- TContainerData *pContainer = ::pFirstContainer;
- while (pFirstContainer)
- SendMessage(pFirstContainer->hwnd, WM_CLOSE, 0, 1);
- return true;
- } else
- return false;
- }
+ if (::pFirstContainer == NULL)
+ return true;
+
+ if (MessageBox(0,
+ TranslateT("All message containers need to close before the skin can be changed\nProceed?"),
+ TranslateT("Change skin"), MB_YESNO | MB_ICONQUESTION) != IDYES)
+ return false;
+
+ TContainerData *pContainer = ::pFirstContainer;
+ while (pFirstContainer)
+ SendMessage(pFirstContainer->hwnd, WM_CLOSE, 0, 1);
return true;
}
@@ -1911,7 +1912,7 @@ void CSkin::SkinCalcFrameWidth()
* @param rcClient RECT *: client rectangle (target area)
* @param hdcTarget HDC: device context of the target window
*/
-void CSkin::SkinDrawBG(HWND hwndClient, HWND hwnd, struct TContainerData *pContainer, RECT *rcClient, HDC hdcTarget)
+void CSkin::SkinDrawBG(HWND hwndClient, HWND hwnd, TContainerData *pContainer, RECT *rcClient, HDC hdcTarget)
{
RECT rcWindow;
POINT pt;
@@ -2520,14 +2521,11 @@ void CSkin::initAeroEffect()
m_BrushBack = ::CreateSolidBrush(0);
}
- TContainerData *pContainer = pFirstContainer;
-
- while (pContainer) {
- InvalidateRect(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), NULL, TRUE);
- InvalidateRect(pContainer->hwnd, NULL, TRUE);
- if (IsWindow(GetDlgItem(pContainer->hwnd, 5000)))
- InvalidateRect(GetDlgItem(pContainer->hwnd, 5000), NULL, TRUE);
- pContainer = pContainer->pNextContainer;
+ for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
+ InvalidateRect(GetDlgItem(p->hwnd, IDC_MSGTABS), NULL, TRUE);
+ InvalidateRect(p->hwnd, NULL, TRUE);
+ if (IsWindow(GetDlgItem(p->hwnd, 5000)))
+ InvalidateRect(GetDlgItem(p->hwnd, 5000), NULL, TRUE);
}
}