summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/modern_clcmsgs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern/modern_clcmsgs.cpp')
-rw-r--r--plugins/Clist_modern/modern_clcmsgs.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/plugins/Clist_modern/modern_clcmsgs.cpp b/plugins/Clist_modern/modern_clcmsgs.cpp
index 391c5b9f8a..23892a4795 100644
--- a/plugins/Clist_modern/modern_clcmsgs.cpp
+++ b/plugins/Clist_modern/modern_clcmsgs.cpp
@@ -48,67 +48,67 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
else
{
clcSetDelayTimer( TIMERID_REBUILDAFTER, hwnd );
- CLM_AUTOREBUILD_WAS_POSTED=FALSE;
+ CLM_AUTOREBUILD_WAS_POSTED = FALSE;
}
return 0;
case CLM_SETEXTRACOLUMNSSPACE:
- dat->extraColumnSpacing=(int)wParam;
+ dat->extraColumnSpacing = (int)wParam;
CLUI__cliInvalidateRect(hwnd,NULL,FALSE);
return 0;
case CLM_SETFONT:
- if(HIWORD(lParam)<0 || HIWORD(lParam)>FONTID_MODERN_MAX) return 0;
+ if (HIWORD(lParam) < 0 || HIWORD(lParam)>FONTID_MODERN_MAX) return 0;
- dat->fontModernInfo[HIWORD(lParam)].hFont=(HFONT)wParam;
- dat->fontModernInfo[HIWORD(lParam)].changed=1;
+ dat->fontModernInfo[HIWORD(lParam)].hFont = (HFONT)wParam;
+ dat->fontModernInfo[HIWORD(lParam)].changed = 1;
RowHeights_GetMaxRowHeight(dat, hwnd);
- if(LOWORD(lParam))
+ if (LOWORD(lParam))
CLUI__cliInvalidateRect(hwnd,NULL,FALSE);
return 0;
case CLM_SETHIDEEMPTYGROUPS:
{
- BOOL old=((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS)!=0);
- BOOL newval=old;
- if(wParam) SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)|CLS_HIDEEMPTYGROUPS);
+ BOOL old = ((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS) != 0);
+ BOOL newval = old;
+ if (wParam) SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)|CLS_HIDEEMPTYGROUPS);
else SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)&~CLS_HIDEEMPTYGROUPS);
- newval=((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS)!=0);
- if (newval!=old)
+ newval = ((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS) != 0);
+ if (newval != old)
SendMessage(hwnd,CLM_AUTOREBUILD,0,0);
}
return 0;
case CLM_SETTEXTCOLOR:
- if(wParam<0 || wParam>FONTID_MODERN_MAX) break;
+ if (wParam < 0 || wParam>FONTID_MODERN_MAX) break;
- dat->fontModernInfo[wParam].colour=lParam;
- dat->force_in_dialog=TRUE;
+ dat->fontModernInfo[wParam].colour = lParam;
+ dat->force_in_dialog = TRUE;
// Issue 40: option knows nothing about moderns colors
// others who know have to set colors from lowest to highest
switch ( wParam )
{
case FONTID_CONTACTS:
- dat->fontModernInfo[FONTID_SECONDLINE].colour=lParam;
- dat->fontModernInfo[FONTID_THIRDLINE].colour=lParam;
- dat->fontModernInfo[FONTID_AWAY].colour=lParam;
- dat->fontModernInfo[FONTID_DND].colour=lParam;
- dat->fontModernInfo[FONTID_NA].colour=lParam;
- dat->fontModernInfo[FONTID_OCCUPIED].colour=lParam;
- dat->fontModernInfo[FONTID_CHAT].colour=lParam;
- dat->fontModernInfo[FONTID_INVISIBLE].colour=lParam;
- dat->fontModernInfo[FONTID_PHONE].colour=lParam;
- dat->fontModernInfo[FONTID_LUNCH].colour=lParam;
- dat->fontModernInfo[FONTID_CONTACT_TIME].colour=lParam;
+ dat->fontModernInfo[FONTID_SECONDLINE].colour = lParam;
+ dat->fontModernInfo[FONTID_THIRDLINE].colour = lParam;
+ dat->fontModernInfo[FONTID_AWAY].colour = lParam;
+ dat->fontModernInfo[FONTID_DND].colour = lParam;
+ dat->fontModernInfo[FONTID_NA].colour = lParam;
+ dat->fontModernInfo[FONTID_OCCUPIED].colour = lParam;
+ dat->fontModernInfo[FONTID_CHAT].colour = lParam;
+ dat->fontModernInfo[FONTID_INVISIBLE].colour = lParam;
+ dat->fontModernInfo[FONTID_PHONE].colour = lParam;
+ dat->fontModernInfo[FONTID_LUNCH].colour = lParam;
+ dat->fontModernInfo[FONTID_CONTACT_TIME].colour = lParam;
break;
case FONTID_OPENGROUPS:
- dat->fontModernInfo[FONTID_CLOSEDGROUPS].colour=lParam;
+ dat->fontModernInfo[FONTID_CLOSEDGROUPS].colour = lParam;
break;
case FONTID_OPENGROUPCOUNTS:
- dat->fontModernInfo[FONTID_CLOSEDGROUPCOUNTS].colour=lParam;
+ dat->fontModernInfo[FONTID_CLOSEDGROUPCOUNTS].colour = lParam;
break;
}
return 0;
@@ -119,11 +119,11 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
struct ClcGroup *group;
int i;
- if (wParam != CLGN_ROOT) {
+ if (wParam !=CLGN_ROOT) {
if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) lParam, &contact, &group, NULL))
return (LRESULT) (HANDLE) NULL;
i = List_IndexOf((SortedList*)&group->cl,contact);
- if (i<0) return 0;
+ if (i < 0) return 0;
}
switch (wParam)
{
@@ -133,7 +133,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
else
return (LRESULT) (HANDLE) NULL;
case CLGN_CHILD:
- if (contact->type != CLCIT_GROUP)
+ if (contact->type !=CLCIT_GROUP)
return (LRESULT) (HANDLE) NULL;
group = contact->group;
if (group->cl.count == 0)
@@ -143,7 +143,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
return group->groupId | HCONTACT_ISGROUP;
case CLGN_NEXT:
do {
- if (++i >= group->cl.count)
+ if (++i >= group->cl.count)
return NULL;
}
while (group->cl.items[i]->type == CLCIT_DIVIDER);
@@ -159,13 +159,13 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
for (i++; i < group->cl.count; i++)
if (group->cl.items[i]->type == CLCIT_CONTACT)
break;
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
return (LRESULT) pcli->pfnContactToHItem(group->cl.items[i]);
case CLGN_PREVIOUSCONTACT:
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
- for (i--; i >= 0; i--)
+ for (i--; i >= 0; i--)
if (group->cl.items[i]->type == CLCIT_CONTACT)
break;
if (i < 0)
@@ -175,13 +175,13 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
for (i++; i < group->cl.count; i++)
if (group->cl.items[i]->type == CLCIT_GROUP)
break;
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
return (LRESULT) pcli->pfnContactToHItem(group->cl.items[i]);
case CLGN_PREVIOUSGROUP:
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
- for (i--; i >= 0; i--)
+ for (i--; i >= 0; i--)
if (group->cl.items[i]->type == CLCIT_GROUP)
break;
if (i < 0)
@@ -195,8 +195,8 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
{
struct ClcContact *contact;
struct ClcGroup *group, *tgroup;
- int index=-1;
- int mainindex=-1;
+ int index = -1;
+ int mainindex = -1;
if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, &group, NULL))
break;
for (tgroup = group; tgroup; tgroup = tgroup->parent)
@@ -204,26 +204,26 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
if (!contact->isSubcontact)
{
- index=List_IndexOf((SortedList*)&group->cl,contact);
- mainindex=index;
+ index = List_IndexOf((SortedList*)&group->cl,contact);
+ mainindex = index;
}
else
{
- index=List_IndexOf((SortedList*)&group->cl,contact->subcontacts);
- mainindex=index;
- index+=contact->isSubcontact;
+ index = List_IndexOf((SortedList*)&group->cl,contact->subcontacts);
+ mainindex = index;
+ index += contact->isSubcontact;
}
{
- BYTE k=db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
+ BYTE k = db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
if (k)
{
- int subcontactscount=0;
+ int subcontactscount = 0;
int i;
- for ( i=0; i<mainindex; i++)
+ for ( i = 0; i < mainindex; i++)
{
- struct ClcContact *tempCont=group->cl.items[i];
- if (tempCont->type==CLCIT_CONTACT && tempCont->SubAllocated && tempCont->SubExpanded)
- index+=tempCont->SubAllocated;
+ struct ClcContact *tempCont = group->cl.items[i];
+ if (tempCont->type == CLCIT_CONTACT && tempCont->SubAllocated && tempCont->SubExpanded)
+ index += tempCont->SubAllocated;
}
}
}
@@ -235,7 +235,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
case CLM_SETEXTRAIMAGE:
{
struct ClcContact *contact;
- if (LOWORD(lParam) >= dat->extraColumnsCount)
+ if (LOWORD(lParam) >= dat->extraColumnsCount)
return 0;
if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
return 0;
@@ -248,7 +248,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
case CLM_SETWIDEEXTRAIMAGE:
{
struct ClcContact *contact;
- if (LOWORD(lParam) >= dat->extraColumnsCount)
+ if (LOWORD(lParam) >= dat->extraColumnsCount)
return 0;
if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
return 0;
@@ -269,7 +269,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
case CLM_GETWIDEEXTRAIMAGE:
{
struct ClcContact *contact;
- if (LOWORD(lParam) >= dat->extraColumnsCount)
+ if (LOWORD(lParam) >= dat->extraColumnsCount)
return 0xFFFF;
if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
return 0xFFFF;