diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 14:23:28 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 14:23:28 +0000 |
commit | 581a7a4fca5155decdc48ee1972af806d24c6ceb (patch) | |
tree | 9b9a9be8923231a1ac8a073480d432456ea312a2 /plugins/Clist_modern/src/modern_clcmsgs.cpp | |
parent | 8677ac8db6aa7528fdb84bf3cd8a996a3f45e254 (diff) |
cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@13616 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcmsgs.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcmsgs.cpp | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index a706bfb938..849270026b 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -62,17 +62,17 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP return 0;
case CLM_SETHIDEEMPTYGROUPS:
- {
- BOOL old = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
- if (wParam)
- SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
- else
- SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) &~CLS_HIDEEMPTYGROUPS);
- BOOL newval = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
- if (newval != old)
- pcli->pfnInitAutoRebuild(hwnd);
- }
- return 0;
+ {
+ BOOL old = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
+ if (wParam)
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
+ else
+ SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) &~CLS_HIDEEMPTYGROUPS);
+ BOOL newval = ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) != 0);
+ if (newval != old)
+ pcli->pfnInitAutoRebuild(hwnd);
+ }
+ return 0;
case CLM_SETTEXTCOLOR:
if (wParam > FONTID_MODERN_MAX) break;
@@ -105,76 +105,76 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP return 0;
case CLM_GETNEXTITEM:
- {
- int i = 0;
- if (wParam != CLGN_ROOT) {
- if (!pcli->pfnFindItem(hwnd, dat, lParam, &contact, &group, NULL))
- return NULL;
- i = List_IndexOf((SortedList*)&group->cl, contact);
- if (i < 0) return 0;
- }
- switch (wParam) {
- case CLGN_ROOT:
- if (dat->list.cl.count)
- return (LRESULT)pcli->pfnContactToHItem(dat->list.cl.items[0]);
- else
- return NULL;
- case CLGN_CHILD:
- if (contact->type != CLCIT_GROUP)
- return NULL;
- group = contact->group;
- if (group->cl.count == 0)
- return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl.items[0]);
- case CLGN_PARENT:
- return group->groupId | HCONTACT_ISGROUP;
- case CLGN_NEXT:
- do {
- if (++i >= group->cl.count)
- return NULL;
- } while (group->cl.items[i]->type == CLCIT_DIVIDER);
- return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
- case CLGN_PREVIOUS:
- do {
- if (--i < 0)
- return NULL;
- } while (group->cl.items[i]->type == CLCIT_DIVIDER);
- return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
- case CLGN_NEXTCONTACT:
- for (i++; i < group->cl.count; i++)
- if (group->cl.items[i]->type == CLCIT_CONTACT)
- break;
- if (i >= group->cl.count)
- return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
- case CLGN_PREVIOUSCONTACT:
- if (i >= group->cl.count)
- return NULL;
- for (i--; i >= 0; i--)
- if (group->cl.items[i]->type == CLCIT_CONTACT)
- break;
- if (i < 0)
- return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
- case CLGN_NEXTGROUP:
- for (i++; i < group->cl.count; i++)
- if (group->cl.items[i]->type == CLCIT_GROUP)
- break;
- if (i >= group->cl.count)
- return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
- case CLGN_PREVIOUSGROUP:
- if (i >= group->cl.count)
+ {
+ int i = 0;
+ if (wParam != CLGN_ROOT) {
+ if (!pcli->pfnFindItem(hwnd, dat, lParam, &contact, &group, NULL))
+ return NULL;
+ i = List_IndexOf((SortedList*)&group->cl, contact);
+ if (i < 0) return 0;
+ }
+ switch (wParam) {
+ case CLGN_ROOT:
+ if (dat->list.cl.count)
+ return (LRESULT)pcli->pfnContactToHItem(dat->list.cl.items[0]);
+ else
+ return NULL;
+ case CLGN_CHILD:
+ if (contact->type != CLCIT_GROUP)
+ return NULL;
+ group = contact->group;
+ if (group->cl.count == 0)
+ return NULL;
+ return (LRESULT)pcli->pfnContactToHItem(group->cl.items[0]);
+ case CLGN_PARENT:
+ return group->groupId | HCONTACT_ISGROUP;
+ case CLGN_NEXT:
+ do {
+ if (++i >= group->cl.count)
return NULL;
- for (i--; i >= 0; i--)
- if (group->cl.items[i]->type == CLCIT_GROUP)
- break;
- if (i < 0)
+ } while (group->cl.items[i]->type == CLCIT_DIVIDER);
+ return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
+ case CLGN_PREVIOUS:
+ do {
+ if (--i < 0)
return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
- }
+ } while (group->cl.items[i]->type == CLCIT_DIVIDER);
+ return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
+ case CLGN_NEXTCONTACT:
+ for (i++; i < group->cl.count; i++)
+ if (group->cl.items[i]->type == CLCIT_CONTACT)
+ break;
+ if (i >= group->cl.count)
+ return NULL;
+ return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
+ case CLGN_PREVIOUSCONTACT:
+ if (i >= group->cl.count)
+ return NULL;
+ for (i--; i >= 0; i--)
+ if (group->cl.items[i]->type == CLCIT_CONTACT)
+ break;
+ if (i < 0)
+ return NULL;
+ return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
+ case CLGN_NEXTGROUP:
+ for (i++; i < group->cl.count; i++)
+ if (group->cl.items[i]->type == CLCIT_GROUP)
+ break;
+ if (i >= group->cl.count)
+ return NULL;
+ return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
+ case CLGN_PREVIOUSGROUP:
+ if (i >= group->cl.count)
+ return NULL;
+ for (i--; i >= 0; i--)
+ if (group->cl.items[i]->type == CLCIT_GROUP)
+ break;
+ if (i < 0)
+ return NULL;
+ return (LRESULT)pcli->pfnContactToHItem(group->cl.items[i]);
}
- return NULL;
+ }
+ return NULL;
case CLM_SELECTITEM:
ClcGroup *tgroup;
|