diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-11 14:53:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-11 14:53:30 +0000 |
commit | 57884d14f2085b95b253c37f5e142b19d42d586e (patch) | |
tree | 687170ffcd0dc02fef625607b0a074f1c0be9b6f /plugins/TabSRMM/src/containeroptions.cpp | |
parent | 8725517f626b8c7c43e3800ad7dcae99cec0649c (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/containeroptions.cpp')
-rw-r--r-- | plugins/TabSRMM/src/containeroptions.cpp | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 47aa0738fd..38da7faf18 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -39,18 +39,15 @@ static void MY_CheckDlgButton(HWND hWnd, UINT id, int iCheck) static void ReloadGlobalContainerSettings(bool fForceReconfig)
{
- struct TContainerData *pC = pFirstContainer;
-
- while (pC) {
- if (!pC->settings->fPrivate) {
- Utils::SettingsToContainer(pC);
+ for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
+ if (!p->settings->fPrivate) {
+ Utils::SettingsToContainer(p);
if (fForceReconfig)
- SendMessage(pC->hwnd, DM_CONFIGURECONTAINER, 0, 0);
+ SendMessage(p->hwnd, DM_CONFIGURECONTAINER, 0, 0);
else
- SendMessage(pC->hwnd, WM_SIZE, 0, 1);
- BroadCastContainer(pC, DM_SETINFOPANEL, 0, 0);
+ SendMessage(p->hwnd, WM_SIZE, 0, 1);
+ BroadCastContainer(p, DM_SETINFOPANEL, 0, 0);
}
- pC = pC->pNextContainer;
}
}
@@ -78,16 +75,11 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT m if (flags & CNT_INFOPANEL)
BroadCastContainer(pContainer, DM_SETINFOPANEL, 0, 0);
if (flags & CNT_SIDEBAR) {
- struct TContainerData *pC = pFirstContainer;
- while (pC) {
- if (!pC->settings->fPrivate) {
- SendMessage(pC->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
- }
- pC = pC->pNextContainer;
- }
+ for (TContainerData *p = pFirstContainer; p; p = p->pNext)
+ if (!p->settings->fPrivate)
+ SendMessage(p->hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
}
- else
- ReloadGlobalContainerSettings(fForceResize);
+ else ReloadGlobalContainerSettings(fForceResize);
}
else {
if (!isEx)
@@ -153,9 +145,9 @@ static void ShowPage(HWND hwndDlg, int iPage, BOOL fShow) INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- struct TContainerData *pContainer = 0;
+ TContainerData *pContainer = 0;
HWND hwndTree = GetDlgItem(hwndDlg, IDC_SECTIONTREE);
- pContainer = (struct TContainerData *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ pContainer = (TContainerData *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG: {
|