diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-13 17:26:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-13 17:26:45 +0000 |
commit | 5e686292c537275c8ea1399f311c082d905e8a63 (patch) | |
tree | 88a4f3921ff70323775f3329c8820a0fe947d74f /src/modules/clist | |
parent | 90c154b4be566ec4a804217d0f1e50fb1e259b72 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@398 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/clcmsgs.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clistevents.cpp | 14 | ||||
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 8 | ||||
-rw-r--r-- | src/modules/clist/clisttray.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clui.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/genmenu.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 16 | ||||
-rw-r--r-- | src/modules/clist/groups.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/keyboard.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/protocolorder.cpp | 2 |
10 files changed, 27 insertions, 27 deletions
diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp index d81b6335c5..17bf8834e7 100644 --- a/src/modules/clist/clcmsgs.cpp +++ b/src/modules/clist/clcmsgs.cpp @@ -52,7 +52,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR ClcContact *groupContact;
ClcGroup *group;
CLCINFOITEM *cii = (CLCINFOITEM *) lParam;
- if (cii==NULL || cii->cbSize != sizeof(CLCINFOITEM))
+ if (cii == NULL || cii->cbSize != sizeof(CLCINFOITEM))
return (LRESULT) (HANDLE) NULL;
if (cii->hParentGroup == NULL)
group = &dat->list;
diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp index 6b95a648bb..6f8b0c4049 100644 --- a/src/modules/clist/clistevents.cpp +++ b/src/modules/clist/clistevents.cpp @@ -91,7 +91,7 @@ static void ShowEventsInTray() char nTrayProtoCnt;
int nTrayCnt=cli.trayIconCount;
if (!cli.events.count || !nTrayCnt) return;
- if (cli.events.count ==1 || nTrayCnt == 1)
+ if (cli.events.count == 1 || nTrayCnt == 1)
{
ShowOneEventInTray(0); //for only one icon in tray show topmost event
return;
@@ -153,7 +153,7 @@ struct CListEvent* fnAddEvent( CLISTEVENT *cle ) int i;
struct CListEvent* p;
- if (cle==NULL || cle->cbSize != sizeof(CLISTEVENT))
+ if (cle == NULL || cle->cbSize != sizeof(CLISTEVENT))
return NULL;
if (cle->flags & CLEF_URGENT) {
@@ -297,9 +297,9 @@ int fnEventsProcessTrayDoubleClick(int index) int i;
char * szProto=NULL;
for (i=0; i<cli.trayIconCount; i++)
- if (cli.trayIcon[i].id==index) {
+ if (cli.trayIcon[i].id == index) {
szProto=cli.trayIcon[i].szProto;
- if (i==0) click_in_first_icon=TRUE;
+ if (i == 0) click_in_first_icon=TRUE;
break;
}
if (szProto) {
@@ -315,7 +315,7 @@ int fnEventsProcessTrayDoubleClick(int index) break;
} }
- if (i==cli.events.count) { //EventNotFound
+ if (i == cli.events.count) { //EventNotFound
//lets process backward try to find first event without desired proto in tray
int j;
if (click_in_first_icon)
@@ -330,11 +330,11 @@ int fnEventsProcessTrayDoubleClick(int index) if (cli.trayIcon[j].szProto && !_strcmpi(eventProto, cli.trayIcon[j].szProto))
break;
- if (j==cli.trayIconCount) {
+ if (j == cli.trayIconCount) {
eventIndex=i;
break;
} } }
- if (i==cli.events.count) { //not found
+ if (i == cli.events.count) { //not found
cli.pfnUnlockTray();
return 1; //continue processing to show contact list
} } } }
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 1d9f8275d7..051cc4cee6 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -375,7 +375,7 @@ static INT_PTR BuildContactMenu(WPARAM wParam, LPARAM) //lparam - lparam from winproc
INT_PTR ContactMenuExecService(WPARAM wParam,LPARAM lParam)
{
- if (wParam!=0) {
+ if (wParam != 0) {
lpContactMenuExecParam cmep=(lpContactMenuExecParam)wParam;
//call with wParam=(WPARAM)(HANDLE)hContact,lparam=popupposition
CallService(cmep->szServiceName,lParam,cmep->param);
@@ -603,7 +603,7 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) CallService(smep->svc, 0, (LPARAM)smep->hMenuItem);
}
else {
- if ( smep->status == 0 && smep->protoindex !=0 && smep->proto != NULL ) {
+ if ( smep->status == 0 && smep->protoindex != 0 && smep->proto != NULL ) {
PMO_IntMenuItem pimi;
char *prot = smep->proto;
char szHumanName[64]={0};
@@ -1118,7 +1118,7 @@ static int MenuProtoAck(WPARAM, LPARAM lParam) tmi.cbSize=sizeof(tmi);
if (overallStatus >= ID_STATUS_OFFLINE) {
int pos = statustopos(cli.currentStatusMenuItem);
- if (pos==-1) pos=0;
+ if (pos == -1) pos=0;
{ // reset all current possible checked statuses
int pos2;
for (pos2=0; pos2<hStatusMainMenuHandlesCnt; pos2++)
@@ -1258,7 +1258,7 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam,LPARAM lParam) {
char *buf=mir_strdup(mi->pszService);
int i=0;
- while(buf[i]!='\0' && buf[i]!='/') i++;
+ while (buf[i] != '\0' && buf[i] != '/') i++;
buf[i]='\0';
smep->proto=mir_strdup(buf);
mir_free(buf);
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 717d5beae1..00d4074b33 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -455,7 +455,7 @@ int fnTrayIconSetBaseInfo(HICON hIcon, const char *szPreferredProto) }
if ((cli.pfnGetProtocolVisibility(szPreferredProto))
&& (GetAverageMode() == -1)
- && (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT)==SETTING_TRAYICON_MULTI)
+ && (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI)
&& !(DBGetContactSettingByte(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT)))
goto LBL_Error;
}
@@ -970,7 +970,7 @@ void fnUnlockTray( void ) // return; //stub to be removed
initcheck;
#ifdef _DEBUG
- if (trayLockCS.RecursionCount==0) DebugBreak(); //try to unlock already
+ if (trayLockCS.RecursionCount == 0) DebugBreak(); //try to unlock already
#endif
LeaveCriticalSection( &trayLockCS );
}
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index ad35aeb3bf..a9619b6302 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -636,7 +636,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_SETCURSOR:
if (cluiopt.transparent) {
- if (!transparentFocus && GetForegroundWindow()!=hwnd && setLayeredWindowAttributes) {
+ if (!transparentFocus && GetForegroundWindow() != hwnd && setLayeredWindowAttributes) {
setLayeredWindowAttributes(hwnd, RGB(0,0,0), (BYTE)cluiopt.alpha, LWA_ALPHA);
transparentFocus=1;
SetTimer(hwnd, TM_AUTOALPHA,250,NULL);
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index 56a86bab43..73b3e972d5 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -1121,7 +1121,7 @@ static int MO_RegisterIcon( PMO_IntMenuItem pmi, void* ) break;
memmove(start,start+1,strlen(start+1)+1);
- if (*start!='\0') start++;
+ if (*start != '\0') start++;
else break;
}
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 0d8a883702..84fbaa9e6a 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -382,7 +382,7 @@ WNDPROC MyOldWindowProc=NULL; LRESULT CALLBACK LBTNDOWNProc(HWND hwnd,UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- if (uMsg==WM_LBUTTONDOWN && !(GetKeyState(VK_CONTROL)&0x8000)) {
+ if (uMsg == WM_LBUTTONDOWN && !(GetKeyState(VK_CONTROL)&0x8000)) {
TVHITTESTINFO hti;
hti.pt.x=(short)LOWORD(lParam);
@@ -409,7 +409,7 @@ LRESULT CALLBACK LBTNDOWNProc(HWND hwnd,UINT uMsg, WPARAM wParam, LPARAM lParam) tvi.hItem=hit;
TreeView_GetItem(tvw, &tvi);
- if (hti.hItem!=hit)
+ if (hti.hItem != hit)
((MenuItemOptData *)tvi.lParam)->isSelected=0;
else
((MenuItemOptData *)tvi.lParam)->isSelected=1;
@@ -477,7 +477,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MenuItemOptData *iod;
hti=TreeView_GetSelection(GetDlgItem(hwndDlg,IDC_MENUITEMS));
- if (hti==NULL)
+ if (hti == NULL)
break;
tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
@@ -619,7 +619,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA tvi.hItem=hit;
TreeView_GetItem(tvw,&tvi);
- if (hti.hItem!=hit)
+ if (hti.hItem != hit)
((MenuItemOptData *)tvi.lParam)->isSelected=0;
else
((MenuItemOptData *)tvi.lParam)->isSelected=1;
@@ -634,7 +634,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA LPNMTREEVIEW pn;
pn = (LPNMTREEVIEW) lParam;
//((MenuItemOptData *)(pn->itemNew.lParam))->isSelected=1;
- /*if (pn->action==NotKeyPressed)
+ /*if (pn->action == NotKeyPressed)
{
remove all selection
}
@@ -654,7 +654,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow(GetDlgItem(hwndDlg,IDC_GENMENU_SET),FALSE);
hti=TreeView_GetSelection(GetDlgItem(hwndDlg,IDC_MENUITEMS));
- if (hti==NULL)
+ if (hti == NULL)
break;
tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
@@ -725,9 +725,9 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA hti.pt.y-=TreeView_GetItemHeight(GetDlgItem(hwndDlg,IDC_MENUITEMS))/2;
TreeView_HitTest(GetDlgItem(hwndDlg,IDC_MENUITEMS),&hti);
if (hti.flags&TVHT_ABOVE) hti.hItem=TVI_FIRST;
- if (dat->hDragItem==hti.hItem) break;
+ if (dat->hDragItem == hti.hItem) break;
dat->hDragItem=NULL;
- if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)||(hti.hItem==TVI_FIRST)) {
+ if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)||(hti.hItem == TVI_FIRST)) {
HWND tvw;
HTREEITEM * pSIT;
HTREEITEM FirstItem=NULL;
diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp index 287f16b83a..ddf7c287b4 100644 --- a/src/modules/clist/groups.cpp +++ b/src/modules/clist/groups.cpp @@ -168,7 +168,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) {
TCHAR szQuestion[256+100];
mir_sntprintf( szQuestion, SIZEOF(szQuestion), TranslateT("Are you sure you want to delete group '%s'? This operation can not be undone."), name );
- if (MessageBox(cli.hwndContactList, szQuestion, TranslateT("Delete Group"), MB_YESNO|MB_ICONQUESTION)==IDNO)
+ if (MessageBox(cli.hwndContactList, szQuestion, TranslateT("Delete Group"), MB_YESNO|MB_ICONQUESTION) == IDNO)
return 1;
}
SetCursor(LoadCursor(NULL, IDC_WAIT));
diff --git a/src/modules/clist/keyboard.cpp b/src/modules/clist/keyboard.cpp index 75c2630a33..e02abed203 100644 --- a/src/modules/clist/keyboard.cpp +++ b/src/modules/clist/keyboard.cpp @@ -42,7 +42,7 @@ INT_PTR hkSearch(WPARAM wParam,LPARAM lParam) */
static INT_PTR hkRead(WPARAM, LPARAM)
{
- if (cli.pfnEventsProcessTrayDoubleClick(0)==0) return TRUE;
+ if (cli.pfnEventsProcessTrayDoubleClick(0) == 0) return TRUE;
SetForegroundWindow(cli.hwndContactList);
SetFocus(cli.hwndContactList);
return 0;
diff --git a/src/modules/clist/protocolorder.cpp b/src/modules/clist/protocolorder.cpp index 471c8530f5..c40792a095 100644 --- a/src/modules/clist/protocolorder.cpp +++ b/src/modules/clist/protocolorder.cpp @@ -211,7 +211,7 @@ INT_PTR CALLBACK ProtocolOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM while ( tvi.hItem != NULL ) {
TreeView_GetItem(hwndProtoOrder, &tvi);
- if (tvi.lParam!=0) {
+ if (tvi.lParam != 0) {
ProtocolData* ppd = ( ProtocolData* )tvi.lParam;
PROTOACCOUNT* pa = Proto_GetAccount( ppd->RealName );
if ( pa != NULL ) {
|