summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/tabctrl.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/tabctrl.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/tabctrl.cpp')
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index c9edabf1f3..e79bbad25c 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -1472,9 +1472,6 @@ INT_PTR CALLBACK DlgProcTabConfig(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case PSN_APPLY:
{
BOOL translated;
- int fixedWidth;
-
- struct TContainerData *pContainer = pFirstContainer;
M->WriteByte(SRMSGMOD_T, "y-pad", (BYTE)(GetDlgItemInt(hwndDlg, IDC_TABPADDING, NULL, FALSE)));
M->WriteByte(SRMSGMOD_T, "x-pad", (BYTE)(GetDlgItemInt(hwndDlg, IDC_HTABPADDING, NULL, FALSE)));
@@ -1485,15 +1482,15 @@ INT_PTR CALLBACK DlgProcTabConfig(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
M->WriteByte(SRMSGMOD_T, CSkin::m_skinEnabled ? "S_tborder_outer_bottom" : "tborder_outer_bottom", (BYTE) GetDlgItemInt(hwndDlg, IDC_TABBORDEROUTERBOTTOM, &translated, FALSE));
M->WriteDword(SRMSGMOD_T, "bottomadjust", GetDlgItemInt(hwndDlg, IDC_BOTTOMTABADJUST, &translated, TRUE));
- fixedWidth = GetDlgItemInt(hwndDlg, IDC_TABWIDTH, &translated, FALSE);
+ int fixedWidth = GetDlgItemInt(hwndDlg, IDC_TABWIDTH, &translated, FALSE);
fixedWidth = (fixedWidth < 60 ? 60 : fixedWidth);
M->WriteDword(SRMSGMOD_T, "fixedwidth", fixedWidth);
FreeTabConfig();
ReloadTabConfig();
- while (pContainer) {
- TabCtrl_SetPadding(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), GetDlgItemInt(hwndDlg, IDC_HTABPADDING, NULL, FALSE), GetDlgItemInt(hwndDlg, IDC_TABPADDING, NULL, FALSE));
- RedrawWindow(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
- pContainer = pContainer->pNextContainer;
+
+ for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
+ TabCtrl_SetPadding(GetDlgItem(p->hwnd, IDC_MSGTABS), GetDlgItemInt(hwndDlg, IDC_HTABPADDING, NULL, FALSE), GetDlgItemInt(hwndDlg, IDC_TABPADDING, NULL, FALSE));
+ RedrawWindow(GetDlgItem(p->hwnd, IDC_MSGTABS), NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
}
return TRUE;
}