From 1925d3521846f4e6683d3d537cc41de9c9bd7250 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Feb 2014 19:01:03 +0000 Subject: "we don't need these variables" (c) Pink Floyd git-svn-id: http://svn.miranda-ng.org/main/trunk@8101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_mw/src/BkgrCfg.cpp | 4 +- plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp | 58 +++++++++++++------------- plugins/Clist_mw/src/CLUIFrames/cluiframes.h | 2 +- plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp | 2 +- plugins/Clist_mw/src/CLUIFrames/statusbar.cpp | 2 +- plugins/Clist_mw/src/clc.cpp | 10 ++--- plugins/Clist_mw/src/clc.h | 4 +- plugins/Clist_mw/src/clcopts.cpp | 6 +-- plugins/Clist_mw/src/clistmenus.cpp | 2 +- plugins/Clist_mw/src/clistmod.cpp | 12 +++--- plugins/Clist_mw/src/clistopts.cpp | 2 +- plugins/Clist_mw/src/clistsettings.cpp | 5 +-- plugins/Clist_mw/src/clisttray.cpp | 18 ++++---- plugins/Clist_mw/src/clui.cpp | 14 +++---- plugins/Clist_mw/src/cluiopts.cpp | 2 +- plugins/Clist_mw/src/contact.cpp | 8 ++-- plugins/Clist_mw/src/groupmenu.cpp | 42 +++++++++---------- plugins/Clist_mw/src/init.cpp | 6 +-- plugins/Clist_mw/src/keyboard.cpp | 4 +- 19 files changed, 100 insertions(+), 103 deletions(-) (limited to 'plugins/Clist_mw/src') diff --git a/plugins/Clist_mw/src/BkgrCfg.cpp b/plugins/Clist_mw/src/BkgrCfg.cpp index 23fe520f98..8895bacbaa 100644 --- a/plugins/Clist_mw/src/BkgrCfg.cpp +++ b/plugins/Clist_mw/src/BkgrCfg.cpp @@ -248,7 +248,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP return FALSE; } -static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam) +static INT_PTR BkgrCfg_Register(WPARAM wParam, LPARAM lParam) { char *szSetting = (char *)wParam; char *value, *tok; @@ -271,7 +271,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam) return 0; } -int OnOptionsInit(WPARAM wParam,LPARAM lParam) +int OnOptionsInit(WPARAM wParam, LPARAM lParam) { OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = g_hInst; diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index e1844edc2c..b6b51de7c7 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -39,7 +39,7 @@ extern HINSTANCE g_hInst; #define frame_menu_showtitlebar 3 #define frame_menu_floating 4 static int UpdateTBToolTip(int framepos); -INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam); +INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam); int CLUIFrameResizeFloatingFrame(int framepos); extern int InitFramesMenus(void); int GapBetweenTitlebar; @@ -719,12 +719,12 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGENMENU (* return 0; } -INT_PTR ModifyMItem(WPARAM wParam,LPARAM lParam) +INT_PTR ModifyMItem(WPARAM wParam, LPARAM lParam) { return CallService(MS_CLIST_MODIFYMENUITEM, wParam, lParam); } -static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam) +static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam, LPARAM lParam) { lockfrm(); int pos = id2pos(wParam); @@ -776,7 +776,7 @@ static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam) return 0; } -INT_PTR CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesModifyMainMenuItems(WPARAM wParam, LPARAM lParam) { lockfrm(); @@ -829,7 +829,7 @@ INT_PTR CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam) } //hiword(wParam) = frameid,loword(wParam) = flag -INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam, LPARAM lParam) { if (FramesSysNotStarted) return 0; @@ -896,7 +896,7 @@ INT_PTR CLUIFramesGetFrameOptions(WPARAM wParam,LPARAM lParam) } //hiword(wParam) = frameid,loword(wParam) = flag -INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) { lockfrm(); int pos = id2pos(HIWORD(wParam)); @@ -1024,7 +1024,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam) } //wparam = lparam = 0 -static INT_PTR CLUIFramesShowAll(WPARAM wParam,LPARAM lParam) +static INT_PTR CLUIFramesShowAll(WPARAM wParam, LPARAM lParam) { for (int i=0;ihwndContactList,0); return 0; } -INT_PTR CLUIFramesSetAlignalTop(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesSetAlignalTop(WPARAM wParam, LPARAM lParam) { return CLUIFramesSetAlign(wParam,alTop); } -INT_PTR CLUIFramesSetAlignalBottom(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesSetAlignalBottom(WPARAM wParam, LPARAM lParam) { return CLUIFramesSetAlign(wParam,alBottom); } -INT_PTR CLUIFramesSetAlignalClient(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesSetAlignalClient(WPARAM wParam, LPARAM lParam) { return CLUIFramesSetAlign(wParam,alClient); } //wparam = frameid -INT_PTR CLUIFramesLockUnlockFrame(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesLockUnlockFrame(WPARAM wParam, LPARAM lParam) { lockfrm(); int pos = id2pos(wParam); @@ -1177,7 +1177,7 @@ INT_PTR CLUIFramesLockUnlockFrame(WPARAM wParam,LPARAM lParam) } //wparam = frameid -INT_PTR CLUIFramesSetUnSetBorder(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesSetUnSetBorder(WPARAM wParam, LPARAM lParam) { int oldflags; @@ -1206,7 +1206,7 @@ INT_PTR CLUIFramesSetUnSetBorder(WPARAM wParam,LPARAM lParam) } //wparam = frameid -INT_PTR CLUIFramesCollapseUnCollapseFrame(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesCollapseUnCollapseFrame(WPARAM wParam, LPARAM lParam) { int FrameId; @@ -1416,7 +1416,7 @@ static int UpdateTBToolTip(int framepos) } //wparam = (CLISTFrame*)clfrm -INT_PTR CLUIFramesAddFrame(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam) { int style,retval; CLISTFrame *clfrm = (CLISTFrame *)wParam; @@ -1520,7 +1520,7 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam,LPARAM lParam) return retval; } -static INT_PTR CLUIFramesRemoveFrame(WPARAM wParam,LPARAM lParam) +static INT_PTR CLUIFramesRemoveFrame(WPARAM wParam, LPARAM lParam) { if (FramesSysNotStarted) return -1; @@ -1786,7 +1786,7 @@ int CLUIFramesResize(const RECT newsize) return 0; } -INT_PTR CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFramesUpdateFrame(WPARAM wParam, LPARAM lParam) { if (FramesSysNotStarted) return -1; if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); return 0;} @@ -1801,7 +1801,7 @@ INT_PTR CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam) return 0; } -int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam) +int CLUIFramesOnClistResize(WPARAM wParam, LPARAM lParam) { RECT nRect,rcStatus; int tick,i; @@ -1852,7 +1852,7 @@ static COLORREF bkColour; static COLORREF SelBkColour; boolean AlignCOLLIconToLeft; //will hide frame icon -int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam) +int OnFrameTitleBarBackgroundChange(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; @@ -2491,7 +2491,7 @@ int CLUIFrameResizeFloatingFrame(int framepos) return 0; } -static int CLUIFrameOnMainMenuBuild(WPARAM wParam,LPARAM lParam) +static int CLUIFrameOnMainMenuBuild(WPARAM wParam, LPARAM lParam) { CLUIFramesLoadMainMenu(); return 0; @@ -2608,7 +2608,7 @@ static HWND CreateContainerWindow(HWND parent,int x,int y,int width,int height) return(CreateWindowA("FramesContainer","aaaa",WS_POPUP|WS_THICKFRAME,x,y,width,height,parent,0,g_hInst,0)); } -INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam) +INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam) { HWND hwndtmp, hwndtooltiptmp; FRAMEWND *frame; @@ -2700,7 +2700,7 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam) return 0; } -static int CLUIFrameOnFontChange(WPARAM wParam,LPARAM lParam) +static int CLUIFrameOnFontChange(WPARAM wParam, LPARAM lParam) { FontID fid = {0}; fid.cbSize = sizeof(fid); @@ -2731,7 +2731,7 @@ static void CLUIRegisterFonts() HookEvent(ME_FONT_RELOAD,CLUIFrameOnFontChange); } -static int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam) +static int CLUIFrameOnModulesLoad(WPARAM wParam, LPARAM lParam) { CLUIFramesLoadMainMenu(); CLUIFramesCreateMenuForFrame(-1,-1,000010000,Menu_AddContextFrameMenuItem); @@ -2739,7 +2739,7 @@ static int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam) return 0; } -static int CLUIFrameOnModulesUnload(WPARAM wParam,LPARAM lParam) +static int CLUIFrameOnModulesUnload(WPARAM wParam, LPARAM lParam) { CallService(MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, ( LPARAM )contMIVisible, 0 ); CallService(MS_CLIST_REMOVECONTEXTFRAMEMENUITEM, ( LPARAM )contMITitle, 0 ); diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.h b/plugins/Clist_mw/src/CLUIFrames/cluiframes.h index 2161b6623b..6f8b4a5f82 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.h +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. int LoadCLUIFramesModule(void); int UnLoadCLUIFramesModule(void); int CLUIFramesGetMinHeight(); -int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam); +int CLUIFramesOnClistResize(WPARAM wParam, LPARAM lParam); typedef struct tagProtocolData { char *RealName; diff --git a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp index 59c24463b8..da1ce57d05 100644 --- a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp @@ -88,7 +88,7 @@ static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam) return 0; } -static INT_PTR BuildContextFrameMenu(WPARAM wParam,LPARAM lParam) +static INT_PTR BuildContextFrameMenu(WPARAM wParam, LPARAM lParam) { ListParam param = { 0 }; param.MenuObjectHandle = hFrameMenuObject; diff --git a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp index 2b82d539b4..975664458d 100644 --- a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp @@ -8,7 +8,7 @@ HANDLE hFrameHelperStatusBar; void CluiProtocolStatusChanged(int parStatus, const char* szProto); -INT_PTR GetConnectingIconService (WPARAM wParam,LPARAM lParam); +INT_PTR GetConnectingIconService (WPARAM wParam, LPARAM lParam); int RecreateStatusBar(HWND); int UseOwnerDrawStatusBar; diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 66a00dff3b..a4459348af 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -29,10 +29,10 @@ HIMAGELIST himlCListClc; static HANDLE hSettingChanged1; -int BgStatusBarChange(WPARAM wParam,LPARAM lParam); +int BgStatusBarChange(WPARAM wParam, LPARAM lParam); -int BgClcChange(WPARAM wParam,LPARAM lParam); -int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam); +int BgClcChange(WPARAM wParam, LPARAM lParam); +int OnFrameTitleBarBackgroundChange(WPARAM wParam, LPARAM lParam); void InitDisplayNameCache(SortedList *list); void FreeDisplayNameCache(SortedList *list); @@ -109,7 +109,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) return 0; } -static int ClcModulesLoaded(WPARAM wParam,LPARAM lParam) +static int ClcModulesLoaded(WPARAM wParam, LPARAM lParam) { CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)(LPGEN("Status bar background")"/StatusBar"),0); CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)(LPGEN("List background")"/CLC"),0); @@ -300,7 +300,7 @@ int LoadCLCModule(void) ///////////////////////////////////////////////////////////////////////////////////////// -static INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam) +static INT_PTR CLUIGetCapsService(WPARAM wParam, LPARAM lParam) { switch (wParam) { case CLUICAPS_FLAGS1: diff --git a/plugins/Clist_mw/src/clc.h b/plugins/Clist_mw/src/clc.h index d48f962476..841fb25576 100644 --- a/plugins/Clist_mw/src/clc.h +++ b/plugins/Clist_mw/src/clc.h @@ -100,7 +100,7 @@ int GetNewSelection(ClcGroup *group,int selection, int direction); void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat); //clcmsgs.c -LRESULT ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam); +LRESULT ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARAM wParam, LPARAM lParam); //clcutils.c void RecalcScrollBar(HWND hwnd,struct ClcData *dat); @@ -113,7 +113,7 @@ void LoadClcOptions(HWND hwnd,struct ClcData *dat); void PaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint); //clcopts.c -int ClcOptInit(WPARAM wParam,LPARAM lParam); +int ClcOptInit(WPARAM wParam, LPARAM lParam); //clcfiledrop.c void InitFileDropping(void); diff --git a/plugins/Clist_mw/src/clcopts.cpp b/plugins/Clist_mw/src/clcopts.cpp index 2b6c874d20..5c3120e29d 100644 --- a/plugins/Clist_mw/src/clcopts.cpp +++ b/plugins/Clist_mw/src/clcopts.cpp @@ -36,20 +36,20 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); int OnStatusBarBackgroundChange(); -int BgClcChange(WPARAM wParam,LPARAM lParam) +int BgClcChange(WPARAM wParam, LPARAM lParam) { pcli->pfnClcOptionsChanged(); return 0; } -int BgStatusBarChange(WPARAM wParam,LPARAM lParam) +int BgStatusBarChange(WPARAM wParam, LPARAM lParam) { pcli->pfnClcOptionsChanged(); OnStatusBarBackgroundChange(); return 0; } -int ClcOptInit(WPARAM wParam,LPARAM lParam) +int ClcOptInit(WPARAM wParam, LPARAM lParam) { OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = g_hInst; diff --git a/plugins/Clist_mw/src/clistmenus.cpp b/plugins/Clist_mw/src/clistmenus.cpp index 4b7ee0b425..3cf09e3234 100644 --- a/plugins/Clist_mw/src/clistmenus.cpp +++ b/plugins/Clist_mw/src/clistmenus.cpp @@ -40,7 +40,7 @@ void DestroyTrayMenu(HMENU hMenu) DestroyMenu(hMenu); } -INT_PTR CloseAction(WPARAM wParam,LPARAM lParam) +INT_PTR CloseAction(WPARAM wParam, LPARAM lParam) { if ( CallService(MS_SYSTEM_OKTOEXIT,0,0)) DestroyWindow(pcli->hwndContactList); diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index 13720def98..ce81fee4bc 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -28,10 +28,10 @@ extern int DefaultImageListColorDepth; int InitCustomMenus(void); void UninitCustomMenus(void); -int ContactSettingChanged(WPARAM wParam,LPARAM lParam); -int CListOptInit(WPARAM wParam,LPARAM lParam); -INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam); -INT_PTR HotkeysProcessMessage(WPARAM wParam,LPARAM lParam) { return pcli->pfnHotkeysProcessMessage(wParam, lParam); } +int ContactSettingChanged(WPARAM wParam, LPARAM lParam); +int CListOptInit(WPARAM wParam, LPARAM lParam); +INT_PTR ContactChangeGroup(WPARAM wParam, LPARAM lParam); +INT_PTR HotkeysProcessMessage(WPARAM wParam, LPARAM lParam) { return pcli->pfnHotkeysProcessMessage(wParam, lParam); } void InitTrayMenus(void); HIMAGELIST hCListImages; @@ -95,7 +95,7 @@ int ExtIconFromStatusMode(MCONTACT hContact, const char *szProto,int status) /////////// End by FYR //////// -static int ProtocolAck(WPARAM wParam,LPARAM lParam) +static int ProtocolAck(WPARAM wParam, LPARAM lParam) { ACKDATA *ack = (ACKDATA*)lParam; if (ack->type == ACKTYPE_AWAYMSG && ack->lParam) { @@ -119,7 +119,7 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam) return pcli->currentDesiredStatusMode; } -static int ContactListShutdownProc(WPARAM wParam,LPARAM lParam) +static int ContactListShutdownProc(WPARAM wParam, LPARAM lParam) { UnhookEvent(hProtoAckHook); UninitCustomMenus(); diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index cf834b6157..5166bf63af 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -32,7 +32,7 @@ void SortContacts(void); static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -int CListOptInit(WPARAM wParam,LPARAM lParam) +int CListOptInit(WPARAM wParam, LPARAM lParam) { OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.position = -1000000000; diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index f562742124..0bf9e3711a 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -257,10 +257,9 @@ int GetContactCachedStatus(MCONTACT hContact) return 0; } -int ContactSettingChanged(WPARAM wParam,LPARAM lParam) +int ContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - MCONTACT hContact = wParam; // Early exit if (hContact == NULL) @@ -315,7 +314,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if ( !strcmp(cws->szSetting,"Hidden")) { InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type); if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) { - char *szProto = GetContactProto(wParam); + char *szProto = GetContactProto(hContact); ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact, szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)), 1); //by FYR } } diff --git a/plugins/Clist_mw/src/clisttray.cpp b/plugins/Clist_mw/src/clisttray.cpp index 8e5a309dee..03a3617ee8 100644 --- a/plugins/Clist_mw/src/clisttray.cpp +++ b/plugins/Clist_mw/src/clisttray.cpp @@ -28,10 +28,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TIM_CALLBACK (WM_USER+1857) #define TIM_CREATE (WM_USER+1858) -extern INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam,LPARAM lParam); +extern INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam, LPARAM lParam); void DestroyTrayMenu(HMENU hMenu); -INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) +INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) { MSG *msg = (MSG*)wParam; switch(msg->message) { @@ -83,13 +83,13 @@ typedef struct wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM return 0 on success. */ -static INT_PTR RemoveTrayMenuItem(WPARAM wParam,LPARAM lParam) +static INT_PTR RemoveTrayMenuItem(WPARAM wParam, LPARAM lParam) { CallService(MO_REMOVEMENUITEM,wParam,0); return 0; } -static INT_PTR BuildTrayMenu(WPARAM wParam,LPARAM lParam) +static INT_PTR BuildTrayMenu(WPARAM wParam, LPARAM lParam) { int tick; HMENU hMenu; @@ -109,7 +109,7 @@ static INT_PTR BuildTrayMenu(WPARAM wParam,LPARAM lParam) return (INT_PTR)hMenu; } -static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam) +static INT_PTR AddTrayMenuItem(WPARAM wParam, LPARAM lParam) { TMO_MenuItem tmi; CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam; @@ -132,12 +132,12 @@ static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam) return (INT_PTR)op.Handle; } -INT_PTR TrayMenuCheckService(WPARAM wParam,LPARAM lParam) +INT_PTR TrayMenuCheckService(WPARAM wParam, LPARAM lParam) { return 0; } -INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam) +INT_PTR TrayMenuonAddService(WPARAM wParam, LPARAM lParam) { MENUITEMINFO *mii = (MENUITEMINFO* )wParam; if (mii == NULL) return 0; @@ -164,7 +164,7 @@ INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam) //called with: //wparam - ownerdata //lparam - lparam from winproc -INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam) +INT_PTR TrayMenuExecService(WPARAM wParam, LPARAM lParam) { if (wParam != 0) { @@ -179,7 +179,7 @@ INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam) return(1); } -INT_PTR FreeOwnerDataTrayMenu (WPARAM wParam,LPARAM lParam) +INT_PTR FreeOwnerDataTrayMenu (WPARAM wParam, LPARAM lParam) { lpTrayMenuExecParam mmep; diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index 4ed273132a..f7d929cce5 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -59,15 +59,15 @@ int CycleTimeInterval = 2000; int CycleIconCount = 8; int DefaultStep = 100; -int CluiOptInit(WPARAM wParam,LPARAM lParam); -int SortList(WPARAM wParam,LPARAM lParam); +int CluiOptInit(WPARAM wParam, LPARAM lParam); +int SortList(WPARAM wParam, LPARAM lParam); void CluiProtocolStatusChanged(int parStatus, const char* szProto); extern void ReloadExtraIcons(); extern HWND CreateStatusBarhWnd(HWND parent); extern HANDLE CreateStatusBarFrame(); -extern int CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam); +extern int CLUIFramesUpdateFrame(WPARAM wParam, LPARAM lParam); extern void DrawDataForStatusBar(LPDRAWITEMSTRUCT dis); extern void InitGroupMenus(); extern int UseOwnerDrawStatusBar; @@ -77,7 +77,7 @@ HICON GetConnectingIconForProto_DLL(char *szProto,int b); void RegisterProtoIconsForAllProtoIconLib(); -static int CluiModulesLoaded(WPARAM wParam,LPARAM lParam) +static int CluiModulesLoaded(WPARAM wParam, LPARAM lParam) { MENUITEMINFO mii = { sizeof(mii) }; mii.fMask = MIIM_SUBMENU; @@ -278,7 +278,7 @@ HICON GetConnectingIconForProto(char *szProto,int b) } //wParam == szProto -INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam) +INT_PTR GetConnectingIconService(WPARAM wParam, LPARAM lParam) { int b; ProtoTicks *pt = NULL; @@ -299,7 +299,7 @@ INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam) return (INT_PTR)hIcon; } -int CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) +int CreateTimerForConnectingIcon(WPARAM wParam, LPARAM lParam) { int status = (int)wParam; char *szProto = (char *)lParam; @@ -334,7 +334,7 @@ int CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) // Restore protocols to the last global status. // Used to reconnect on restore after standby. -int OnSettingChanging(WPARAM wParam,LPARAM lParam) +int OnSettingChanging(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *)lParam; if (wParam == 0) { diff --git a/plugins/Clist_mw/src/cluiopts.cpp b/plugins/Clist_mw/src/cluiopts.cpp index 1e8aab4792..4669f576a6 100644 --- a/plugins/Clist_mw/src/cluiopts.cpp +++ b/plugins/Clist_mw/src/cluiopts.cpp @@ -33,7 +33,7 @@ extern int UseOwnerDrawStatusBar; void CluiProtocolStatusChanged(int parStatus, const char* szProto); int OnStatusBarBackgroundChange(); -int CluiOptInit(WPARAM wParam,LPARAM lParam) +int CluiOptInit(WPARAM wParam, LPARAM lParam) { OPTIONSDIALOGPAGE odp = { sizeof(odp) }; odp.hInstance = g_hInst; diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index 695be8f1c9..1f24968256 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -165,16 +165,14 @@ void SortContacts(void) sortByProto = db_get_b(NULL,"CList","SortByProto",SETTING_SORTBYPROTO_DEFAULT); } -INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam) +INT_PTR ContactChangeGroup(WPARAM hContact, LPARAM lParam) { - MCONTACT hContact = wParam; - - CallService(MS_CLUI_CONTACTDELETED,wParam,0); + CallService(MS_CLUI_CONTACTDELETED, hContact, 0); if ((HANDLE)lParam == NULL) db_unset(hContact, "CList", "Group"); else db_set_s(hContact, "CList", "Group", (char*)CallService(MS_CLIST_GROUPGETNAME2, lParam, (LPARAM)(int*)NULL)); - CallService(MS_CLUI_CONTACTADDED, wParam, ExtIconFromStatusMode(hContact, GetContactProto(hContact), GetContactStatus(hContact))); + CallService(MS_CLUI_CONTACTADDED, hContact, ExtIconFromStatusMode(hContact, GetContactProto(hContact), GetContactStatus(hContact))); return 0; } diff --git a/plugins/Clist_mw/src/groupmenu.cpp b/plugins/Clist_mw/src/groupmenu.cpp index cd64420626..e911a3f5f5 100644 --- a/plugins/Clist_mw/src/groupmenu.cpp +++ b/plugins/Clist_mw/src/groupmenu.cpp @@ -56,14 +56,14 @@ int Param1,Param2; wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM return 0 on success. */ -static INT_PTR RemoveGroupMenuItem(WPARAM wParam,LPARAM lParam) +static INT_PTR RemoveGroupMenuItem(WPARAM wParam, LPARAM lParam) { CallService(MO_REMOVEMENUITEM,wParam,0); return 0; } -static INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam) +static INT_PTR BuildGroupMenu(WPARAM wParam, LPARAM lParam) { int tick; HMENU hMenu; @@ -83,7 +83,7 @@ static INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam) return (INT_PTR)hMenu; } -static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) +static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) { TMO_MenuItem tmi; CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam; @@ -118,12 +118,12 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) // return MENU_CUSTOMITEMMAIN|(mainMenuItem[mainItemCount-1].id); } -INT_PTR GroupMenuCheckService(WPARAM wParam,LPARAM lParam) { +INT_PTR GroupMenuCheckService(WPARAM wParam, LPARAM lParam) { //not used return 0; } -INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) { +INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) { MENUITEMINFO *mii = (MENUITEMINFO* )wParam; if (mii == NULL) return 0; @@ -149,7 +149,7 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) { //called with: //wparam - ownerdata //lparam - lparam from winproc -INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) { +INT_PTR GroupMenuExecService(WPARAM wParam, LPARAM lParam) { if (wParam != 0) { lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam; @@ -167,7 +167,7 @@ INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) { return(1); } -INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam) +INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam, LPARAM lParam) { lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)lParam; if (mmep != NULL) { @@ -177,7 +177,7 @@ INT_PTR FreeOwnerDataGroupMenu (WPARAM wParam,LPARAM lParam) return 0; } -INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam) +INT_PTR HideGroupsHelper(WPARAM wParam, LPARAM lParam) { int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS); db_set_b(NULL,"CList","HideEmptyGroups",(BYTE)newVal); @@ -185,7 +185,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam) return 0; } -INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam) +INT_PTR UseGroupsHelper(WPARAM wParam, LPARAM lParam) { int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS); db_set_b(NULL,"CList","UseGroups",(BYTE)newVal); @@ -193,7 +193,7 @@ INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam) return 0; } -INT_PTR HideOfflineRootHelper(WPARAM wParam,LPARAM lParam) +INT_PTR HideOfflineRootHelper(WPARAM wParam, LPARAM lParam) { SendMessage( pcli->hwndContactTree, @@ -203,7 +203,7 @@ SendMessage( return 0; } -static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam) +static int OnBuildGroupMenu(WPARAM wParam, LPARAM lParam) { CLISTMENUITEM mi = { sizeof(mi) }; mi.flags = CMIM_FLAGS | ( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0); @@ -220,7 +220,7 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam) return 0; } -int static OnIconLibIconChanged(WPARAM wParam,LPARAM lParam) +int static OnIconLibIconChanged(WPARAM wParam, LPARAM lParam) { HICON hicon = LoadIconFromExternalFile("clisticons.dll",2,TRUE,FALSE,"NewGroup","Contact list","New Group",-IDI_NEWGROUP,0); NewGroupIconidx = ImageList_ReplaceIcon(hCListImages,NewGroupIconidx,hicon); @@ -384,13 +384,13 @@ int Param1,Param2; wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM return 0 on success. */ -static INT_PTR RemoveSubGroupMenuItem(WPARAM wParam,LPARAM lParam) +static INT_PTR RemoveSubGroupMenuItem(WPARAM wParam, LPARAM lParam) { CallService(MO_REMOVEMENUITEM,wParam,0); return 0; } -static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam) +static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM lParam) { ClcGroup *group = (ClcGroup *)wParam; if (wParam == 0) return 0; @@ -402,7 +402,7 @@ static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam) return 0; } -static INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam) +static INT_PTR BuildSubGroupMenu(WPARAM wParam, LPARAM lParam) { int tick; HMENU hMenu; @@ -423,7 +423,7 @@ static INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam) return (INT_PTR)hMenu; } -static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam) +static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) { TMO_MenuItem tmi; CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam; @@ -455,12 +455,12 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam) return (INT_PTR)op.Handle; } -INT_PTR SubGroupMenuCheckService(WPARAM wParam,LPARAM lParam) +INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM lParam) { return 0; } -INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam) +INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM lParam) { MENUITEMINFO *mii = (MENUITEMINFO* )wParam; if (mii == NULL) @@ -472,7 +472,7 @@ INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam) //called with: //wparam - ownerdata //lparam - lparam from winproc -INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam) +INT_PTR SubGroupMenuExecService(WPARAM wParam, LPARAM lParam) { if (wParam != 0) { lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam; @@ -487,7 +487,7 @@ INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam) return 1; } -INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam,LPARAM lParam) +INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam, LPARAM lParam) { lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)lParam; if (mmep != NULL) { @@ -498,7 +498,7 @@ INT_PTR FreeOwnerDataSubGroupMenu (WPARAM wParam,LPARAM lParam) } //wparam menu handle to pass to clc.c -INT_PTR GroupMenuExecProxy(WPARAM wParam,LPARAM lParam) +INT_PTR GroupMenuExecProxy(WPARAM wParam, LPARAM lParam) { SendMessage(pcli->hwndContactTree,WM_COMMAND,wParam,0); return 0; diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp index 78b9f51a9a..dd509257b9 100644 --- a/plugins/Clist_mw/src/init.cpp +++ b/plugins/Clist_mw/src/init.cpp @@ -64,8 +64,8 @@ int AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); void ( *saveSortCLC )(HWND hwnd,struct ClcData *dat,int useInsertionSort); void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort); -INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam,LPARAM lParam); -INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam); +INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam, LPARAM lParam); +INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam); int (*saveIconFromStatusMode)(const char *szProto,int nStatus, MCONTACT hContact); int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact); @@ -120,7 +120,7 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) return 0; } -INT_PTR SetDrawer(WPARAM wParam,LPARAM lParam) +INT_PTR SetDrawer(WPARAM wParam, LPARAM lParam) { pDrawerServiceStruct DSS = (pDrawerServiceStruct)wParam; if (DSS->cbSize != sizeof(*DSS)) return -1; diff --git a/plugins/Clist_mw/src/keyboard.cpp b/plugins/Clist_mw/src/keyboard.cpp index 58c406056d..bd8a438231 100644 --- a/plugins/Clist_mw/src/keyboard.cpp +++ b/plugins/Clist_mw/src/keyboard.cpp @@ -25,13 +25,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h" #include -INT_PTR hkCloseMiranda(WPARAM wParam,LPARAM lParam) +INT_PTR hkCloseMiranda(WPARAM wParam, LPARAM lParam) { CallService("CloseAction", 0, 0); return 0; } -INT_PTR hkRestoreStatus(WPARAM wParam,LPARAM lParam) +INT_PTR hkRestoreStatus(WPARAM wParam, LPARAM lParam) { int nStatus = db_get_w(NULL, "CList", "Status", ID_STATUS_OFFLINE); CallService(MS_CLIST_SETSTATUSMODE, nStatus, 0); -- cgit v1.2.3