summaryrefslogtreecommitdiff
path: root/src/modules/clist
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-06 13:58:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-06 13:58:20 +0000
commit46a53191c1ad11a41c948594e972568e62d155b4 (patch)
tree7e57e6f7093fb0de766fe13a933d2f9231433e4d /src/modules/clist
parent1fe5acae909ea64a1de9ac9f58cae5a3c2d3ad1f (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist')
-rw-r--r--src/modules/clist/clc.cpp2
-rw-r--r--src/modules/clist/clistevents.cpp6
-rw-r--r--src/modules/clist/clistmenus.cpp2
-rw-r--r--src/modules/clist/clisttray.cpp8
-rw-r--r--src/modules/clist/clui.cpp4
-rw-r--r--src/modules/clist/genmenuopt.cpp2
-rw-r--r--src/modules/clist/keyboard.cpp4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp
index 4b3e8dbd11..f260a8c452 100644
--- a/src/modules/clist/clc.cpp
+++ b/src/modules/clist/clc.cpp
@@ -498,7 +498,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
cli.pfnAddContactToTree(hwnd, dat, (HANDLE) wParam, 1, 1);
if (cli.pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL)) {
CopyMemory(contact->iExtraImage, iExtraImage, SIZEOF(iExtraImage));
- if(flags & CONTACTF_CHECKED)
+ if (flags & CONTACTF_CHECKED)
contact->flags |= CONTACTF_CHECKED;
}
nm.hdr.code = CLN_CONTACTMOVED;
diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp
index 4958934c9828..6b95a648bb 100644
--- a/src/modules/clist/clistevents.cpp
+++ b/src/modules/clist/clistevents.cpp
@@ -303,7 +303,7 @@ int fnEventsProcessTrayDoubleClick(int index)
break;
}
if (szProto) {
- for(i=0; i<cli.events.count; i++) {
+ for (i=0; i<cli.events.count; i++) {
char * eventProto=NULL;
if (cli.events.items[i]->cle.hContact)
eventProto=(char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)cli.events.items[i]->cle.hContact, 0);
@@ -319,7 +319,7 @@ int fnEventsProcessTrayDoubleClick(int index)
//lets process backward try to find first event without desired proto in tray
int j;
if (click_in_first_icon)
- for(i=0; i<cli.events.count; i++) {
+ for (i=0; i<cli.events.count; i++) {
char * eventProto=NULL;
if (cli.events.items[i]->cle.hContact)
eventProto=(char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)cli.events.items[i]->cle.hContact, 0);
@@ -356,7 +356,7 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM)
int j, hit;
/*
- the for(;;) loop is used here since the cli.events.count can not be relied upon to take us
+ the for (;;) loop is used here since the cli.events.count can not be relied upon to take us
thru the cli.events.items[] array without suffering from shortsightedness about how many unseen
events remain, e.g. three events, we remove the first, we're left with 2, the event
loop exits at 2 and we never see the real new 2.
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index 15e8ebc1b2..1d9f8275d7 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -644,7 +644,7 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM)
else {
int MenusProtoCount = 0;
- for( int i=0; i < accounts.getCount(); i++ )
+ for ( int i=0; i < accounts.getCount(); i++ )
if ( cli.pfnGetProtocolVisibility( accounts[i]->szModuleName ))
MenusProtoCount++;
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp
index c708d3f1a8..717d5beae1 100644
--- a/src/modules/clist/clisttray.cpp
+++ b/src/modules/clist/clisttray.cpp
@@ -45,7 +45,7 @@ static CRITICAL_SECTION trayLockCS;
#define lock cli.pfnLockTray()
#define ulock cli.pfnUnlockTray()
-#define initcheck if(!fTrayInited) return
+#define initcheck if (!fTrayInited) return
static BOOL fTrayInited=FALSE;
@@ -412,7 +412,7 @@ int fnTrayIconUpdate(HICON hNewIcon, const TCHAR *szNewTip, const char *szPrefer
cli.pfnTrayIconMakeTooltip(szNewTip, cli.trayIcon[i].szProto);
mir_free( cli.trayIcon[i].ptszToolTip );
cli.trayIcon[i].ptszToolTip = mir_tstrdup( cli.szTip );
- if(!mToolTipTrayTips)
+ if (!mToolTipTrayTips)
lstrcpyn(nid.szTip, cli.szTip, SIZEOF(nid.szTip));
Shell_NotifyIcon(NIM_MODIFY, &nid);
@@ -427,7 +427,7 @@ int fnTrayIconUpdate(HICON hNewIcon, const TCHAR *szNewTip, const char *szPrefer
DWORD time1=DBGetContactSettingWord(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT)*200;
DWORD time2=DBGetContactSettingWord(NULL,"CList","IconFlashTime",550)+1000;
DWORD time=max(max(2000,time1),time2);
- if(RefreshTimerId) {KillTimer(NULL,RefreshTimerId); RefreshTimerId=0;}
+ if (RefreshTimerId) {KillTimer(NULL,RefreshTimerId); RefreshTimerId=0;}
RefreshTimerId=SetTimer(NULL,0,time,RefreshTimerProc); // if unknown base was changed - than show preffered proto icon for 2 sec and reset it to original one after timeout
}
{ ulock; return i; }
@@ -454,7 +454,7 @@ int fnTrayIconSetBaseInfo(HICON hIcon, const char *szPreferredProto)
ulock; return i;
}
if ((cli.pfnGetProtocolVisibility(szPreferredProto))
- && (GetAverageMode()==-1)
+ && (GetAverageMode() == -1)
&& (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT)==SETTING_TRAYICON_MULTI)
&& !(DBGetContactSettingByte(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT)))
goto LBL_Error;
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp
index 07a4270aa7..f82872711d 100644
--- a/src/modules/clist/clui.cpp
+++ b/src/modules/clist/clui.cpp
@@ -635,7 +635,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return DefWindowProc(hwnd, msg, wParam, lParam);
case WM_SETCURSOR:
- if(cluiopt.transparent) {
+ if (cluiopt.transparent) {
if (!transparentFocus && GetForegroundWindow()!=hwnd && setLayeredWindowAttributes) {
setLayeredWindowAttributes(hwnd, RGB(0,0,0), (BYTE)cluiopt.alpha, LWA_ALPHA);
transparentFocus=1;
@@ -968,7 +968,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return FALSE;
case WM_MENUSELECT:
- if(lParam && (HMENU)lParam == cli.hMenuMain) {
+ if (lParam && (HMENU)lParam == cli.hMenuMain) {
int pos = LOWORD(wParam);
POINT pt;
GetCursorPos(&pt);
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp
index eb413f94ac..0d8a883702 100644
--- a/src/modules/clist/genmenuopt.cpp
+++ b/src/modules/clist/genmenuopt.cpp
@@ -367,7 +367,7 @@ static HTREEITEM MoveItemAbove(HWND hTreeWnd, HTREEITEM hItem, HTREEITEM hInsert
tvis.item.cchTextMax = sizeof( name );
tvis.item.hItem = hItem;
tvis.item.iImage = tvis.item.iSelectedImage = (( MenuItemOptData* )tvi.lParam)->show;
- if(!SendMessage(hTreeWnd, TVM_GETITEM, 0, (LPARAM)&tvis.item))
+ if (!SendMessage(hTreeWnd, TVM_GETITEM, 0, (LPARAM)&tvis.item))
return NULL;
if (!TreeView_DeleteItem(hTreeWnd,hItem))
return NULL;
diff --git a/src/modules/clist/keyboard.cpp b/src/modules/clist/keyboard.cpp
index b03c7bac03..75c2630a33 100644
--- a/src/modules/clist/keyboard.cpp
+++ b/src/modules/clist/keyboard.cpp
@@ -33,7 +33,7 @@ static INT_PTR hkHideShow(WPARAM, LPARAM)
INT_PTR hkSearch(WPARAM wParam,LPARAM lParam)
{
DBVARIANT dbv={0};
- if(!DBGetContactSettingString(NULL,"CList","SearchUrl",&dbv)) {
+ if (!DBGetContactSettingString(NULL,"CList","SearchUrl",&dbv)) {
CallService(MS_UTILS_OPENURL,DBGetContactSettingByte(NULL,"CList","HKSearchNewWnd",0),(LPARAM)dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -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;