From 18f6faf592c21341463e835599b61fa811d3e1a0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 27 Jan 2013 11:57:40 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@3301 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/hdr/modern_clc.h | 2 +- plugins/Clist_modern/src/init.cpp | 2 +- plugins/Clist_modern/src/m_api/m_skin_eng.h | 2 +- plugins/Clist_modern/src/modern_aniavatars.cpp | 62 +++--- plugins/Clist_modern/src/modern_awaymsg.cpp | 8 +- plugins/Clist_modern/src/modern_cachefuncs.cpp | 14 +- plugins/Clist_modern/src/modern_clc.cpp | 60 +++--- plugins/Clist_modern/src/modern_clcidents.cpp | 6 +- plugins/Clist_modern/src/modern_clcitems.cpp | 6 +- plugins/Clist_modern/src/modern_clcmsgs.cpp | 4 +- plugins/Clist_modern/src/modern_clcopts.cpp | 238 ++++++++++----------- plugins/Clist_modern/src/modern_clcutils.cpp | 28 +-- plugins/Clist_modern/src/modern_clistevents.cpp | 16 +- plugins/Clist_modern/src/modern_clistmenus.cpp | 4 +- plugins/Clist_modern/src/modern_clistmod.cpp | 12 +- plugins/Clist_modern/src/modern_clistopts.cpp | 64 +++--- plugins/Clist_modern/src/modern_clistsettings.cpp | 12 +- plugins/Clist_modern/src/modern_clisttray.cpp | 160 ++++++-------- plugins/Clist_modern/src/modern_clui.cpp | 150 ++++++------- plugins/Clist_modern/src/modern_cluiframes.cpp | 226 +++++++++---------- plugins/Clist_modern/src/modern_cluiservices.cpp | 14 +- plugins/Clist_modern/src/modern_contact.cpp | 2 +- plugins/Clist_modern/src/modern_docking.cpp | 12 +- plugins/Clist_modern/src/modern_gdiplus.cpp | 14 +- plugins/Clist_modern/src/modern_gettextasync.cpp | 6 +- plugins/Clist_modern/src/modern_groupmenu.cpp | 69 +++--- plugins/Clist_modern/src/modern_newrowopts.cpp | 4 +- plugins/Clist_modern/src/modern_popup.cpp | 61 ++---- plugins/Clist_modern/src/modern_row.cpp | 6 +- .../Clist_modern/src/modern_rowheight_funcs.cpp | 18 +- plugins/Clist_modern/src/modern_rowtemplateopt.cpp | 30 +-- plugins/Clist_modern/src/modern_skinbutton.cpp | 14 +- plugins/Clist_modern/src/modern_skineditor.cpp | 134 ++++++------ plugins/Clist_modern/src/modern_skinengine.cpp | 182 ++++++++-------- plugins/Clist_modern/src/modern_skinselector.cpp | 12 +- plugins/Clist_modern/src/modern_statusbar.cpp | 54 ++--- .../Clist_modern/src/modern_statusbar_options.cpp | 68 +++--- plugins/Clist_modern/src/modern_tbbutton.cpp | 8 +- plugins/Clist_modern/src/modern_toolbar.cpp | 6 +- plugins/Clist_modern/src/modern_utils.cpp | 4 +- plugins/Clist_modern/src/modern_viewmodebar.cpp | 28 +-- plugins/Clist_modern/src/modern_xptheme.cpp | 2 +- 42 files changed, 887 insertions(+), 937 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/hdr/modern_clc.h b/plugins/Clist_modern/src/hdr/modern_clc.h index be3956db26..79b06bca8f 100644 --- a/plugins/Clist_modern/src/hdr/modern_clc.h +++ b/plugins/Clist_modern/src/hdr/modern_clc.h @@ -185,7 +185,7 @@ typedef struct tagClcContactTextPiece } ClcContactTextPiece; enum { - CIT_PAINT_END=0, //next items are invalids + CIT_PAINT_END=0, //next items are invalids CIT_AVATAR, // 1 CIT_ICON, // 2 CIT_TEXT, // 3 //the contact name or group name diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 81785bb3c7..c8b6ed501a 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -120,7 +120,7 @@ PLUGININTERFACE int CListInitialise() // never called by a newer plugin loader. PLUGININTERFACE int Load(void) { - MessageBoxA(0,"You Running Old Miranda, use " MINIMAL_COREVERSION_STR " version!","Modern Clist",0); + MessageBoxA(0, "You Running Old Miranda, use " MINIMAL_COREVERSION_STR " version!","Modern Clist",0); return 1; } diff --git a/plugins/Clist_modern/src/m_api/m_skin_eng.h b/plugins/Clist_modern/src/m_api/m_skin_eng.h index 78de34e2bb..c610fbed0d 100644 --- a/plugins/Clist_modern/src/m_api/m_skin_eng.h +++ b/plugins/Clist_modern/src/m_api/m_skin_eng.h @@ -313,7 +313,7 @@ int __inline SkinEngInvalidateImageFrame(HWND hwnd, CONST RECT * rcUpdate, DWORD int __inline SkinInvalidateFrame(HWND hWnd, CONST RECT* lpRect) { - return SkinEngInvalidateImageFrame(hWnd,lpRect,0,0); + return SkinEngInvalidateImageFrame(hWnd,lpRect,0, 0); } // Alpha channel GDI replacements/helpers diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 60d253c028..ad35b6f3fd 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -192,7 +192,7 @@ int _AniAva_OnModulesUnload(WPARAM wParam,LPARAM lParam) // Init AniAva module int AniAva_InitModule() { - memset(&AniAva,0,sizeof(AniAva)); + memset(&AniAva, 0, sizeof(AniAva)); if (g_CluiData.fGDIPlusFail) return 0; if ( !( db_get_b(NULL,"CList","AvatarsAnimated",( ServiceExists(MS_AV_GETAVATARBITMAP) && !g_CluiData.fGDIPlusFail)) && db_get_b(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT))) return 0; @@ -209,8 +209,8 @@ int AniAva_InitModule() RegisterClassEx(&wc); } InitializeCriticalSection(&AniAva.CS); - AniAva.Objects = List_Create(0,2); - AniAva.AniAvatarList = List_Create(0,1); + AniAva.Objects = List_Create(0, 2); + AniAva.AniAvatarList = List_Create(0, 1); AniAva.AniAvatarList->sortFunc = _AniAva_SortAvatarInfo; AniAva.bModuleStarted = TRUE; AniAva.hExitEvent = CreateEvent(NULL,FALSE,FALSE,NULL); @@ -281,7 +281,7 @@ int AniAva_UpdateOptions() AniAva_InvalidateAvatarPositions(NULL); AniAva_RemoveInvalidatedAvatars(); } - if ( bReloadAvatars ) PostMessage(pcli->hwndContactTree,INTM_AVATARCHANGED,0,0); + if ( bReloadAvatars ) PostMessage(pcli->hwndContactTree,INTM_AVATARCHANGED,0, 0); else AniAva_RedrawAllAvatars(TRUE); return 0; } @@ -406,7 +406,7 @@ int AniAva_SetAvatarPos(HANDLE hContact, RECT *rc, int overlayIdx, BYTE bAlpha) //not found -> create window char szName[150] = "AniAvaWnd_"; TCHAR * tszName; - _itoa((int)hContact,szName+10,16); + _itoa((int)hContact,szName+10, 16); tszName = mir_a2t( szName ); hwnd = _AniAva_CreateAvatarWindowSync(tszName); @@ -481,7 +481,7 @@ int AniAva_RemoveInvalidatedAvatars() ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i]; if (pai->hWindow && (pai->bInvalidPos)) { - SendMessage(pai->hWindow,AAM_STOP,0,0); + SendMessage(pai->hWindow,AAM_STOP, 0, 0); if (pai->bInvalidPos)//>3) { //keepAvatar = TRUE; @@ -535,7 +535,7 @@ static void CALLBACK _AniAva_SyncCallerUserAPCProc(DWORD_PTR dwParam) static INT_PTR _AniAva_CreateAvatarWindowSync_Worker(WPARAM tszName, LPARAM lParam) { HWND hwnd = CreateWindowEx( WS_EX_TOPMOST | WS_EX_TRANSPARENT | WS_EX_NOPARENTNOTIFY,ANIAVAWINDOWCLASS,(TCHAR*)tszName,WS_POPUP, - 0,0,1,1,pcli->hwndContactList, NULL, pcli->hInst, NULL ); + 0, 0, 1,1,pcli->hwndContactList, NULL, pcli->hInst, NULL ); return (INT_PTR)hwnd; } @@ -602,9 +602,9 @@ static void _AniAva_RealRemoveAvatar(DWORD UniqueID) hNewOldBmp = (HBITMAP)SelectObject(hNewDC,hNewBmp); // copy from old and from new strip if (aai->nStripTop>0) - BitBlt(hNewDC,0,0,aai->nStripTop,newHeight,AniAva.hAniAvaDC,0,0, SRCCOPY); + BitBlt(hNewDC, 0, 0, aai->nStripTop,newHeight,AniAva.hAniAvaDC, 0, 0, SRCCOPY); if (aai->nStripTop+aai->FrameSize.cx*aai->nFrameCount < AniAva.width) - BitBlt(hNewDC,aai->nStripTop,0,AniAva.width-(aai->nStripTop+aai->FrameSize.cx*aai->nFrameCount),newHeight,AniAva.hAniAvaDC,aai->nStripTop+aai->FrameSize.cx*aai->nFrameCount,0, SRCCOPY); + BitBlt(hNewDC,aai->nStripTop, 0, AniAva.width-(aai->nStripTop+aai->FrameSize.cx*aai->nFrameCount),newHeight,AniAva.hAniAvaDC,aai->nStripTop+aai->FrameSize.cx*aai->nFrameCount, 0, SRCCOPY); _AniAva_RemoveAniAvaDC(&AniAva); AniAva.hAniAvaDC = hNewDC; @@ -645,7 +645,7 @@ static void _AniAva_RemoveAniAvaDC(ANIAVA * pAniAva) static void _AniAva_DestroyAvatarWindow( HWND hwnd) { - SendMessage(hwnd,AAM_SELFDESTROY,0,0); + SendMessage(hwnd,AAM_SELFDESTROY, 0, 0); } static int _AniAva_LoadAvatarFromImage(TCHAR * szFileName, int width, int height, ANIAVATARIMAGEINFO * pRetAII) { @@ -695,8 +695,8 @@ static int _AniAva_LoadAvatarFromImage(TCHAR * szFileName, int width, int height _AniAva_PausePainting(); GdiFlush(); // copy from old and from new strip - BitBlt(hNewDC,0,0,AniAva.width,AniAva.height,AniAva.hAniAvaDC,0,0, SRCCOPY); - BitBlt(hNewDC,AniAva.width,0,paai->FrameSize.cx*paai->nFrameCount,paai->FrameSize.cy,hTempDC,0,0, SRCCOPY); + BitBlt(hNewDC, 0, 0, AniAva.width,AniAva.height,AniAva.hAniAvaDC, 0, 0, SRCCOPY); + BitBlt(hNewDC,AniAva.width, 0, paai->FrameSize.cx*paai->nFrameCount,paai->FrameSize.cy,hTempDC, 0, 0, SRCCOPY); paai->nStripTop = AniAva.width; @@ -775,7 +775,7 @@ static void __AniAva_DebugRenderStrip() #ifdef _DEBUG { HDC hDC_debug = GetDC(NULL); - BitBlt(hDC_debug,0,0,AniAva.width, AniAva.height,AniAva.hAniAvaDC,0,0,SRCCOPY); + BitBlt(hDC_debug, 0, 0, AniAva.width, AniAva.height,AniAva.hAniAvaDC, 0, 0, SRCCOPY); DeleteDC(hDC_debug); } #endif @@ -795,8 +795,8 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL { POINT ptWnd = {0}; SIZE szWnd = {dat->rcPos.right-dat->rcPos.left,dat->rcPos.bottom-dat->rcPos.top}; - BLENDFUNCTION bf = {AC_SRC_OVER, 0,g_CluiData.bCurrentAlpha*dat->bAlpha/256, AC_SRC_ALPHA }; - POINT pt_from = {0,0}; + BLENDFUNCTION bf = {AC_SRC_OVER, 0, g_CluiData.bCurrentAlpha*dat->bAlpha/256, AC_SRC_ALPHA }; + POINT pt_from = {0, 0}; HDC hDC_animation = GetDC(NULL); HDC copyFromDC; RECT clistRect; @@ -866,11 +866,11 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL } // draw avatar if ( !(AniAva.bFlags & AAO_OPAQUE)) - BitBlt(tempDC,0, 0, szWnd.cx, szWnd.cy , AniAva.hAniAvaDC , dat->ptFromPoint.x+dat->sizeAvatar.cx*dat->currentFrame, dat->ptFromPoint.y, SRCCOPY); + BitBlt(tempDC, 0, 0, szWnd.cx, szWnd.cy , AniAva.hAniAvaDC , dat->ptFromPoint.x+dat->sizeAvatar.cx*dat->currentFrame, dat->ptFromPoint.y, SRCCOPY); else { BLENDFUNCTION abf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA }; - ske_AlphaBlend(tempDC,0, 0, szWnd.cx, szWnd.cy , AniAva.hAniAvaDC, dat->ptFromPoint.x+dat->sizeAvatar.cx*dat->currentFrame, dat->ptFromPoint.y, szWnd.cx, szWnd.cy, abf); + ske_AlphaBlend(tempDC, 0, 0, szWnd.cx, szWnd.cy , AniAva.hAniAvaDC, dat->ptFromPoint.x+dat->sizeAvatar.cx*dat->currentFrame, dat->ptFromPoint.y, szWnd.cx, szWnd.cy, abf); } // reset clip area if ( hRgn ) @@ -921,7 +921,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL ske_AlphaBlend( hdcParent, rcInParent->left, rcInParent->top, szWnd.cx, szWnd.cy, copyFromDC, pt_from.x, pt_from.y, szWnd.cx, szWnd.cy, abf); } } - else if ( !g_proc_UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0,0,0), &bf, ULW_ALPHA )) + else if ( !g_proc_UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0, 0, 0), &bf, ULW_ALPHA )) { LONG exStyle; exStyle = GetWindowLongPtr(dat->hWindow,GWL_EXSTYLE); @@ -929,7 +929,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL SetWindowLongPtr(dat->hWindow,GWL_EXSTYLE,exStyle); if ( !IMMEDIATE_DRAW ) SetWindowPos( pcli->hwndContactTree, dat->hWindow, 0, 0, 0, 0, SWP_ASYNCWINDOWPOS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING ); - g_proc_UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0,0,0), &bf, ULW_ALPHA ); + g_proc_UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0, 0, 0), &bf, ULW_ALPHA ); } g_CluiData.fAeroGlass = false; @@ -960,7 +960,7 @@ static void _AniAva_PausePainting() for (i=0; i < AniAva.Objects->realCount; i++) { ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i]; - SendMessage(pai->hWindow,AAM_PAUSE,0,0); + SendMessage(pai->hWindow,AAM_PAUSE, 0, 0); } } static void _AniAva_ResumePainting() @@ -969,7 +969,7 @@ static void _AniAva_ResumePainting() for (i=0; i < AniAva.Objects->realCount; i++) { ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i]; - SendNotifyMessage(pai->hWindow,AAM_RESUME,0,0); + SendNotifyMessage(pai->hWindow,AAM_RESUME, 0, 0); } } @@ -996,9 +996,9 @@ static void _AniAva_LoadOptions() aacheck; aalock; { - AniAva.bFlags = (db_get_b(NULL,"CList","AvatarsDrawBorders",SETTINGS_AVATARDRAWBORDER_DEFAULT)? AAO_HAS_BORDER :0) | - (db_get_b(NULL,"CList","AvatarsRoundCorners",SETTINGS_AVATARROUNDCORNERS_DEFAULT)? AAO_ROUND_CORNERS :0) | - (db_get_b(NULL,"CList","AvatarsDrawOverlay",SETTINGS_AVATARDRAWOVERLAY_DEFAULT)? AAO_HAS_OVERLAY :0) | + AniAva.bFlags = ( db_get_b(NULL,"CList","AvatarsDrawBorders",SETTINGS_AVATARDRAWBORDER_DEFAULT)? AAO_HAS_BORDER :0) | + ( db_get_b(NULL,"CList","AvatarsRoundCorners",SETTINGS_AVATARROUNDCORNERS_DEFAULT)? AAO_ROUND_CORNERS :0) | + ( db_get_b(NULL,"CList","AvatarsDrawOverlay",SETTINGS_AVATARDRAWOVERLAY_DEFAULT)? AAO_HAS_OVERLAY :0) | ((0) ? AAO_OPAQUE :0); if (AniAva.bFlags & AAO_HAS_BORDER) @@ -1034,7 +1034,7 @@ static void _AniAva_AnimationTreadProc(HANDLE hExitEvent) //wait forever till hExitEvent signalled DWORD rc; HANDLE hThread = 0; - DuplicateHandle(GetCurrentProcess(),GetCurrentThread(),GetCurrentProcess(),&hThread,0,FALSE,DUPLICATE_SAME_ACCESS); + DuplicateHandle(GetCurrentProcess(),GetCurrentThread(),GetCurrentProcess(),&hThread, 0, FALSE,DUPLICATE_SAME_ACCESS); AniAva.AnimationThreadHandle = hThread; SetThreadPriority(hThread,THREAD_PRIORITY_LOWEST); for (;;) @@ -1177,15 +1177,15 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR SetParent(hwnd,(HWND)wParam); if (dat->bOrderTop) { - SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_ASYNCWINDOWPOS); + SetWindowPos(hwnd,HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_ASYNCWINDOWPOS); } else { LONG exStyle; exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE); - SetWindowPos(pcli->hwndContactList,hwnd,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); + SetWindowPos(pcli->hwndContactList,hwnd, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); if ( !(exStyle&WS_EX_TOPMOST)) - SetWindowPos(pcli->hwndContactList,HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); + SetWindowPos(pcli->hwndContactList,HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); } return 0; @@ -1196,15 +1196,15 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR { if (dat->bOrderTop) { - SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_ASYNCWINDOWPOS); + SetWindowPos(hwnd,HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_ASYNCWINDOWPOS); } else { LONG exStyle; exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE); - SetWindowPos(pcli->hwndContactList,hwnd,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); + SetWindowPos(pcli->hwndContactList,hwnd, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); if ( !(exStyle&WS_EX_TOPMOST)) - SetWindowPos(pcli->hwndContactList,HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); + SetWindowPos(pcli->hwndContactList,HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE/*|SWP_ASYNCWINDOWPOS*/); } } diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index ddf27062dd..34dc4ad51c 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -132,7 +132,7 @@ static int amThreadProc(HWND hwnd) time = GetTickCount(); if ((time-amRequestTick) < AMASKPERIOD) { - SleepEx(AMASKPERIOD-(time-amRequestTick)+10,TRUE); + SleepEx(AMASKPERIOD-(time-amRequestTick)+10, TRUE); if (MirandaExiting()) { g_dwAwayMsgThreadID = 0; @@ -141,9 +141,9 @@ static int amThreadProc(HWND hwnd) } CListSettings_FreeCacheItemData(&dnce); dnce.hContact = (HANDLE)hContact; - Sync(CLUI_SyncGetPDNCE, (WPARAM) 0,(LPARAM)&dnce); + Sync(CLUI_SyncGetPDNCE, (WPARAM) 0, (LPARAM)&dnce); if (dnce.ApparentMode != ID_STATUS_OFFLINE) //don't ask if contact is always invisible (should be done with protocol) - ACK = (HANDLE)CallContactService(hContact,PSS_GETAWAYMSG,0,0); + ACK = (HANDLE)CallContactService(hContact,PSS_GETAWAYMSG, 0, 0); if ( !ACK) { ACKDATA ack; @@ -165,7 +165,7 @@ static int amThreadProc(HWND hwnd) do { i++; - SleepEx(50,TRUE); + SleepEx(50, TRUE); } while (i < AMASKPERIOD/50 && !MirandaExiting()); } else break; diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 6ff4f8fdec..0c4e280d8d 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -206,7 +206,7 @@ void CSmileyString::ReplaceSmileys(struct SHORTDATA *dat, ClcCacheEntry *pdnce, if (dat->text_use_protocol_smileys) { sp.Protocolname = pdnce->m_cache_cszProto; - if (db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) != 1 && pdnce->m_cache_cszProto != NULL && g_szMetaModuleName && strcmp(pdnce->m_cache_cszProto, g_szMetaModuleName) == 0) { + if ( db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) != 1 && pdnce->m_cache_cszProto != NULL && g_szMetaModuleName && strcmp(pdnce->m_cache_cszProto, g_szMetaModuleName) == 0) { HANDLE hContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (LPARAM)pdnce->hContact, 0); if (hContact != 0) sp.Protocolname = GetContactProto(hContact); @@ -774,16 +774,16 @@ void Cache_ProceedAvatarInList(ClcData *dat, ClcContact *contact) HBITMAP oldBmp = (HBITMAP)SelectObject(hdc, hDrawBmp); //need to draw avatar bitmap here { - RECT real_rc = {0,0,width_clip, height_clip}; + RECT real_rc = {0, 0, width_clip, height_clip}; int w = width_clip; int h = height_clip; if ( !g_CluiData.fGDIPlusFail) //Use gdi+ engine - DrawAvatarImageWithGDIp(hdc, 0, 0, w, h,ace->hbmPic,0,0,ace->bmWidth,ace->bmHeight,ace->dwFlags,255); + DrawAvatarImageWithGDIp(hdc, 0, 0, w, h,ace->hbmPic, 0, 0, ace->bmWidth,ace->bmHeight,ace->dwFlags,255); else { if ( !(ace->dwFlags & AVS_PREMULTIPLIED)) { HDC hdcTmp = CreateCompatibleDC(hdc); - RECT r = {0,0,w,h}; + RECT r = {0, 0, w,h}; HDC hdcTmp2 = CreateCompatibleDC(hdc); HBITMAP bmo = (HBITMAP)SelectObject(hdcTmp,ace->hbmPic); HBITMAP b2 = ske_CreateDIB32(w,h); @@ -795,7 +795,7 @@ void Cache_ProceedAvatarInList(ClcData *dat, ClcContact *contact) SRCCOPY); ske_SetRectOpaque(hdcTmp2,&r); - BitBlt(hdc, rc.left, rc.top, w, h,hdcTmp2,0,0,SRCCOPY); + BitBlt(hdc, rc.left, rc.top, w, h,hdcTmp2, 0, 0, SRCCOPY); SelectObject(hdcTmp2,bmo2); SelectObject(hdcTmp,bmo); DeleteDC(hdcTmp); @@ -803,11 +803,11 @@ void Cache_ProceedAvatarInList(ClcData *dat, ClcContact *contact) DeleteObject(b2); } else { - BLENDFUNCTION bf = {AC_SRC_OVER, 0,255, AC_SRC_ALPHA }; + BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA }; HDC hdcTempAv = CreateCompatibleDC(hdc); HBITMAP hbmTempAvOld; hbmTempAvOld = (HBITMAP)SelectObject(hdcTempAv,ace->hbmPic); - ske_AlphaBlend(hdc, rc.left, rc.top, w, h, hdcTempAv, 0, 0,ace->bmWidth,ace->bmHeight, bf); + ske_AlphaBlend(hdc, rc.left, rc.top, w, h, hdcTempAv, 0, 0, ace->bmWidth,ace->bmHeight, bf); SelectObject(hdcTempAv, hbmTempAvOld); DeleteDC(hdcTempAv); } diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 598e781c43..369186036d 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -110,7 +110,7 @@ static int clcHookModulesLoaded(WPARAM wParam,LPARAM lParam) Skin_AddIcon(&sid); } - clcHookIconsChanged(0,0); + clcHookIconsChanged(0, 0); hIconChangedHook = HookEvent(ME_SKIN2_ICONSCHANGED, clcHookIconsChanged); @@ -144,8 +144,8 @@ static int clcHookModulesLoaded(WPARAM wParam,LPARAM lParam) static int clcHookSmileyAddOptionsChanged(WPARAM wParam,LPARAM lParam) { if (MirandaExiting()) return 0; - pcli->pfnClcBroadcast( CLM_AUTOREBUILD,0,0); - pcli->pfnClcBroadcast( INTM_INVALIDATE,0,0); + pcli->pfnClcBroadcast( CLM_AUTOREBUILD, 0, 0); + pcli->pfnClcBroadcast( INTM_INVALIDATE, 0, 0); return 0; } @@ -177,7 +177,7 @@ static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam) g_hListeningToIcon = Skin_GetIcon("LISTENING_TO_ICON"); - pcli->pfnClcBroadcast( INTM_INVALIDATE,0,0); + pcli->pfnClcBroadcast( INTM_INVALIDATE, 0, 0); AniAva_UpdateOptions(); return 0; } @@ -200,7 +200,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) } else if ( !strcmp(cws->szSetting,"XStatusId") || !strcmp(cws->szSetting,"XStatusName")) { - CLUIServices_ProtocolStatusChanged(0,(LPARAM)cws->szModule); + CLUIServices_ProtocolStatusChanged(0, (LPARAM)cws->szModule); } } else // (HANDLE)wParam != NULL @@ -213,11 +213,11 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) { if ( !strcmp(cws->szSetting,"Handle")) { - pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED,0,0); + pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED, 0, 0); } else if ( !strcmp(cws->szSetting,"Default")) { - pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED,0,0); + pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED, 0, 0); } } else if ( !strcmp(cws->szModule,"UserInfo")) @@ -392,7 +392,7 @@ static BOOL clcItemNotHiddenOffline(ClcData *dat, ClcGroup* group, ClcContact *c static LRESULT clcOnCreate(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { dat = (ClcData*)mir_calloc(sizeof(ClcData)); - SetWindowLongPtr(hwnd,0,(LONG_PTR)dat); + SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat); dat->hCheckBoxTheme = xpt_AddThemeHandle(hwnd, L"BUTTON"); dat->m_paintCouter = 0; dat->hWnd = hwnd; @@ -472,7 +472,7 @@ static LRESULT clcOnCommand(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LP return 0; CallService(MS_CLIST_GROUPSETFLAGS, contact->groupId, MAKELPARAM(CLCItems_IsShowOfflineGroup(contact->group) ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE)); - pcli->pfnClcBroadcast(CLM_AUTOREBUILD,0, 0); + pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); return 0; case POPUP_GROUPHIDEOFFLINE: if (contact->type != CLCIT_GROUP) @@ -643,7 +643,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LP nmkey.nVKey = wParam; nmkey.uFlags = HIWORD(lParam); - if (SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nmkey)) { + if (SendMessage(GetParent(hwnd),WM_NOTIFY, 0, (LPARAM)&nmkey)) { SetCapture(hwnd); return 0; } @@ -749,7 +749,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LP dat->selection = pcli->pfnGetGroupContentsCount(&dat->list,1)-1; if (dat->selection < 0) dat->selection = 0; if (dat->bCompactMode) - SendMessage(hwnd,WM_SIZE,0,0); + SendMessage(hwnd,WM_SIZE, 0, 0); CLUI__cliInvalidateRect(hwnd,NULL,FALSE); pcli->pfnEnsureVisible(hwnd,dat,dat->selection,0); UpdateWindow(hwnd); @@ -935,7 +935,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam fMouseUpped = TRUE; hitcontact = contact; KillTimer(hwnd,TIMERID_SUBEXPAND); - CLUI_SafeSetTimer(hwnd,TIMERID_SUBEXPAND,0,NULL); + CLUI_SafeSetTimer(hwnd,TIMERID_SUBEXPAND, 0, NULL); } } else hitcontact = NULL; @@ -952,7 +952,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam } if (dat->bCompactMode) - SendMessage(hwnd,WM_SIZE,0,0); + SendMessage(hwnd,WM_SIZE, 0, 0); else { CLUI__cliInvalidateRect(hwnd,NULL,FALSE); UpdateWindow(hwnd); @@ -972,7 +972,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam nm.hdr.idFrom = GetDlgCtrlID(hwnd); nm.flags = 0; nm.hItem = ContactToItemHandle(contact,&nm.flags); - SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nm); + SendMessage(GetParent(hwnd),WM_NOTIFY, 0, (LPARAM)&nm); } if ( !(hitFlags & (CLCHT_ONITEMICON|CLCHT_ONITEMLABEL|CLCHT_ONITEMCHECK))) { @@ -985,7 +985,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam else nm.hItem = ContactToItemHandle(contact,&nm.flags); nm.iColumn = hitFlags&CLCHT_ONITEMEXTRA?HIBYTE(HIWORD(hitFlags)):-1; nm.pt = dat->ptDragStart; - SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nm); + SendMessage(GetParent(hwnd),WM_NOTIFY, 0, (LPARAM)&nm); } if (hitFlags & (CLCHT_ONITEMCHECK|CLCHT_ONITEMEXTRA)) @@ -1003,7 +1003,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam } if (dat->bCompactMode) - SendMessage(hwnd,WM_SIZE,0,0); + SendMessage(hwnd,WM_SIZE, 0, 0); if (dat->selection != -1) pcli->pfnEnsureVisible(hwnd,dat,hit,0); @@ -1065,7 +1065,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if ( abs(HitPoint.x-x) > xm || abs(HitPoint.y-y) > ym) { if (fMouseUpped) { KillTimer(hwnd,TIMERID_SUBEXPAND); - CLUI_SafeSetTimer(hwnd,TIMERID_SUBEXPAND,0,NULL); + CLUI_SafeSetTimer(hwnd,TIMERID_SUBEXPAND, 0, NULL); fMouseUpped = FALSE; } else { @@ -1139,7 +1139,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, nm.hdr.idFrom = GetDlgCtrlID(hwnd); nm.flags = 0; nm.hItem = ContactToItemHandle(contact,&nm.flags); - SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nm); + SendMessage(GetParent(hwnd),WM_NOTIFY, 0, (LPARAM)&nm); dat->dragStage &= ~DRAGSTAGEF_OUTSIDE; } @@ -1221,7 +1221,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, nm.flags = 0; nm.hItem = ContactToItemHandle(contact,&nm.flags); nm.pt = pt; - if (SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nm)) + if (SendMessage(GetParent(hwnd),WM_NOTIFY, 0, (LPARAM)&nm)) return 0; } break; @@ -1317,7 +1317,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if ( !handle) return 0; - CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact); + CallService(MS_MC_REMOVEFROMMETA, 0, (LPARAM)hcontact); CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle); } } @@ -1363,7 +1363,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (res == 1) { if ( !handle) return 0; - CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact); + CallService(MS_MC_REMOVEFROMMETA, 0, (LPARAM)hcontact); CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle); } } @@ -1401,7 +1401,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (res == 1) { if ( !handle) return 0; - CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact); + CallService(MS_MC_REMOVEFROMMETA, 0, (LPARAM)hcontact); CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle); } } @@ -1700,7 +1700,7 @@ static LRESULT clcOnIntmStatusMsgChanged(ClcData *dat, HWND hwnd, UINT msg, WPAR { Cache_GetText(dat,contact,1); cliRecalcScrollBar(hwnd,dat); - PostMessage(hwnd,INTM_INVALIDATE,0,0); + PostMessage(hwnd,INTM_INVALIDATE, 0, 0); } return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); } @@ -1765,14 +1765,14 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM } - if (db_get_b(NULL,"CList","PlaceOfflineToRoot",SETTING_PLACEOOFLINETOROOT_DEFAULT)) + if ( db_get_b(NULL,"CList","PlaceOfflineToRoot",SETTING_PLACEOOFLINETOROOT_DEFAULT)) { - SendMessage(hwnd,CLM_AUTOREBUILD,0,0); + SendMessage(hwnd,CLM_AUTOREBUILD, 0, 0); } else { pcli->pfnSortContacts(); - PostMessage(hwnd,INTM_INVALIDATE,0,0); + PostMessage(hwnd,INTM_INVALIDATE, 0, 0); } return ret; } @@ -1794,7 +1794,7 @@ static LRESULT clcOnIntmReloadOptions(ClcData *dat, HWND hwnd, UINT msg, WPARAM HRESULT ClcLoadModule() { - g_himlCListClc = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST,0,0); + g_himlCListClc = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0); HookEvent(ME_DB_CONTACT_SETTINGCHANGED, clcHookSettingChanged); HookEvent(ME_OPT_INITIALISE, ClcOptInit); @@ -1839,7 +1839,7 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack) if (ack->result == ACKRESULT_SUCCESS && ack->lParam) { {//Do not change DB if it is IRC protocol if (ack->szModule != NULL) - if (db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) != 0) return 0; + if ( db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) != 0) return 0; } db_set_ws(ack->hContact,"CList","StatusMsg",(const TCHAR *)ack->lParam); @@ -1851,7 +1851,7 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack) //char a = '\0'; {//Do not change DB if it is IRC protocol if (ack->szModule != NULL) - if (db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) != 0) return 0; + if ( db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) != 0) return 0; } if (ack->hContact) { @@ -1877,7 +1877,7 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack) } } else if (ack->type == ACKTYPE_EMAIL) { - CLUIUnreadEmailCountChanged(0,0); + CLUIUnreadEmailCountChanged(0, 0); } return 0; } diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp index 8397e32f7f..ad5580a465 100644 --- a/plugins/Clist_modern/src/modern_clcidents.cpp +++ b/plugins/Clist_modern/src/modern_clcidents.cpp @@ -173,7 +173,7 @@ int FindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup * if (IsBadWritePtr(&group->cl.items[group->scanIndex]->subcontacts[i], sizeof(ClcContact))) { log1("FindIltem->IsBadWritePtr | 2o [%08x]", &group->cl.items[group->scanIndex]->subcontacts[i]); - PostMessage(hwnd,CLM_AUTOREBUILD,0,0); + PostMessage(hwnd,CLM_AUTOREBUILD, 0, 0); return 0; } @@ -205,13 +205,13 @@ void ClearRowByIndexCache() { if ( !CacheIndexClear) { - memset(CacheIndex,0,sizeof(CacheIndex)); + memset(CacheIndex, 0, sizeof(CacheIndex)); CacheIndexClear = TRUE; }; } int cliGetRowByIndex(ClcData *dat,int testindex,ClcContact **contact,ClcGroup **subgroup) { - int index = 0,i; + int index = 0, i; ClcGroup *group = &dat->list; if (testindex < 0) return (-1); diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index dd155e74bb..08ced8922c 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) { ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(cont->hContact); - cont->SubExpanded = (db_get_b(cont->hContact,"CList","Expanded",0) && (db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT))); + cont->SubExpanded = ( db_get_b(cont->hContact,"CList","Expanded",0) && ( db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT))); int subcount = (int)CallService(MS_MC_GETNUMCONTACTS,(WPARAM)cont->hContact,0); if (subcount <= 0) { cont->isSubcontact = 0; @@ -48,7 +48,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) HANDLE hsub = (HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)cont->hContact,j); cacheEntry = pcli->pfnGetCacheEntry(hsub); WORD wStatus = pdnce___GetStatus(cacheEntry); - if (showOfflineHereGroup || (!(db_get_b(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)) + if (showOfflineHereGroup || (!( db_get_b(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)) || wStatus != ID_STATUS_OFFLINE )) { ClcContact& p = cont->subcontacts[i]; p.hContact = cacheEntry->hContact; @@ -383,7 +383,7 @@ void cliRebuildEntireList(HWND hwnd,ClcData *dat) if (lstrlen(cacheEntry->tszGroup) == 0) group = &dat->list; else - group = cli_AddGroup(hwnd,dat,cacheEntry->tszGroup,(DWORD)-1,0,0); + group = cli_AddGroup(hwnd,dat,cacheEntry->tszGroup,(DWORD)-1, 0, 0); if (group != NULL) { WORD wStatus = pdnce___GetStatus( cacheEntry ); diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index 2d6ffc924c..4d41b560db 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -20,12 +20,12 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include "hdr/modern_commonheaders.h" #include "m_clc.h" #include "hdr/modern_clc.h" #include "hdr/modern_commonprototypes.h" - //processing of all the CLM_ messages incoming LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam) @@ -69,7 +69,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara else SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)&~CLS_HIDEEMPTYGROUPS); newval = ((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS) != 0); if (newval != old) - SendMessage(hwnd,CLM_AUTOREBUILD,0,0); + SendMessage(hwnd,CLM_AUTOREBUILD, 0, 0); } return 0; diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index a2d7680a54..fd82df1c1c 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -196,9 +196,9 @@ DWORD GetDefaultExStyle(void) { BOOL param; DWORD ret = CLCDEFAULT_EXSTYLE; - if (SystemParametersInfo(SPI_GETLISTBOXSMOOTHSCROLLING,0,¶m,FALSE) && !param) + if (SystemParametersInfo(SPI_GETLISTBOXSMOOTHSCROLLING, 0, ¶m,FALSE) && !param) ret |= CLS_EX_NOSMOOTHSCROLLING; - if (SystemParametersInfo(SPI_GETHOTTRACKING,0,¶m,FALSE) && !param) + if (SystemParametersInfo(SPI_GETHOTTRACKING, 0, ¶m,FALSE) && !param) ret &= ~CLS_EX_TRACKSELECT; return ret; } @@ -398,8 +398,8 @@ static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARA CheckDlgButton(hwndDlg, IDC_FILTER_SEARCH, db_get_b(NULL,"CLC","FilterSearch",SETTING_FILTERSEARCH_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by Robyer SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_SUBINDENT),0); - SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETPOS,0,MAKELONG(db_get_b(NULL,"CLC","SubIndent",CLCDEFAULT_GROUPINDENT),0)); + SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_SETPOS, 0, MAKELONG( db_get_b(NULL,"CLC","SubIndent",CLCDEFAULT_GROUPINDENT),0)); { BYTE t = IsDlgButtonChecked(hwndDlg,IDC_METAEXPAND); @@ -451,10 +451,10 @@ static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARA db_set_b(NULL,"ModernData","RemoveAwayMessageForOffline",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_REMOVE_OFFLINE_AWAYMSG)); db_set_b(NULL,"CLC","FilterSearch",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_FILTER_SEARCH)); // by Robyer - db_set_b(NULL,"CLC","SubIndent",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_GETPOS,0,0)); + db_set_b(NULL,"CLC","SubIndent",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SUBINDENTSPIN,UDM_GETPOS, 0, 0)); ClcOptionsChanged(); CLUI_ReloadCLUIOptions(); - PostMessage(pcli->hwndContactList,WM_SIZE,0,0); + PostMessage(pcli->hwndContactList,WM_SIZE, 0, 0); return TRUE; } break; @@ -483,15 +483,15 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar for (int i=0;i < SIZEOF(checkBoxToStyleEx);i++) CheckDlgButton(hwndDlg,checkBoxToStyleEx[i].id,(exStyle&checkBoxToStyleEx[i].flag)^(checkBoxToStyleEx[i].flag*checkBoxToStyleEx[i].neg)?BST_CHECKED:BST_UNCHECKED); - UDACCEL accel[2] = {{0,10},{2,50}}; - SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_SETRANGE,0,MAKELONG(999,0)); + UDACCEL accel[2] = {{0, 10},{2,50}}; + SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_SETRANGE, 0, MAKELONG(999,0)); SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_SETACCEL,SIZEOF(accel),(LPARAM)&accel); - SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CLC","ScrollTime",CLCDEFAULT_SCROLLTIME),0)); + SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CLC","ScrollTime",CLCDEFAULT_SCROLLTIME),0)); } CheckDlgButton(hwndDlg,IDC_IDLE,db_get_b(NULL,"CLC","ShowIdle",CLCDEFAULT_SHOWIDLE)?BST_CHECKED:BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_SETPOS,0,MAKELONG(db_get_b(NULL,"CLC","GroupIndent",CLCDEFAULT_GROUPINDENT),0)); + SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_SETPOS, 0, MAKELONG( db_get_b(NULL,"CLC","GroupIndent",CLCDEFAULT_GROUPINDENT),0)); CheckDlgButton(hwndDlg,IDC_GREYOUT,db_get_dw(NULL,"CLC","GreyoutFlags",CLCDEFAULT_GREYOUTFLAGS)?BST_CHECKED:BST_UNCHECKED); EnableWindow(GetDlgItem(hwndDlg,IDC_SMOOTHTIME),IsDlgButtonChecked(hwndDlg,IDC_NOTNOSMOOTHSCROLLING)); @@ -557,8 +557,8 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar db_set_b(NULL,"CLC","ShowIdle",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_IDLE)?1:0)); db_set_dw(NULL,"CLC","OfflineModes",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS))); - db_set_w(NULL,"CLC","ScrollTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_GETPOS,0,0)); - db_set_b(NULL,"CLC","GroupIndent",(BYTE)SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CLC","ScrollTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_GETPOS, 0, 0)); + db_set_b(NULL,"CLC","GroupIndent",(BYTE)SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CLC","NoVScrollBar",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_NOSCROLLBAR)?1:0)); ClcOptionsChanged(); @@ -581,11 +581,11 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); CheckDlgButton(hwndDlg,IDC_BITMAP,db_get_b(NULL,"StatusBar","UseBitmap",CLCDEFAULT_USEBITMAP)?BST_CHECKED:BST_UNCHECKED); - SendMessage(hwndDlg,WM_USER+10,0,0); - SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_BKCOLOUR); - // SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR)); - SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_SELBKCOLOUR); - SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR)); + SendMessage(hwndDlg,WM_USER+10, 0, 0); + SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_BKCOLOUR); + // SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR)); + SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR, 0, CLCDEFAULT_SELBKCOLOUR); + SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR, 0, db_get_dw(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR)); { DBVARIANT dbv = {0}; if ( !DBGetContactSettingString(NULL,"StatusBar","BkBitmap",&dbv)) { @@ -654,7 +654,7 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w SetDlgItemTextA(hwndDlg,IDC_FILENAME,str); } else if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE) break; - if (LOWORD(wParam) == IDC_BITMAP) SendMessage(hwndDlg,WM_USER+10,0,0); + if (LOWORD(wParam) == IDC_BITMAP) SendMessage(hwndDlg,WM_USER+10, 0, 0); if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); break; @@ -667,10 +667,10 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w db_set_b(NULL,"StatusBar","UseBitmap",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_BITMAP)); { COLORREF col; - col = SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_GETCOLOUR,0,0); + col = SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_GETCOLOUR, 0, 0); if (col == CLCDEFAULT_BKCOLOUR) db_unset(NULL,"StatusBar","BkColour"); else db_set_dw(NULL,"StatusBar","BkColour",col); - col = SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_GETCOLOUR,0,0); + col = SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_GETCOLOUR, 0, 0); if (col == CLCDEFAULT_SELBKCOLOUR) db_unset(NULL,"StatusBar","SelBkColour"); else db_set_dw(NULL,"StatusBar","SelBkColour",col); } @@ -722,7 +722,7 @@ static int _GetNetVisibleProtoCount() int i,count,netProtoCount; PROTOACCOUNT **accs; ProtoEnumAccounts( &count, &accs ); - for (i=0,netProtoCount = 0;i < count;i++) + for (i=0, netProtoCount = 0;i < count;i++) { if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 ) continue; @@ -754,11 +754,11 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, int s1, s2, s3; for (i=0; i < SIZEOF(sortby); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i])); + item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i])); SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETITEMDATA,item,0); - item = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i])); + item = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i])); SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_SETITEMDATA,item,0); - item = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i])); + item = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i])); SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_SETITEMDATA,item,0); } @@ -802,9 +802,9 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, if (IsDlgButtonChecked(hwndDlg,IDC_HILIGHTMODE3)) hil = 3; db_set_b(NULL,"CLC","HiLightMode",(BYTE)hil); - int s1 = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_GETCURSEL,0,0); - int s2 = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_GETCURSEL,0,0); - int s3 = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_GETCURSEL,0,0); + int s1 = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_GETCURSEL, 0, 0); + int s2 = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_GETCURSEL, 0, 0); + int s3 = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_GETCURSEL, 0, 0); if (s1 >= 0) s1 = sortbyValue[s1]; if (s2 >= 0) s2 = sortbyValue[s2]; if (s3 >= 0) s3 = sortbyValue[s3]; @@ -816,7 +816,7 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, db_set_b(NULL,"CList","PlaceOfflineToRoot",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_OFFLINETOROOT)); pcli->pfnLoadContactTree(); /* this won't do job properly since it only really works when changes happen */ - SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0); /* force reshuffle */ + SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD, 0, 0); /* force reshuffle */ ClcOptionsChanged(); // Used to force loading avatar an list height related options return TRUE; } @@ -873,32 +873,32 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L EnableWindow(GetDlgItem(hwndDlg,IDC_PRIMARYSTATUS),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSPRIMARY),FALSE); } - SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_SETRANGE,0,MAKELONG(120,1)); - SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_SETRANGE, 0, MAKELONG(120, 1)); + SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT),0)); { int i,count,item; PROTOACCOUNT **accs; DBVARIANT dbv = {DBVT_DELETED}; db_get(NULL,"CList","PrimaryStatus",&dbv); ProtoEnumAccounts( &count, &accs ); - item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)TranslateT("Global")); + item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING, 0, (LPARAM)TranslateT("Global")); SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,0); for (i=0;i < count;i++) { if ( !IsAccountEnabled( accs[i] ) || CallProtoService(accs[i]->szModuleName,PS_GETCAPS,PFLAGNUM_2,0) == 0) continue; - item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)accs[i]->tszAccountName); + item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName); SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,(LPARAM)accs[i]); if ((dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_UTF8) && !strcmp(dbv.pszVal,accs[i]->szModuleName)) SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL,item,0); } db_free(&dbv); } - if (-1 == (int)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0)) - SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL,0,0); + if (-1 == (int)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL, 0, 0)) + SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL, 0, 0); SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_BLINKTIME),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETRANGE,0,MAKELONG(0x3FFF,250)); - SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","IconFlashTime",SETTING_ICONFLASHTIME_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETRANGE, 0, MAKELONG(0x3FFF,250)); + SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","IconFlashTime",SETTING_ICONFLASHTIME_DEFAULT),0)); { int i = _GetNetVisibleProtoCount(); if (i < 2) @@ -946,8 +946,8 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L db_set_b(NULL,"CList","AlwaysMulti",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_ALWAYSMULTI)); db_set_b(NULL,"CList","AlwaysPrimary",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_ALWAYSPRIMARY)); - db_set_w(NULL,"CList","CycleTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_GETPOS,0,0)); - db_set_w(NULL,"CList","IconFlashTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","CycleTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_GETPOS, 0, 0)); + db_set_w(NULL,"CList","IconFlashTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CList","DisableTrayFlash",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DISABLEBLINK)); if (_GetNetVisibleProtoCount()>1) @@ -960,7 +960,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L xOptions |= (xOptions && IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENTOVERLAY))?4:0; db_set_b(NULL,"CLUI","XStatusTray",xOptions); - int cursel = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0); + int cursel = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL, 0, 0); PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETITEMDATA,cursel,0); if ( !pa ) db_unset(NULL, "CList","PrimaryStatus"); @@ -969,7 +969,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L } pcli->pfnTrayIconIconsChanged(); pcli->pfnLoadContactTree(); /* this won't do job properly since it only really works when changes happen */ - SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0); /* force reshuffle */ + SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD, 0, 0); /* force reshuffle */ ClcOptionsChanged(); // Used to force loading avatar an list height related options return TRUE; } @@ -982,8 +982,8 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L void ClcOptionsChanged(void) { - pcli->pfnClcBroadcast( INTM_RELOADOPTIONS,0,0); - pcli->pfnClcBroadcast( INTM_INVALIDATE,0,0); + pcli->pfnClcBroadcast( INTM_RELOADOPTIONS, 0, 0); + pcli->pfnClcBroadcast( INTM_INVALIDATE, 0, 0); } HWND g_hCLUIOptionsWnd = NULL; @@ -994,15 +994,15 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(NULL,"CLUI","DragToScroll",SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, ( db_get_b(NULL,"CLUI","DragToScroll",SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, db_get_b(NULL,"CList","BringToFront",SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_MAXSIZESPIN,UDM_SETRANGE,0,MAKELONG(100,0)); - SendDlgItemMessage(hwndDlg,IDC_MAXSIZESPIN,UDM_SETPOS,0,db_get_b(NULL,"CLUI","MaxSizeHeight",SETTING_MAXSIZEHEIGHT_DEFAULT)); - SendDlgItemMessage(hwndDlg,IDC_MINSIZESPIN,UDM_SETRANGE,0,MAKELONG(100,0)); - SendDlgItemMessage(hwndDlg,IDC_MINSIZESPIN,UDM_SETPOS,0,db_get_b(NULL,"CLUI","MinSizeHeight",SETTING_MINSIZEHEIGHT_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_MAXSIZESPIN,UDM_SETRANGE, 0, MAKELONG(100, 0)); + SendDlgItemMessage(hwndDlg,IDC_MAXSIZESPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","MaxSizeHeight",SETTING_MAXSIZEHEIGHT_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_MINSIZESPIN,UDM_SETRANGE, 0, MAKELONG(100, 0)); + SendDlgItemMessage(hwndDlg,IDC_MINSIZESPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","MinSizeHeight",SETTING_MINSIZEHEIGHT_DEFAULT)); CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(NULL,"CLUI","SnapToEdges",SETTING_SNAPTOEDGES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_DOCKTOSIDES, db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); @@ -1012,8 +1012,8 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_AUTOHIDE, db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE,0,MAKELONG(900,1)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE, 0, MAKELONG(900, 1)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0)); EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE)); EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE)); EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC01),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE)); @@ -1021,19 +1021,19 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM int i, item; TCHAR *hidemode[] = {TranslateT("Hide to tray"), TranslateT("Behind left edge"), TranslateT("Behind right edge")}; for (i=0; i < SIZEOF(hidemode); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_ADDSTRING,0,(LPARAM)(hidemode[i])); + item = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_ADDSTRING, 0, (LPARAM)(hidemode[i])); SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_SETITEMDATA,item,0); SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_SETCURSEL,db_get_b(NULL,"ModernData","HideBehind",SETTING_HIDEBEHIND_DEFAULT),0); } } - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_SETRANGE,0,MAKELONG(600,0)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"ModernData","ShowDelay",SETTING_SHOWDELAY_DEFAULT),0)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_SETRANGE,0,MAKELONG(600,0)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"ModernData","HideDelay",SETTING_HIDEDELAY_DEFAULT),0)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_SETRANGE,0,MAKELONG(50,1)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"ModernData","HideBehindBorderSize",SETTING_HIDEBEHINDBORDERSIZE_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_SETRANGE, 0, MAKELONG(600, 0)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"ModernData","ShowDelay",SETTING_SHOWDELAY_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_SETRANGE, 0, MAKELONG(600, 0)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"ModernData","HideDelay",SETTING_HIDEDELAY_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_SETRANGE, 0, MAKELONG(50, 1)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"ModernData","HideBehindBorderSize",SETTING_HIDEBEHINDBORDERSIZE_DEFAULT),0)); { - int mode = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL,0,0); + int mode = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL, 0, 0); EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWDELAY),mode != 0); EnableWindow(GetDlgItem(hwndDlg,IDC_HIDEDELAY),mode != 0); EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN2),mode != 0); @@ -1082,7 +1082,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM } else if (LOWORD(wParam) == IDC_HIDEMETHOD) { - int mode = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL,0,0); + int mode = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL, 0, 0); EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWDELAY),mode != 0); EnableWindow(GetDlgItem(hwndDlg,IDC_HIDEDELAY),mode != 0); EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN2),mode != 0); @@ -1107,10 +1107,10 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - db_set_b(NULL,"ModernData","HideBehind",(BYTE)SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL,0,0)); - db_set_w(NULL,"ModernData","ShowDelay",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_GETPOS,0,0)); - db_set_w(NULL,"ModernData","HideDelay",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_GETPOS,0,0)); - db_set_w(NULL,"ModernData","HideBehindBorderSize",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_GETPOS,0,0)); + db_set_b(NULL,"ModernData","HideBehind",(BYTE)SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_GETCURSEL, 0, 0)); + db_set_w(NULL,"ModernData","ShowDelay",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN2,UDM_GETPOS, 0, 0)); + db_set_w(NULL,"ModernData","HideDelay",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN3,UDM_GETPOS, 0, 0)); + db_set_w(NULL,"ModernData","HideBehindBorderSize",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN4,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CLUI","DragToScroll",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DRAGTOSCROLL)); db_set_b(NULL,"CList","BringToFront",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_BRINGTOFRONT)); @@ -1129,12 +1129,12 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM (BYTE)(IsDlgButtonChecked(hwndDlg,IDC_EVENTAREA_ALWAYS)?2:(BYTE)IsDlgButtonChecked(hwndDlg,IDC_EVENTAREA)?1:0)); db_set_b(NULL,"CList","AutoHide",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE)); - db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS, 0, 0)); CLUI_ChangeWindowMode(); - SendMessage(pcli->hwndContactTree,WM_SIZE,0,0); //forces it to send a cln_listsizechanged + SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged CLUI_ReloadCLUIOptions(); EventArea_ConfigureEventArea(); - cliShowHide(0,1); + cliShowHide(0, 1); g_mutex_bChangingMode = FALSE; return TRUE; } @@ -1193,24 +1193,24 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(NULL,"CLUI","FadeInOut",SETTING_FADEIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_ONDESKTOP, db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_SETPOS,0,db_get_dw(NULL,"CLUIFrames","GapBetweenFrames",SETTING_GAPFRAMES_DEFAULT)); - SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_SETPOS,0,db_get_dw(NULL,"CLUIFrames","GapBetweenTitleBar",SETTING_GAPTITLEBAR_DEFAULT)); - SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETRANGE,0,MAKELONG(250,0)); - SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETRANGE,0,MAKELONG(250,0)); - SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_SETRANGE,0,MAKELONG(250,0)); - SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_SETRANGE,0,MAKELONG(250,0)); - SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETPOS,0,db_get_b(NULL,"CLUI","LeftClientMargin",SETTING_LEFTCLIENTMARIGN_DEFAULT)); - SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETPOS,0,db_get_b(NULL,"CLUI","RightClientMargin",SETTING_RIGHTCLIENTMARIGN_DEFAULT)); - SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_SETPOS,0,db_get_b(NULL,"CLUI","TopClientMargin",SETTING_TOPCLIENTMARIGN_DEFAULT)); - SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_SETPOS,0,db_get_b(NULL,"CLUI","BottomClientMargin",SETTING_BOTTOMCLIENTMARIGN_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_SETPOS, 0, db_get_dw(NULL,"CLUIFrames","GapBetweenFrames",SETTING_GAPFRAMES_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_SETPOS, 0, db_get_dw(NULL,"CLUIFrames","GapBetweenTitleBar",SETTING_GAPTITLEBAR_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0)); + SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0)); + SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0)); + SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(250, 0)); + SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","LeftClientMargin",SETTING_LEFTCLIENTMARIGN_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","RightClientMargin",SETTING_RIGHTCLIENTMARIGN_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","TopClientMargin",SETTING_TOPCLIENTMARIGN_DEFAULT)); + SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_SETPOS, 0, db_get_b(NULL,"CLUI","BottomClientMargin",SETTING_BOTTOMCLIENTMARIGN_DEFAULT)); CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(NULL,"ModernData","AeroGlass",SETTING_AEROGLASS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); EnableWindow(GetDlgItem(hwndDlg,IDC_LAYERENGINE),(g_proc_UpdateLayeredWindow != NULL && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT))?TRUE:FALSE); - CheckDlgButton(hwndDlg, IDC_LAYERENGINE, ((db_get_b(NULL,"ModernData","EnableLayering",SETTING_ENABLELAYERING_DEFAULT) && g_proc_UpdateLayeredWindow != NULL) && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT)) ? BST_UNCHECKED:BST_CHECKED); + CheckDlgButton(hwndDlg, IDC_LAYERENGINE, (( db_get_b(NULL,"ModernData","EnableLayering",SETTING_ENABLELAYERING_DEFAULT) && g_proc_UpdateLayeredWindow != NULL) && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT)) ? BST_UNCHECKED:BST_CHECKED); { DBVARIANT dbv = {0}; @@ -1222,24 +1222,24 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP SetDlgItemText(hwndDlg, IDC_TITLETEXT, s); db_free(&dbv); - SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)MIRANDANAME); + SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)MIRANDANAME); char szUin[20]; sprintf(szUin,"%u",db_get_dw(NULL,"ICQ","UIN",0)); - SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)szUin); + SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)szUin); if ( !DBGetContactSettingString(NULL,"ICQ","Nick",&dbv)) { - SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal); + SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)dbv.pszVal); db_free(&dbv); dbv.pszVal = NULL; } if ( !DBGetContactSettingString(NULL,"ICQ","FirstName",&dbv)) { - SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal); + SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)dbv.pszVal); db_free(&dbv); dbv.pszVal = NULL; } if ( !DBGetContactSettingString(NULL,"ICQ","e-mail",&dbv)) { - SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal); + SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING, 0, (LPARAM)dbv.pszVal); db_free(&dbv); dbv.pszVal = NULL; } @@ -1331,9 +1331,9 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP case WM_HSCROLL: { char str[10]; - sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS,0,0)/255); + sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0)/255); SetDlgItemTextA(hwndDlg,IDC_INACTIVEPERC,str); - sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS,0,0)/255); + sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0)/255); SetDlgItemTextA(hwndDlg,IDC_ACTIVEPERC,str); } if (wParam != 0x12345678) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); @@ -1342,10 +1342,10 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - db_set_b(NULL,"CLUI","LeftClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_GETPOS,0,0)); - db_set_b(NULL,"CLUI","RightClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_GETPOS,0,0)); - db_set_b(NULL,"CLUI","TopClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_GETPOS,0,0)); - db_set_b(NULL,"CLUI","BottomClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_GETPOS,0,0)); + db_set_b(NULL,"CLUI","LeftClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_GETPOS, 0, 0)); + db_set_b(NULL,"CLUI","RightClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_GETPOS, 0, 0)); + db_set_b(NULL,"CLUI","TopClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TOPMARGINSPIN,UDM_GETPOS, 0, 0)); + db_set_b(NULL,"CLUI","BottomClientMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_BOTTOMMARGINSPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"ModernData","DisableEngine",IsDlgButtonChecked(hwndDlg,IDC_DISABLEENGINE)); db_set_b(NULL,"ModernData","AeroGlass",IsDlgButtonChecked(hwndDlg,IDC_AEROGLASS)); if ( !IsDlgButtonChecked(hwndDlg,IDC_DISABLEENGINE)) @@ -1401,24 +1401,24 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP db_set_b(NULL,"CLUI","FadeInOut",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT)); g_CluiData.fSmoothAnimation = IsWinVer2000Plus() && (BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT); { - int i1 = SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_GETPOS,0,0); - int i2 = SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_GETPOS,0,0); + int i1 = SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_GETPOS, 0, 0); + int i2 = SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_GETPOS, 0, 0); db_set_dw(NULL,"CLUIFrames","GapBetweenFrames",(DWORD)i1); db_set_dw(NULL,"CLUIFrames","GapBetweenTitleBar",(DWORD)i2); Sync(CLUIFramesOnClistResize, (WPARAM)pcli->hwndContactList,0); } db_set_b(NULL,"CList","Transparent",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)); - db_set_b(NULL,"CList","Alpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS,0,0)); - db_set_b(NULL,"CList","AutoAlpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS,0,0)); + db_set_b(NULL,"CList","Alpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0)); + db_set_b(NULL,"CList","AutoAlpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0)); db_set_b(NULL,"CList","OnDesktop",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ONDESKTOP)); ske_LoadSkinFromDB(); CLUI_UpdateLayeredMode(); CLUI_ChangeWindowMode(); - SendMessage(pcli->hwndContactTree,WM_SIZE,0,0); //forces it to send a cln_listsizechanged + SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged CLUI_ReloadCLUIOptions(); - cliShowHide(0,1); + cliShowHide(0, 1); g_mutex_bChangingMode = FALSE; return TRUE; } @@ -1537,8 +1537,8 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, dat->item[indx].useBitmap = IsDlgButtonChecked(hwndDlg,IDC_BITMAP); dat->item[indx].useWinColours = IsDlgButtonChecked(hwndDlg,IDC_USEWINCOL); - dat->item[indx].bkColor = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR,0,0); - dat->item[indx].selColor = SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_GETCOLOUR,0,0); + dat->item[indx].bkColor = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0); + dat->item[indx].selColor = SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_GETCOLOUR, 0, 0); GetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename, SIZEOF(dat->item[indx].filename)); { @@ -1583,7 +1583,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, CheckDlgButton(hwndDlg,IDC_PROPORTIONAL,flags&CLBF_PROPORTIONAL?BST_CHECKED:BST_UNCHECKED); CheckDlgButton(hwndDlg,IDC_TILEVROWH,flags&CLBF_TILEVTOROWHEIGHT?BST_CHECKED:BST_UNCHECKED); - SendMessage(hwndDlg, M_BKGR_UPDATE, 0,0); + SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0); break; } case M_BKGR_UPDATE: @@ -1618,7 +1618,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, else if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE) break; if (LOWORD(wParam) == IDC_BITMAP) - SendMessage(hwndDlg, M_BKGR_UPDATE, 0,0); + SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0); if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; if (LOWORD(wParam) == IDC_BKGRLIST) @@ -1626,12 +1626,12 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, if (HIWORD(wParam) == CBN_SELCHANGE) { SendMessage(hwndDlg, M_BKGR_GETSTATE, dat->indx, 0); - SendMessage(hwndDlg, M_BKGR_SETSTATE, dat->indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0,0), 0); + SendMessage(hwndDlg, M_BKGR_SETSTATE, dat->indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0, 0), 0); } return 0; } { - int indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0,0); + int indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0, 0); if (indx != CB_ERR && indx < dat->count) { indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0); @@ -1643,7 +1643,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg,IDC_BKGCOLOUR), EnableColours); EnableWindow(GetDlgItem(hwndDlg,IDC_SELCOLOUR), EnableColours); } - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0,0); + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); } break; case WM_NOTIFY: @@ -1651,7 +1651,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - SendMessage(hwndDlg, M_BKGR_GETSTATE, SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0,0), 0); + SendMessage(hwndDlg, M_BKGR_GETSTATE, SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0, 0), 0); { for (int indx = 0; indx < dat->count; indx++) if (dat->item[indx].changed) @@ -1888,8 +1888,8 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE)); EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE,0,MAKELONG(900,1)); - SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE, 0, MAKELONG(900, 1)); + SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0)); if ( !IsWinVer2000Plus()) { EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE); @@ -1912,11 +1912,11 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar SendMessage(hwndDlg,WM_HSCROLL,0x12345678,0); for (i=0; i < SIZEOF(sortby); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i])); + item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i])); SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETITEMDATA,item,0); - item = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i])); + item = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i])); SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_SETITEMDATA,item,0); - item = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i])); + item = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_ADDSTRING, 0, (LPARAM)TranslateTS(sortby[i])); SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_SETITEMDATA,item,0); } @@ -1944,9 +1944,9 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar case WM_HSCROLL: { char str[10]; - sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS,0,0)/255); + sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0)/255); SetDlgItemTextA(hwndDlg,IDC_INACTIVEPERC,str); - sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS,0,0)/255); + sprintf(str,"%d%%",100*SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0)/255); SetDlgItemTextA(hwndDlg,IDC_ACTIVEPERC,str); if (wParam != 0x12345678) if ( !bInit) SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); @@ -1982,14 +1982,14 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar OptCheckBox_Save(hwndDlg, opts+i); SetWindowPos(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg,IDC_ONTOP)?HWND_TOPMOST:HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS, 0, 0)); - db_set_b(NULL,"CList","Alpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS,0,0)); - db_set_b(NULL,"CList","AutoAlpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS,0,0)); + db_set_b(NULL,"CList","Alpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS, 0, 0)); + db_set_b(NULL,"CList","AutoAlpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSINACTIVE,TBM_GETPOS, 0, 0)); { - int s1 = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_GETCURSEL,0,0); - int s2 = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_GETCURSEL,0,0); - int s3 = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_GETCURSEL,0,0); + int s1 = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_GETCURSEL, 0, 0); + int s2 = SendDlgItemMessage(hwndDlg,IDC_CLSORT2,CB_GETCURSEL, 0, 0); + int s3 = SendDlgItemMessage(hwndDlg,IDC_CLSORT3,CB_GETCURSEL, 0, 0); if (s1 >= 0) s1 = sortbyValue[s1]; if (s2 >= 0) s2 = sortbyValue[s2]; if (s3 >= 0) s3 = sortbyValue[s3]; @@ -2003,9 +2003,9 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar ske_LoadSkinFromDB(); CLUI_UpdateLayeredMode(); CLUI_ChangeWindowMode(); - SendMessage(pcli->hwndContactTree,WM_SIZE,0,0); //forces it to send a cln_listsizechanged + SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged CLUI_ReloadCLUIOptions(); - cliShowHide(0,1); + cliShowHide(0, 1); } g_mutex_bChangingMode = FALSE; return TRUE; diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 859b9fc3f6..d1aac55e82 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -169,7 +169,7 @@ void cliScrollTo(HWND hwnd,ClcData *dat,int desty,int noSmooth) if (nowTick >= startTick+dat->scrollTime) break; dat->yScroll = oldy+(desty-oldy)*(int)(nowTick-startTick)/dat->scrollTime; if (/*dat->backgroundBmpUse&CLBF_SCROLL || dat->hBmpBackground == NULL && */FALSE) - ScrollWindowEx(hwnd,0,previousy-dat->yScroll,NULL,NULL,NULL,NULL,SW_INVALIDATE); + ScrollWindowEx(hwnd, 0, previousy-dat->yScroll,NULL,NULL,NULL,NULL,SW_INVALIDATE); else { CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM) hwnd, (LPARAM) 0); @@ -183,7 +183,7 @@ void cliScrollTo(HWND hwnd,ClcData *dat,int desty,int noSmooth) } dat->yScroll = desty; if ((dat->backgroundBmpUse&CLBF_SCROLL || dat->hBmpBackground == NULL) && FALSE) - ScrollWindowEx(hwnd,0,previousy-dat->yScroll,NULL,NULL,NULL,NULL,SW_INVALIDATE); + ScrollWindowEx(hwnd, 0, previousy-dat->yScroll,NULL,NULL,NULL,NULL,SW_INVALIDATE); else CLUI__cliInvalidateRect(hwnd,NULL,FALSE); SetScrollPos(hwnd,SB_VERT,dat->yScroll,TRUE); @@ -212,7 +212,7 @@ void cliRecalcScrollBar(HWND hwnd,ClcData *dat) nm.hdr.idFrom = 0;//GetDlgCtrlID(hwnd); nm.pt.y = si.nMax; - SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nm); //post + SendMessage(GetParent(hwnd),WM_NOTIFY, 0, (LPARAM)&nm); //post GetClientRect(hwnd,&clRect); si.cbSize = sizeof(si); @@ -260,7 +260,7 @@ static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPara return DLGC_WANTMESSAGE; case WM_KILLFOCUS: pcli->pfnEndRename(GetParent(hwnd),(ClcData*)GetWindowLongPtr(hwnd,GWLP_USERDATA),1); - SendMessage(pcli->hwndContactTree,WM_SIZE,0,0); + SendMessage(pcli->hwndContactTree,WM_SIZE, 0, 0); return 0; } return CallWindowProc(OldRenameEditWndProc,hwnd,msg,wParam,lParam); @@ -338,7 +338,7 @@ void cliBeginRenameSelection(HWND hwnd,ClcData *dat) OldRenameEditWndProc = (WNDPROC)SetWindowLongPtr(dat->hwndRenameEdit,GWLP_WNDPROC,(LONG_PTR)RenameEditSubclassProc); SendMessage(dat->hwndRenameEdit,WM_SETFONT,(WPARAM)(contact->type == CLCIT_GROUP?dat->fontModernInfo[FONTID_OPENGROUPS].hFont:dat->fontModernInfo[FONTID_CONTACTS].hFont),0); SendMessage(dat->hwndRenameEdit,EM_SETMARGINS,EC_LEFTMARGIN|EC_RIGHTMARGIN|EC_USEFONTINFO,0); - SendMessage(dat->hwndRenameEdit,EM_SETSEL,0,(LPARAM)(-1)); + SendMessage(dat->hwndRenameEdit,EM_SETSEL, 0, (LPARAM)(-1)); // SetWindowLongPtr(dat->hwndRenameEdit,GWLP_USERDATA,(LONG_PTR)hwnd); r.top = 1; r.bottom = h-1; @@ -347,10 +347,10 @@ void cliBeginRenameSelection(HWND hwnd,ClcData *dat) //ES_MULTILINE - SendMessage(dat->hwndRenameEdit,EM_SETRECT,0,(LPARAM)(&r)); + SendMessage(dat->hwndRenameEdit,EM_SETRECT, 0, (LPARAM)(&r)); CLUI_ShowWindowMod(dat->hwndRenameEdit,SW_SHOW); - SetWindowPos(dat->hwndRenameEdit,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); + SetWindowPos(dat->hwndRenameEdit,HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); SetFocus(dat->hwndRenameEdit); } @@ -709,7 +709,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat ) dat->showIdle = db_get_b(NULL,"CLC","ShowIdle",CLCDEFAULT_SHOWIDLE); dat->noVScrollbar = db_get_b(NULL,"CLC","NoVScrollBar",CLCDEFAULT_NOVSCROLL); dat->filterSearch = db_get_b(NULL, "CLC", "FilterSearch", 0); - SendMessage(hwnd,INTM_SCROLLBARCHANGED,0,0); + SendMessage(hwnd,INTM_SCROLLBARCHANGED, 0, 0); if (dat->hBmpBackground) {DeleteObject(dat->hBmpBackground); dat->hBmpBackground = NULL;} if (dat->hMenuBackground) {DeleteObject(dat->hMenuBackground); dat->hMenuBackground = NULL;} @@ -723,11 +723,11 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat ) { dat->bkColour = sttGetColor("CLC","BkColour",GetSysColor(COLOR_3DFACE)); { - if (db_get_b(NULL,"CLC","UseBitmap",CLCDEFAULT_USEBITMAP)) + if ( db_get_b(NULL,"CLC","UseBitmap",CLCDEFAULT_USEBITMAP)) { if ( !DBGetContactSettingString(NULL,"CLC","BkBitmap",&dbv)) { - dat->hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal); + dat->hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal); db_free(&dbv); } } @@ -740,9 +740,9 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat ) dat->MenuTextColor = sttGetColor("Menu","TextColour",CLCDEFAULT_TEXTCOLOUR); dat->MenuTextHiColor = sttGetColor("Menu","SelTextColour",CLCDEFAULT_MODERN_SELTEXTCOLOUR); - if (db_get_b(NULL,"Menu","UseBitmap",CLCDEFAULT_USEBITMAP)) { + if ( db_get_b(NULL,"Menu","UseBitmap",CLCDEFAULT_USEBITMAP)) { if ( !DBGetContactSettingString(NULL,"Menu","BkBitmap",&dbv)) { - dat->hMenuBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal); + dat->hMenuBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal); db_free(&dbv); } } @@ -784,9 +784,9 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat ) hdr.code = CLN_OPTIONSCHANGED; hdr.hwndFrom = hwnd; hdr.idFrom = 0;//GetDlgCtrlID(hwnd); - SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&hdr); + SendMessage(GetParent(hwnd),WM_NOTIFY, 0, (LPARAM)&hdr); } - SendMessage(hwnd,WM_SIZE,0,0); + SendMessage(hwnd,WM_SIZE, 0, 0); } diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 016a1a5304..84d54d0bea 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -277,16 +277,16 @@ static int ehhEventAreaBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; event_area.bkColour = sttGetColor("EventArea","BkColour",CLCDEFAULT_BKCOLOUR); - if (db_get_b(NULL,"EventArea","UseBitmap",CLCDEFAULT_USEBITMAP)) { + if ( db_get_b(NULL,"EventArea","UseBitmap",CLCDEFAULT_USEBITMAP)) { if ( !DBGetContactSettingString(NULL,"EventArea","BkBitmap",&dbv)) { - event_area.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal); + event_area.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal); db_free(&dbv); } } event_area.useWinColors = db_get_b(NULL, "EventArea", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS); event_area.backgroundBmpUse = db_get_w(NULL, "EventArea", "BkBmpUse", CLCDEFAULT_BKBMPUSE); } - PostMessage(pcli->hwndContactList,WM_SIZE,0,0); + PostMessage(pcli->hwndContactList,WM_SIZE, 0, 0); return 0; } @@ -295,8 +295,8 @@ void EventArea_ConfigureEventArea() int iCount = pcli->events.count; g_CluiData.dwFlags &= ~(CLUI_FRAME_AUTOHIDENOTIFY|CLUI_FRAME_SHOWALWAYS); - if (db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 1) g_CluiData.dwFlags |= CLUI_FRAME_AUTOHIDENOTIFY; - if (db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 2) g_CluiData.dwFlags |= CLUI_FRAME_SHOWALWAYS; + if ( db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 1) g_CluiData.dwFlags |= CLUI_FRAME_AUTOHIDENOTIFY; + if ( db_get_b(NULL,"CLUI","EventArea",SETTING_EVENTAREAMODE_DEFAULT) == 2) g_CluiData.dwFlags |= CLUI_FRAME_SHOWALWAYS; if (g_CluiData.dwFlags & CLUI_FRAME_SHOWALWAYS) g_CluiData.bNotifyActive = 1; @@ -404,7 +404,7 @@ int EventArea_Create(HWND hCluiWnd) CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)"Event Area Background/EventArea",0); HookEvent(ME_BACKGROUNDCONFIG_CHANGED,ehhEventAreaBackgroundSettingsChanged); - ehhEventAreaBackgroundSettingsChanged(0,0); + ehhEventAreaBackgroundSettingsChanged(0, 0); WNDCLASS wndclass = {0}; TCHAR pluginname[] = _T("EventArea"); @@ -423,14 +423,14 @@ int EventArea_Create(HWND hCluiWnd) RegisterClass(&wndclass); } g_CluiData.hwndEventFrame = CreateWindow(pluginname,pluginname,WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN, - 0,0,0,h,hCluiWnd,NULL,g_hInst,NULL); + 0, 0, 0, h,hCluiWnd,NULL,g_hInst,NULL); // register frame CLISTFrame Frame = { sizeof(CLISTFrame) }; Frame.hWnd = g_CluiData.hwndEventFrame; Frame.align = alBottom; Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME); - Frame.Flags = (db_get_b(NULL,"CLUI","ShowEventArea",SETTING_SHOWEVENTAREAFRAME_DEFAULT)?F_VISIBLE:0)|F_LOCKED|F_NOBORDER|F_NO_SUBCONTAINER|F_TCHAR; + Frame.Flags = ( db_get_b(NULL,"CLUI","ShowEventArea",SETTING_SHOWEVENTAREAFRAME_DEFAULT)?F_VISIBLE:0)|F_LOCKED|F_NOBORDER|F_NO_SUBCONTAINER|F_TCHAR; Frame.height = h; Frame.tname = _T("EventArea"); //do not translate Frame.TBtname = TranslateT("Event Area"); diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 388dd7e91c..57a753c388 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -36,7 +36,7 @@ INT_PTR CloseAction(WPARAM wParam,LPARAM lParam) int k; g_CluiData.bSTATE = STATE_PREPEARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT do - { k = CallService(MS_SYSTEM_OKTOEXIT,0,0); + { k = CallService(MS_SYSTEM_OKTOEXIT, 0, 0); } while (!k); @@ -146,7 +146,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.hIcon = NULL; mi.ptszName = LPGENT("Show even if offline"); - mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b((HANDLE)wParam,"CList","noOffline",0)?CMIF_CHECKED:0); + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | ( db_get_b((HANDLE)wParam,"CList","noOffline",0)?CMIF_CHECKED:0); mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE; mi.popupPosition = i+100000000; mi.position = -100000000; diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 6862b89981..4384d36ffa 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -81,7 +81,7 @@ HICON cliGetIconFromStatusMode(HANDLE hContact, const char *szProto,int status) if (status>ID_STATUS_OFFLINE) { // get xicon - hXIcon = (HICON)CallService(str,0,0); + hXIcon = (HICON)CallService(str, 0, 0); if (hXIcon) { // check overlay mode @@ -218,7 +218,7 @@ HRESULT PreLoadContactListModule() { /* Global data initialization */ g_CluiData.fOnDesktop = FALSE; - g_CluiData.dwKeyColor = RGB(255,0,255); + g_CluiData.dwKeyColor = RGB(255, 0, 255); g_CluiData.bCurrentAlpha = 255; //initialize firstly hooks @@ -335,7 +335,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) { RECT rc; int i=0; - rgn = CreateRectRgn(0,0,1,1); + rgn = CreateRectRgn(0, 0, 1,1); GetWindowRect(hWnd,&rc); GetWindowRgn(hWnd,rgn); OffsetRgn(rgn,rc.left,rc.top); @@ -425,10 +425,10 @@ int cliShowHide(WPARAM wParam,LPARAM lParam) { BOOL bShow = FALSE; - int iVisibleState = GetWindowVisibleState(pcli->hwndContactList,0,0); + int iVisibleState = GetWindowVisibleState(pcli->hwndContactList, 0, 0); int method = db_get_b(NULL, "ModernData", "HideBehind", SETTING_HIDEBEHIND_DEFAULT);; //(0-none, 1-leftedge, 2-rightedge); if (method) { - if (db_get_b(NULL, "ModernData", "BehindEdge", SETTING_BEHINDEDGE_DEFAULT) == 0 && lParam != 1) + if ( db_get_b(NULL, "ModernData", "BehindEdge", SETTING_BEHINDEDGE_DEFAULT) == 0 && lParam != 1) CLUI_HideBehindEdge(); //hide else CLUI_ShowFromBehindEdge(); @@ -490,7 +490,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam) db_set_b(NULL,"CList","State",SETTING_STATE_HIDDEN); } else { - if (db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT)) { + if ( db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT)) { CLUI_ShowWindowMod(pcli->hwndContactList, SW_HIDE); db_set_b(NULL,"CList","State",SETTING_STATE_HIDDEN); } diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index bca8ad5a03..7d18bd4c34 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -32,12 +32,12 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); SendDlgItemMessage(hwndDlg,IDC_MIN_ROW_HEIGHT_SPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_MIN_ROW_HEIGHT),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_MIN_ROW_HEIGHT_SPIN,UDM_SETRANGE,0,MAKELONG(255,0)); - SendDlgItemMessage(hwndDlg,IDC_MIN_ROW_HEIGHT_SPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","MinRowHeight",CLCDEFAULT_ROWHEIGHT),0)); + SendDlgItemMessage(hwndDlg,IDC_MIN_ROW_HEIGHT_SPIN,UDM_SETRANGE, 0, MAKELONG(255,0)); + SendDlgItemMessage(hwndDlg,IDC_MIN_ROW_HEIGHT_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","MinRowHeight",CLCDEFAULT_ROWHEIGHT),0)); SendDlgItemMessage(hwndDlg,IDC_ROW_BORDER_SPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_ROW_BORDER),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_ROW_BORDER_SPIN,UDM_SETRANGE,0,MAKELONG(255,0)); - SendDlgItemMessage(hwndDlg,IDC_ROW_BORDER_SPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","RowBorder",SETTING_ROWBORDER_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_ROW_BORDER_SPIN,UDM_SETRANGE, 0, MAKELONG(255,0)); + SendDlgItemMessage(hwndDlg,IDC_ROW_BORDER_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","RowBorder",SETTING_ROWBORDER_DEFAULT),0)); CheckDlgButton(hwndDlg, IDC_VARIABLE_ROW_HEIGHT, db_get_b(NULL,"CList","VariableRowHeight",SETTING_VARIABLEROWHEIGHT_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); CheckDlgButton(hwndDlg, IDC_ALIGN_TO_LEFT, db_get_b(NULL,"CList","AlignLeftItemsToLeft",SETTING_ALIGNLEFTTOLEFT_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); @@ -46,12 +46,12 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam CheckDlgButton(hwndDlg, IDC_MINIMODE, db_get_b(NULL,"CLC","CompactMode",SETTING_COMPACTMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_LEFTMARGIN),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETRANGE,0,MAKELONG(64,0)); - SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETPOS,0,MAKELONG(db_get_b(NULL,"CLC","LeftMargin",CLCDEFAULT_LEFTMARGIN),0)); + SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(64,0)); + SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETPOS, 0, MAKELONG( db_get_b(NULL,"CLC","LeftMargin",CLCDEFAULT_LEFTMARGIN),0)); SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_RIGHTMARGIN),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETRANGE,0,MAKELONG(64,0)); - SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETPOS,0,MAKELONG(db_get_b(NULL,"CLC","RightMargin",CLCDEFAULT_RIGHTMARGIN),0)); + SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETRANGE, 0, MAKELONG(64,0)); + SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_SETPOS, 0, MAKELONG( db_get_b(NULL,"CLC","RightMargin",CLCDEFAULT_RIGHTMARGIN),0)); // Listbox { @@ -208,14 +208,14 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - db_set_w(NULL,"CList","MinRowHeight",(WORD)SendDlgItemMessage(hwndDlg,IDC_MIN_ROW_HEIGHT_SPIN,UDM_GETPOS,0,0)); - db_set_w(NULL,"CList","RowBorder",(WORD)SendDlgItemMessage(hwndDlg,IDC_ROW_BORDER_SPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","MinRowHeight",(WORD)SendDlgItemMessage(hwndDlg,IDC_MIN_ROW_HEIGHT_SPIN,UDM_GETPOS, 0, 0)); + db_set_w(NULL,"CList","RowBorder",(WORD)SendDlgItemMessage(hwndDlg,IDC_ROW_BORDER_SPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CList","VariableRowHeight", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_VARIABLE_ROW_HEIGHT)); db_set_b(NULL,"CList","AlignLeftItemsToLeft", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_ALIGN_TO_LEFT)); db_set_b(NULL,"CList","AlignRightItemsToRight", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_ALIGN_TO_RIGHT)); db_set_b(NULL,"CLC","CompactMode", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_MINIMODE)); - db_set_b(NULL,"CLC","LeftMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_GETPOS,0,0)); - db_set_b(NULL,"CLC","RightMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_GETPOS,0,0)); + db_set_b(NULL,"CLC","LeftMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_GETPOS, 0, 0)); + db_set_b(NULL,"CLC","RightMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_GETPOS, 0, 0)); { HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST_ORDER); for (int i=0 ; i < NUM_ITEM_TYPE ; i++) { @@ -250,7 +250,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa CheckDlgButton(hwndDlg, IDC_AVATAR_IGNORE_SIZE, db_get_b(NULL,"CList","AvatarsIgnoreSizeForRow",SETTINGS_AVATARIGNORESIZEFORROW_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); CheckDlgButton(hwndDlg, IDC_AVATAR_OVERLAY_ICONS, db_get_b(NULL,"CList","AvatarsDrawOverlay",SETTINGS_AVATARDRAWOVERLAY_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); - switch(db_get_b(NULL,"CList","AvatarsOverlayType",SETTINGS_AVATAROVERLAYTYPE_DEFAULT)) { + switch( db_get_b(NULL,"CList","AvatarsOverlayType",SETTINGS_AVATAROVERLAYTYPE_DEFAULT)) { case SETTING_AVATAR_OVERLAY_TYPE_NORMAL: CheckDlgButton(hwndDlg, IDC_AVATAR_OVERLAY_ICON_NORMAL, BST_CHECKED); break; @@ -263,16 +263,16 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa } SendDlgItemMessage(hwndDlg,IDC_AVATAR_SIZE_SPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_AVATAR_SIZE),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_AVATAR_SIZE_SPIN,UDM_SETRANGE,0,MAKELONG(255,1)); - SendDlgItemMessage(hwndDlg,IDC_AVATAR_SIZE_SPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","AvatarsSize",SETTING_AVATARHEIGHT_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_AVATAR_SIZE_SPIN,UDM_SETRANGE, 0, MAKELONG(255,1)); + SendDlgItemMessage(hwndDlg,IDC_AVATAR_SIZE_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","AvatarsSize",SETTING_AVATARHEIGHT_DEFAULT),0)); SendDlgItemMessage(hwndDlg,IDC_AVATAR_WIDTH_SPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_AVATAR_WIDTH),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_AVATAR_WIDTH_SPIN,UDM_SETRANGE,0,MAKELONG(255,0)); - SendDlgItemMessage(hwndDlg,IDC_AVATAR_WIDTH_SPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","AvatarsWidth",SETTING_AVATARWIDTH_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_AVATAR_WIDTH_SPIN,UDM_SETRANGE, 0, MAKELONG(255,0)); + SendDlgItemMessage(hwndDlg,IDC_AVATAR_WIDTH_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","AvatarsWidth",SETTING_AVATARWIDTH_DEFAULT),0)); SendDlgItemMessage(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN,UDM_SETRANGE,0,MAKELONG(255,1)); - SendDlgItemMessage(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","AvatarsCustomCornerSize",SETTINGS_AVATARCORNERSIZE_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN,UDM_SETRANGE, 0, MAKELONG(255,1)); + SendDlgItemMessage(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","AvatarsCustomCornerSize",SETTINGS_AVATARCORNERSIZE_DEFAULT),0)); SendDlgItemMessage(hwndDlg, IDC_AVATAR_BORDER_COLOR, CPM_SETCOLOUR, 0, (COLORREF)db_get_dw(NULL,"CList","AvatarsBorderColor",SETTINGS_AVATARBORDERCOLOR_DEFAULT)); @@ -408,10 +408,10 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa db_set_b(NULL,"CList","AvatarsRoundCorners", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_AVATAR_ROUND_CORNERS)); db_set_b(NULL,"CList","AvatarsIgnoreSizeForRow", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_AVATAR_IGNORE_SIZE)); db_set_b(NULL,"CList","AvatarsUseCustomCornerSize", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK)); - db_set_w(NULL,"CList","AvatarsCustomCornerSize",(WORD)SendDlgItemMessage(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","AvatarsCustomCornerSize",(WORD)SendDlgItemMessage(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CList","AvatarsDrawOverlay", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_AVATAR_OVERLAY_ICONS)); - db_set_w(NULL,"CList","AvatarsSize",(WORD)SendDlgItemMessage(hwndDlg,IDC_AVATAR_SIZE_SPIN,UDM_GETPOS,0,0)); - db_set_w(NULL,"CList","AvatarsWidth",(WORD)SendDlgItemMessage(hwndDlg,IDC_AVATAR_WIDTH_SPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","AvatarsSize",(WORD)SendDlgItemMessage(hwndDlg,IDC_AVATAR_SIZE_SPIN,UDM_GETPOS, 0, 0)); + db_set_w(NULL,"CList","AvatarsWidth",(WORD)SendDlgItemMessage(hwndDlg,IDC_AVATAR_WIDTH_SPIN,UDM_GETPOS, 0, 0)); if (IsDlgButtonChecked(hwndDlg,IDC_AVATAR_OVERLAY_ICON_NORMAL)) db_set_b(NULL,"CList","AvatarsOverlayType",SETTING_AVATAR_OVERLAY_TYPE_NORMAL); @@ -443,8 +443,8 @@ static INT_PTR CALLBACK DlgProcItemIconOpts(HWND hwndDlg, UINT msg, WPARAM wPara CheckDlgButton(hwndDlg, IDC_HIDE_GROUPSICON, db_get_b(NULL,"CList","HideGroupsIcon",SETTING_HIDEGROUPSICON_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); CheckDlgButton(hwndDlg, IDC_NOTCHECKICONSIZE, db_get_b(NULL,"CList","IconIgnoreSizeForRownHeight",SETTING_ICONIGNORESIZE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); CheckDlgButton(hwndDlg, IDC_ALWAYS_VISIBLEICON, db_get_b(NULL,"CList","AlwaysShowAlwaysVisIcon",SETTING_ALWAYSVISICON_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); - CheckDlgButton(hwndDlg, IDC_USEXSTATUS, (db_get_b(NULL,"CLC","DrawOverlayedStatus",SETTING_DRAWOVERLAYEDSTATUS_DEFAULT)&1) ? BST_CHECKED : BST_UNCHECKED ); - CheckDlgButton(hwndDlg, IDC_DRAWSTATUSOVERLAY, (db_get_b(NULL,"CLC","DrawOverlayedStatus",SETTING_DRAWOVERLAYEDSTATUS_DEFAULT)&2) ? BST_CHECKED : BST_UNCHECKED ); + CheckDlgButton(hwndDlg, IDC_USEXSTATUS, ( db_get_b(NULL,"CLC","DrawOverlayedStatus",SETTING_DRAWOVERLAYEDSTATUS_DEFAULT)&1) ? BST_CHECKED : BST_UNCHECKED ); + CheckDlgButton(hwndDlg, IDC_DRAWSTATUSOVERLAY, ( db_get_b(NULL,"CLC","DrawOverlayedStatus",SETTING_DRAWOVERLAYEDSTATUS_DEFAULT)&2) ? BST_CHECKED : BST_UNCHECKED ); EnableWindow(GetDlgItem(hwndDlg,IDC_DRAWSTATUSOVERLAY),IsDlgButtonChecked(hwndDlg,IDC_USEXSTATUS)); if ( !IsDlgButtonChecked(hwndDlg,IDC_HIDE_ICON_ON_AVATAR)) @@ -534,7 +534,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara int item; TCHAR *align[] = {LPGENT("Left align group names"), LPGENT("Center group names"), LPGENT("Right align group names")}; for (int i=0; i < sizeof(align)/sizeof(char*); i++) - item = SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_ADDSTRING,0,(LPARAM)TranslateTS(align[i])); + item = SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i])); SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_SETCURSEL,db_get_b(NULL,"CList","AlignGroupCaptions",SETTING_ALIGNGROPCAPTION_DEFAULT),0); } CheckDlgButton(hwndDlg, IDC_ALIGN_RIGHT, db_get_b(NULL,"CList","TextAlignToRight",SETTING_TEXT_RIGHTALIGN_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); @@ -576,7 +576,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara case PSN_APPLY: db_set_b(NULL,"CList","TextRTL", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_RTL)); //TODO: Store IDC_ALIGNGROUPCOMBO at DBGetContactSettingByte(NULL,"CList","AlignGroupCaptions",SETTING_ALIGNGROPCAPTION_DEFAULT); - db_set_b(NULL,"CList","AlignGroupCaptions",(BYTE)SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_GETCURSEL,0,0)); + db_set_b(NULL,"CList","AlignGroupCaptions",(BYTE)SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_GETCURSEL, 0, 0)); db_set_b(NULL,"CList","TextAlignToRight", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_ALIGN_RIGHT)); db_set_b(NULL,"CList","TextReplaceSmileys", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_REPLACE_SMILEYS)); db_set_b(NULL,"CList","TextResizeSmileys", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_RESIZE_SMILEYS)); @@ -604,8 +604,8 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM CheckDlgButton(hwndDlg, IDC_SHOW, db_get_b(NULL,"CList","SecondLineShow",SETTING_SECONDLINE_SHOW_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_TOP_SPACE),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETRANGE,0,MAKELONG(255,0)); - SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","SecondLineTopSpace",SETTING_SECONDLINE_TOPSPACE_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETRANGE, 0, MAKELONG(255,0)); + SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","SecondLineTopSpace",SETTING_SECONDLINE_TOPSPACE_DEFAULT),0)); CheckDlgButton(hwndDlg, IDC_DRAW_SMILEYS, db_get_b(NULL,"CList","SecondLineDrawSmileys",SETTING_SECONDLINE_SMILEYS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED); { @@ -730,7 +730,7 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: db_set_b(NULL,"CList","SecondLineShow", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOW)); - db_set_w(NULL,"CList","SecondLineTopSpace", (WORD)SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","SecondLineTopSpace", (WORD)SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CList","SecondLineDrawSmileys", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_DRAW_SMILEYS)); { int radio; @@ -780,8 +780,8 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM CheckDlgButton(hwndDlg, IDC_SHOW, db_get_b(NULL,"CList","ThirdLineShow",SETTING_THIRDLINE_SHOW_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_TOP_SPACE),0); // set buddy - SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETRANGE,0,MAKELONG(255,0)); - SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","ThirdLineTopSpace",SETTING_THIRDLINE_TOPSPACE_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETRANGE, 0, MAKELONG(255,0)); + SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","ThirdLineTopSpace",SETTING_THIRDLINE_TOPSPACE_DEFAULT),0)); CheckDlgButton(hwndDlg, IDC_DRAW_SMILEYS, db_get_b(NULL,"CList","ThirdLineDrawSmileys",SETTING_THIRDLINE_SMILEYS_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED ); { @@ -900,7 +900,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: db_set_b(NULL,"CList","ThirdLineShow", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOW)); - db_set_w(NULL,"CList","ThirdLineTopSpace", (WORD)SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_GETPOS,0,0)); + db_set_w(NULL,"CList","ThirdLineTopSpace", (WORD)SendDlgItemMessage(hwndDlg,IDC_TOP_SPACE_SPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CList","ThirdLineDrawSmileys", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_DRAW_SMILEYS)); { int radio; diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index badfa95153..b3ad5d72e1 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -230,7 +230,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) pdnce->m_cache_cszProto = GetProtoForContact(pdnce->hContact); if (pdnce->m_cache_cszProto == NULL) pdnce->m_cache_bProtoNotExists = FALSE; - else if (CallService(MS_PROTO_ISPROTOCOLLOADED,0,(LPARAM)pdnce->m_cache_cszProto) == (int)NULL && 0) + else if (CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)pdnce->m_cache_cszProto) == (int)NULL && 0) pdnce->m_cache_bProtoNotExists = TRUE; else if (pdnce->m_cache_cszProto && pdnce->tszName) pdnce->freeName(); @@ -240,7 +240,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) pdnce->getName(); else if (pdnce->isUnknown && pdnce->m_cache_cszProto && pdnce->m_cache_bProtoNotExists == TRUE && g_flag_bOnModulesLoadedCalled) { - if (CallService(MS_PROTO_ISPROTOCOLLOADED,0,(LPARAM)pdnce->m_cache_cszProto) == 0) { + if (CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)pdnce->m_cache_cszProto) == 0) { pdnce->m_cache_bProtoNotExists = FALSE; pdnce->getName(); } @@ -449,7 +449,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) InvalidateDNCEbyPointer(hContact, pdnce, cws->value.type); if ( !strcmp(cws->szSetting,"IsSubcontact")) - PostMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0); + PostMessage(pcli->hwndContactTree,CLM_AUTOREBUILD, 0, 0); if ( !mir_strcmp(cws->szSetting, "Status") || wildcmp((char*)cws->szSetting, (char*) "Status?",2)) { if (g_szMetaModuleName && !mir_strcmp(cws->szModule,g_szMetaModuleName) && mir_strcmp(cws->szSetting, "Status")) { @@ -502,11 +502,11 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) char *szProto = GetContactProto((HANDLE)wParam); cli_ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact,szProto,szProto == NULL?ID_STATUS_OFFLINE:db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE)),1); //by FYR } - pcli->pfnClcBroadcast(CLM_AUTOREBUILD,0, 0); + pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); } else if ( !strcmp(cws->szSetting,"noOffline")) { InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type); - pcli->pfnClcBroadcast(CLM_AUTOREBUILD,0, 0); + pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); } } else if ( !strcmp(cws->szModule,"Protocol")) { @@ -523,6 +523,6 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) int PostAutoRebuidMessage(HWND hwnd) { if ( !CLM_AUTOREBUILD_WAS_POSTED) - CLM_AUTOREBUILD_WAS_POSTED = PostMessage(hwnd,CLM_AUTOREBUILD,0,0); + CLM_AUTOREBUILD_WAS_POSTED = PostMessage(hwnd,CLM_AUTOREBUILD, 0, 0); return CLM_AUTOREBUILD_WAS_POSTED; } diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 9e8c143ece..81476a373a 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -126,12 +126,12 @@ int GetAverageMode() int averageMode = 0; PROTOACCOUNT **accs; ProtoEnumAccounts( &count, &accs ); - for (i=0,netProtoCount = 0;i < count;i++) { + for (i=0, netProtoCount = 0;i < count;i++) { if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 ) continue; pcli->cycleStep = i; netProtoCount++; - if (averageMode == 0) averageMode = CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0); - else if (averageMode != CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0)) {averageMode = -1; break;} + if (averageMode == 0) averageMode = CallProtoService(accs[i]->szModuleName,PS_GETSTATUS, 0, 0); + else if (averageMode != CallProtoService(accs[i]->szModuleName,PS_GETSTATUS, 0, 0)) {averageMode = -1; break;} } return averageMode; } @@ -172,18 +172,18 @@ void cliTrayIconUpdateBase(const char *szChangedProto) pcli->cycleTimerId = 0; } ProtoEnumAccounts( &count, &accs ); - for (i=0,netProtoCount = 0;i < count;i++) { + for (i=0, netProtoCount = 0;i < count;i++) { if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 ) continue; netProtoCount++; if ( !lstrcmpA(szChangedProto,accs[i]->szModuleName)) pcli->cycleStep = i; - if (averageMode == 0) averageMode = CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0); - else if (averageMode != CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0)) {averageMode = -1; break;} + if (averageMode == 0) averageMode = CallProtoService(accs[i]->szModuleName,PS_GETSTATUS, 0, 0); + else if (averageMode != CallProtoService(accs[i]->szModuleName,PS_GETSTATUS, 0, 0)) {averageMode = -1; break;} } if (netProtoCount>1) { if (averageMode >= ID_STATUS_OFFLINE) { - if (db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) { - if (db_get_b(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT)) + if ( db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) { + if ( db_get_b(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT)) changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,averageMode),szChangedProto); else if (pcli->trayIcon && pcli->trayIcon[0].szProto != NULL) { pcli->pfnTrayIconDestroy(hwnd); @@ -194,7 +194,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) } else { - if (db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE + if ( db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE && db_get_b(NULL,"CList","AlwaysPrimary",SETTING_ALWAYSPRIMARY_DEFAULT)) { DBVARIANT dbv = {DBVT_DELETED}; @@ -209,7 +209,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) } } else { - switch(db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT)) { + switch( db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT)) { case SETTING_TRAYICON_SINGLE: { DBVARIANT dbv = {DBVT_DELETED}; @@ -217,13 +217,13 @@ void cliTrayIconUpdateBase(const char *szChangedProto) int status; if (DBGetContactSettingString(NULL,"CList","PrimaryStatus",&dbv)) szProto = NULL; else szProto = dbv.pszVal; - status = CallProtoService(szChangedProto,PS_GETSTATUS,0,0); + status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0); if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES) { // HICON hIcon; // 1 check if multi connecting icon - CListTray_GetGlobalStatus(0,0); + CListTray_GetGlobalStatus(0, 0); if (g_bMultiConnectionMode) if (_strcmpi(szChangedProto,g_szConnectingProto)) { pcli->pfnUnlockTray(); return; } @@ -238,7 +238,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) } } else - changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szProto,szProto?CallProtoService(szProto,PS_GETSTATUS,0,0):CallService(MS_CLIST_GETSTATUSMODE,0,0)),NULL); + changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szProto,szProto?CallProtoService(szProto,PS_GETSTATUS, 0, 0):CallService(MS_CLIST_GETSTATUSMODE, 0, 0)),NULL); db_free(&dbv); } @@ -246,8 +246,8 @@ void cliTrayIconUpdateBase(const char *szChangedProto) case SETTING_TRAYICON_CYCLE: { - int status = szChangedProto ? CallProtoService(szChangedProto,PS_GETSTATUS,0,0) : averageMode; - if ((g_StatusBarData.connectingIcon == 1 && CListTray_GetGlobalStatus(0,0) + int status = szChangedProto ? CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0) : averageMode; + if ((g_StatusBarData.connectingIcon == 1 && CListTray_GetGlobalStatus(0, 0) && ((status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES) || g_bMultiConnectionMode ))) { //connecting @@ -272,7 +272,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) } else { - pcli->cycleTimerId = CLUI_SafeSetTimer(NULL,0,db_get_w(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT)*1000,pcli->pfnTrayCycleTimerProc); + pcli->cycleTimerId = CLUI_SafeSetTimer(NULL, 0, db_get_w(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT)*1000, pcli->pfnTrayCycleTimerProc); changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,status),NULL); } @@ -287,7 +287,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) { int status; - status = CallProtoService(szChangedProto,PS_GETSTATUS,0,0); + status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0); if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES) { // @@ -297,14 +297,14 @@ void cliTrayIconUpdateBase(const char *szChangedProto) changed = pcli->pfnTrayIconSetBaseInfo(hIcon,szChangedProto); } else - changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,CallProtoService(szChangedProto,PS_GETSTATUS,0,0)),szChangedProto); + changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0)),szChangedProto); } } else if (pcli->pfnGetProtocolVisibility(szChangedProto)) { int i; int avg; avg = GetAverageMode(); - i = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,CallProtoService(szChangedProto,PS_GETSTATUS,0,0)),szChangedProto); + i = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0)),szChangedProto); if (i < 0 /* || (avg != -1)*/) { pcli->pfnTrayIconDestroy(hwnd); pcli->pfnTrayIconInit(hwnd); @@ -312,7 +312,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) else { int status; changed = i; - status = CallProtoService(szChangedProto,PS_GETSTATUS,0,0); + status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0); if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES) { // HICON hIcon; @@ -327,7 +327,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) { DBVARIANT dbv = {DBVT_DELETED}; char *szProto; - int status = CallProtoService(szChangedProto,PS_GETSTATUS,0,0); + int status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0); if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES) { @@ -369,13 +369,13 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd,UINT message,UINT_PTR idEve INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam) { - if (db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT)) + if ( db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT)) { if (GetActiveWindow() != pcli->hwndContactList && GetWindow(GetParent(GetActiveWindow()),GW_OWNER) != pcli->hwndContactList) { KillTimer(NULL,autoHideTimerId); - autoHideTimerId = CLUI_SafeSetTimer(NULL,0,1000*db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),TrayIconAutoHideTimer); + autoHideTimerId = CLUI_SafeSetTimer(NULL, 0, 1000*db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),TrayIconAutoHideTimer); } } return 0; @@ -401,23 +401,15 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) pcli->bTrayMenuOnScreen = FALSE; break; - // case WM_DRAWITEM: - // return CallService(MS_CLIST_MENUDRAWITEM,msg->wParam,msg->lParam); - - // case WM_MEASUREITEM: - // return CallService(MS_CLIST_MENUMEASUREITEM,msg->wParam,msg->lParam); - - case WM_ACTIVATE: { - HWND h1,h2,h4; SetCursor(LoadCursor(NULL, IDC_ARROW)); - h1 = (HWND)msg->lParam; - h2 = h1?GetParent(h1):NULL; - h4 = pcli->hwndContactList; - if (db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT)) { + HWND h1 = (HWND)msg->lParam; + HWND h2 = h1 ? GetParent(h1) : NULL; + HWND h4 = pcli->hwndContactList; + if ( db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT)) { if (LOWORD(msg->wParam) == WA_INACTIVE && h2 != h4) - autoHideTimerId = CLUI_SafeSetTimer(NULL,0,1000*db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),TrayIconAutoHideTimer); + autoHideTimerId = CLUI_SafeSetTimer(NULL, 0, 1000*db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),TrayIconAutoHideTimer); else { KillTimer(NULL,autoHideTimerId); autoHideTimerId = 0; @@ -434,7 +426,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) if ((GetAsyncKeyState(VK_CONTROL)&0x8000) && msg->lParam == WM_LBUTTONDOWN && !db_get_b(NULL,"CList","Tray1Click",SETTING_TRAY1CLICK_DEFAULT)) { POINT pt; HMENU hMenu; - hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); g_mutex_bOnTrayRightClick = 1; IS_WM_MOUSE_DOWN_IN_TRAY = 1; SetForegroundWindow(msg->hwnd); @@ -452,7 +444,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) else if (msg->lParam == WM_RBUTTONUP) { POINT pt; HMENU hMenu; - hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,0,0); + hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY, 0, 0); g_mutex_bOnTrayRightClick = 1; SetForegroundWindow(msg->hwnd); @@ -482,12 +474,14 @@ HANDLE hTrayHideShowMainMenuItem; typedef struct{ char *szServiceName; int Param1; -}TrayMenuExecParam,*lpTrayMenuExecParam; +} + TrayMenuExecParam,*lpTrayMenuExecParam; /* wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM return 0 on success. */ + static INT_PTR RemoveTrayMenuItem(WPARAM wParam,LPARAM lParam) { CallService(MO_REMOVEMENUITEM,wParam,0); @@ -496,30 +490,24 @@ static INT_PTR RemoveTrayMenuItem(WPARAM wParam,LPARAM lParam) static INT_PTR BuildTrayMenu(WPARAM wParam,LPARAM lParam) { - int tick; - HMENU hMenu; - ListParam param; - - memset(¶m,0,sizeof(param)); - param.MenuObjectHandle = hTrayMenuObject; + HMENU hMenu = CreatePopupMenu(); + int tick = GetTickCount(); - //hMenu = hMainMenu; - hMenu = CreatePopupMenu(); - //hMenu = wParam; - tick = GetTickCount(); - - NotifyEventHooks(g_CluiData.hEventPreBuildTrayMenu,0,0); + NotifyEventHooks(g_CluiData.hEventPreBuildTrayMenu, 0, 0); + ListParam param = { 0 }; + param.MenuObjectHandle = hTrayMenuObject; CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)¶m); - //DrawMenuBar((HWND)CallService("CLUI/GetHwnd",0,0)); + tick = GetTickCount()-tick; return (INT_PTR)hMenu; } static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam) { - TMO_MenuItem tmi; CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam; + + TMO_MenuItem tmi; if ( !pcli->pfnConvertMenu(mi, &tmi)) return NULL; @@ -536,36 +524,31 @@ static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hTrayMenuObject,(LPARAM)&tmi); op.Setting = OPT_MENUITEMSETUNIQNAME; op.Value = (INT_PTR)mi->pszService; - CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op); return (INT_PTR)op.Handle; - - // mainItemCount++; - // return MENU_CUSTOMITEMMAIN|(mainMenuItem[mainItemCount-1].id); } -INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam) { - +INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam) +{ MENUITEMINFO *mii = (MENUITEMINFO* )wParam; - if (mii == NULL) return 0; + if (mii == NULL) + return 0; - if (hTrayHideShowMainMenuItem == (HANDLE)lParam) - { + if (hTrayHideShowMainMenuItem == (HANDLE)lParam) { mii->fMask |= MIIM_STATE; mii->fState |= MFS_DEFAULT; - } - if (hTrayMainMenuItemProxy == (HANDLE)lParam) - { + + if (hTrayMainMenuItemProxy == (HANDLE)lParam) { mii->fMask |= MIIM_SUBMENU; //mi.fType = MFT_STRING; - mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0); + mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0); } - if (hTrayStatusMenuItemProxy == (HANDLE)lParam) - { + if (hTrayStatusMenuItemProxy == (HANDLE)lParam) { mii->fMask |= MIIM_SUBMENU; //mi.fType = MFT_STRING; - mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); } return(TRUE); @@ -574,12 +557,11 @@ INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam) { //called with: //wparam - ownerdata //lparam - lparam from winproc -INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam) { - if (wParam != 0) - { +INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam) +{ + if (wParam != 0) { lpTrayMenuExecParam mmep = (lpTrayMenuExecParam)wParam; - if ( !mir_strcmp(mmep->szServiceName,"Help/AboutCommand")) - { + if ( !mir_strcmp(mmep->szServiceName,"Help/AboutCommand")) { //bug in help.c,it used wparam as parent window handle without reason. mmep->Param1 = 0; } @@ -588,7 +570,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 = (lpTrayMenuExecParam)lParam; if (mmep != NULL) { @@ -614,71 +596,71 @@ void InitTrayMenus(void) tmp.CheckService = NULL; tmp.ExecService = "CLISTMENUSTRAY/ExecService"; tmp.name = "TrayMenu"; - hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp); + hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp); OptParam op; op.Handle = hTrayMenuObject; op.Setting = OPT_USERDEFINEDITEMS; op.Value = TRUE; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); op.Handle = hTrayMenuObject; op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE; op.Value = (INT_PTR)"CLISTMENUSTRAY/FreeOwnerDataTrayMenu"; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); op.Handle = hTrayMenuObject; op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE; op.Value = (INT_PTR)"CLISTMENUSTRAY/TrayMenuonAddService"; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); - //add exit command to menu + //add exit command to menu CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 900000; mi.pszService = "CloseAction"; mi.pszName = LPGEN("E&xit"); mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT); - AddTrayMenuItem(0,(LPARAM)&mi); + AddTrayMenuItem(0, (LPARAM)&mi); mi.position = 100000; mi.pszService = MS_CLIST_SHOWHIDE; mi.pszName = LPGEN("&Hide/Show"); mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE); - hTrayHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi); + hTrayHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0, (LPARAM)&mi); mi.position = 200000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER); mi.pszService = "FindAdd/FindAddCommand"; mi.pszName = LPGEN("&Find/Add Contacts..."); - AddTrayMenuItem(0,(LPARAM)&mi); + AddTrayMenuItem(0, (LPARAM)&mi); mi.position = 300000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004 mi.pszService = "FakeService_1"; mi.pszName = LPGEN("&Main Menu"); - hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi); + hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0, (LPARAM)&mi); mi.position = 300100; mi.pszService = "FakeService_2"; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004 mi.pszName = LPGEN("&Status"); - hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi); + hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0, (LPARAM)&mi); mi.position = 400000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS); mi.pszService = "Options/OptionsCommand"; mi.pszName = LPGEN("&Options..."); - AddTrayMenuItem(0,(LPARAM)&mi); + AddTrayMenuItem(0, (LPARAM)&mi); mi.position = 500000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA); mi.pszService = "Help/AboutCommand"; mi.pszName = LPGEN("&About"); - AddTrayMenuItem(0,(LPARAM)&mi); + AddTrayMenuItem(0, (LPARAM)&mi); - hMainMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0); - hStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + hMainMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0); + hStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); } void UninitTrayMenu() diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 4e188a182b..96ecc8b1e4 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -72,11 +72,11 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam) if ( ServiceExists(MS_MC_GETPROTOCOLNAME)) g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0); - CLUIServices_ProtocolStatusChanged(0,0); - SleepEx(0,TRUE); + CLUIServices_ProtocolStatusChanged(0, 0); + SleepEx(0, TRUE); g_flag_bOnModulesLoadedCalled = TRUE; ///pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE); - SendMessage(pcli->hwndContactList,UM_CREATECLC,0,0); //$$$ + SendMessage(pcli->hwndContactList,UM_CREATECLC, 0, 0); //$$$ InitSkinHotKeys(); g_CluiData.bSTATE = STATE_NORMAL; ske_RedrawCompleteWindow(); @@ -107,7 +107,7 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam) mi.flags = CMIM_FLAGS; GetClassName(hwndClist,cls,SIZEOF(cls)); hwndClist = (!lstrcmp(CLISTCONTROL_CLASS,cls))?hwndClist:pcli->hwndContactList; - hItem = (HANDLE)SendMessage(hwndClist,CLM_GETSELECTION,0,0); + hItem = (HANDLE)SendMessage(hwndClist,CLM_GETSELECTION, 0, 0); if ( !hItem) mi.flags = CMIM_FLAGS | CMIF_HIDDEN; @@ -152,21 +152,21 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam) INT_PTR CLUI::Service_ShowMainMenu(WPARAM wParam,LPARAM lParam) { - HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0); + HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0); POINT pt; GetCursorPos(&pt); - TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL); + TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y, 0, pcli->hwndContactList,NULL); return 0; } INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam) { - HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); POINT pt; GetCursorPos(&pt); - TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL); + TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y, 0, pcli->hwndContactList,NULL); return 0; } @@ -199,9 +199,9 @@ HRESULT CLUI::CreateCluiFrames() ZeroMemory(&mii,sizeof(mii)); mii.cbSize = MENUITEMINFO_V4_SIZE; mii.fMask = MIIM_SUBMENU; - mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0); - SetMenuItemInfo(g_hMenuMain,0,TRUE,&mii); - mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0); + SetMenuItemInfo(g_hMenuMain, 0, TRUE,&mii); + mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); SetMenuItemInfo(g_hMenuMain,1,TRUE,&mii); CreateCLCWindow(CluiWnd()); @@ -309,12 +309,12 @@ HRESULT CLUI::CreateCLCWindow(const HWND hwndClui) { ClcWnd() = CreateWindow(CLISTCONTROL_CLASS,_T(""), WS_CHILD|WS_CLIPCHILDREN|CLS_CONTACTLIST - |(db_get_b(NULL,"CList","UseGroups",SETTING_USEGROUPS_DEFAULT)?CLS_USEGROUPS:0) - |(db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CLS_HIDEOFFLINE:0) - |(db_get_b(NULL,"CList","HideEmptyGroups",SETTING_HIDEEMPTYGROUPS_DEFAULT)?CLS_HIDEEMPTYGROUPS:0 + |( db_get_b(NULL,"CList","UseGroups",SETTING_USEGROUPS_DEFAULT)?CLS_USEGROUPS:0) + |( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CLS_HIDEOFFLINE:0) + |( db_get_b(NULL,"CList","HideEmptyGroups",SETTING_HIDEEMPTYGROUPS_DEFAULT)?CLS_HIDEEMPTYGROUPS:0 |CLS_MULTICOLUMN ), - 0,0,0,0,hwndClui,NULL,g_hInst,NULL); + 0, 0, 0, 0, hwndClui,NULL,g_hInst,NULL); return S_OK; } @@ -333,7 +333,7 @@ HRESULT CLUI::FillAlphaChannel( HDC hDC, RECT *prcParent, BYTE bAlpha) RECT rcWindow; GetWindowRect( m_hWnd, &rcWindow ); - HRGN hRgn = CreateRectRgn(0,0,0,0); + HRGN hRgn = CreateRectRgn(0, 0, 0, 0); if ( GetWindowRgn(m_hWnd,hRgn) == ERROR) { DeleteObject(hRgn); @@ -387,7 +387,7 @@ HRESULT CLUI::CreateCLC() if (bOldHideOffline != (BYTE)-1) CallService( MS_CLIST_SETHIDEOFFLINE,(WPARAM)bOldHideOffline, 0); else - CallService( MS_CLIST_SETHIDEOFFLINE,0, 0); + CallService( MS_CLIST_SETHIDEOFFLINE, 0, 0); if (bOldUseGroups != (BYTE)-1) CallService( MS_CLIST_SETUSEGROUPS ,(WPARAM)bOldUseGroups, 0); else @@ -406,7 +406,7 @@ HRESULT CLUI::SnappingToEdge( WINDOWPOS *lpWindowPos ) if ( MyMonitorFromWindow == NULL || MyGetMonitorInfo == NULL ) return S_FALSE; - if (db_get_b(NULL, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT)) { + if ( db_get_b(NULL, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT)) { HMONITOR curMonitor = MyMonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST); MONITORINFO monInfo; monInfo.cbSize = sizeof(monInfo); @@ -495,7 +495,7 @@ int CLUI_ShowWindowMod(HWND hWnd, int nCmd) && g_CluiData.fSmoothAnimation && !g_bTransparentFlag) { - if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT)) + if ( db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT)) CLUI_SmoothAlphaTransition(hWnd, 255, 1); else { int ret = ShowWindow(hWnd,nCmd); @@ -527,7 +527,7 @@ static BOOL CLUI_WaitThreadsCompletion(HWND hwnd) TRACEVAR("g_dwSmoothAnimationThreadID: %x",g_dwSmoothAnimationThreadID); TRACEVAR("g_dwFillFontListThreadID: %x",g_dwFillFontListThreadID); bEntersCount++; - SleepEx(10,TRUE); + SleepEx(10, TRUE); return TRUE; } @@ -539,7 +539,7 @@ void CLUI_UpdateLayeredMode() g_CluiData.fDisableSkinEngine = db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT); if ( IsWinVer2000Plus()) { BOOL tLayeredFlag = TRUE; - tLayeredFlag &= (db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag) && !g_CluiData.fDisableSkinEngine); + tLayeredFlag &= ( db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag) && !g_CluiData.fDisableSkinEngine); if (g_CluiData.fLayered != tLayeredFlag) { BOOL fWasVisible = IsWindowVisible(pcli->hwndContactList); @@ -610,17 +610,17 @@ void CLUI_ChangeWindowMode() if ( !g_CluiData.fLayered) { style = 0; styleEx = 0; - if (db_get_b(NULL,"CList","ThinBorder",SETTING_THINBORDER_DEFAULT) || (db_get_b(NULL,"CList","NoBorder",SETTING_NOBORDER_DEFAULT))) { - style = WS_CLIPCHILDREN| (db_get_b(NULL,"CList","ThinBorder",SETTING_THINBORDER_DEFAULT)?WS_BORDER:0); + if ( db_get_b(NULL,"CList","ThinBorder",SETTING_THINBORDER_DEFAULT) || ( db_get_b(NULL,"CList","NoBorder",SETTING_NOBORDER_DEFAULT))) { + style = WS_CLIPCHILDREN| ( db_get_b(NULL,"CList","ThinBorder",SETTING_THINBORDER_DEFAULT)?WS_BORDER:0); styleEx = WS_EX_TOOLWINDOW; styleMaskEx |= WS_EX_APPWINDOW; } - else if (db_get_b(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT) && db_get_b(NULL,"CList","ToolWindow",SETTING_TOOLWINDOW_DEFAULT)) { + else if ( db_get_b(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT) && db_get_b(NULL,"CList","ToolWindow",SETTING_TOOLWINDOW_DEFAULT)) { styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/; style = WS_CAPTION|WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME; styleMaskEx |= WS_EX_APPWINDOW; } - else if (db_get_b(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT)) + else if ( db_get_b(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT)) style = WS_CAPTION|WS_SYSMENU|WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME|WS_MINIMIZEBOX; else { style = WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME; @@ -651,7 +651,7 @@ void CLUI_ChangeWindowMode() // < -> //1- If visible store it and hide - if (g_CluiData.fLayered && (db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT))) { + if (g_CluiData.fLayered && ( db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT))) { SetParent(pcli->hwndContactList,NULL); Sync( CLUIFrames_SetParentForContainers, (HWND) NULL ); UpdateWindow(pcli->hwndContactList); @@ -683,11 +683,11 @@ void CLUI_ChangeWindowMode() } else SetMenu(pcli->hwndContactList,g_hMenuMain); - if (g_CluiData.fLayered && (db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT))) + if (g_CluiData.fLayered && ( db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT))) ske_UpdateWindowImage(); //6- Pin to desktop mode - if (db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT)) { + if ( db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT)) { HWND hProgMan = FindWindow(_T("Progman"),NULL); if (IsWindow(hProgMan)) { SetParent(pcli->hwndContactList,hProgMan); @@ -719,8 +719,8 @@ void CLUI_ChangeWindowMode() h = (r.right-r.left)>(w*2)?w:(r.right-r.left); v = (r.bottom-r.top)>(w*2)?w:(r.bottom-r.top); h = (h < v)?h:v; - hRgn1 = CreateRoundRectRgn(0,0,(r.right-r.left+1),(r.bottom-r.top+1),h,h); - if ((db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0))) + hRgn1 = CreateRoundRectRgn(0, 0, (r.right-r.left+1),(r.bottom-r.top+1),h,h); + if (( db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0))) SetWindowRgn(pcli->hwndContactList,hRgn1,1); else { DeleteObject(hRgn1); @@ -758,12 +758,12 @@ int CLUI_UpdateTimer(BYTE BringIn) { if (g_CluiData.nBehindEdgeState == 0) { KillTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT); - CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT,wBehindEdgeHideDelay*100,NULL); + CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT,wBehindEdgeHideDelay*100, NULL); } if (bShowEventStarted == 0 && g_CluiData.nBehindEdgeState > 0) { KillTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT); - bShowEventStarted = (BOOL)CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT,wBehindEdgeShowDelay*100,NULL); + bShowEventStarted = (BOOL)CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT,wBehindEdgeShowDelay*100, NULL); } return 0; } @@ -779,7 +779,7 @@ int CLUI_HideBehindEdge() bShowEventStarted = 0; //1. get work area rectangle Docking_GetMonitorRectFromWindow(pcli->hwndContactList,&rcScreen); - //SystemParametersInfo(SPI_GETWORKAREA,0,&rcScreen,FALSE); + //SystemParametersInfo(SPI_GETWORKAREA, 0, &rcScreen,FALSE); //2. move out bordersize = wBehindEdgeBorderSize; GetWindowRect(pcli->hwndContactList,&rcWindow); @@ -792,7 +792,7 @@ int CLUI_HideBehindEdge() break; } g_CluiData.mutexPreventDockMoving = 0; - SetWindowPos(pcli->hwndContactList,NULL,rcWindow.left,rcWindow.top,0,0,SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE); + SetWindowPos(pcli->hwndContactList,NULL,rcWindow.left,rcWindow.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE); Sync(CLUIFrames_OnMoving,pcli->hwndContactList,&rcWindow); g_CluiData.mutexPreventDockMoving = 1; @@ -821,7 +821,7 @@ int CLUI_ShowFromBehindEdge() //Need to be moved out of screen //1. get work area rectangle - //SystemParametersInfo(SPI_GETWORKAREA,0,&rcScreen,FALSE); + //SystemParametersInfo(SPI_GETWORKAREA, 0, &rcScreen,FALSE); Docking_GetMonitorRectFromWindow(pcli->hwndContactList,&rcScreen); //2. move out @@ -836,7 +836,7 @@ int CLUI_ShowFromBehindEdge() break; } g_CluiData.mutexPreventDockMoving = 0; - SetWindowPos(pcli->hwndContactList,NULL,rcWindow.left,rcWindow.top,0,0,SWP_NOZORDER|SWP_NOSIZE); + SetWindowPos(pcli->hwndContactList,NULL,rcWindow.left,rcWindow.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE); Sync(CLUIFrames_OnMoving,pcli->hwndContactList,&rcWindow); g_CluiData.mutexPreventDockMoving = 1; @@ -1244,7 +1244,7 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) if (desth && destw) for (y = clRect.top;y < maxy;y += desth) for (x = clRect.left;x < maxx;x += destw) - StretchBlt(hdc,x,y,destw,desth,hdcBmp,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY); + StretchBlt(hdc,x,y,destw,desth,hdcBmp, 0, 0, bmp.bmWidth,bmp.bmHeight,SRCCOPY); SelectObject(hdcBmp,oldbm); DeleteDC(hdcBmp); @@ -1316,11 +1316,11 @@ void CLUI_cli_LoadCluiGlobalOpts() BOOL tLayeredFlag = IsWinVer2000Plus(); tLayeredFlag &= db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag); if (tLayeredFlag) { - if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 1) + if ( db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 1) db_set_b(NULL,"CList","WindowShadow",2); } else { - if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 2) + if ( db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 2) db_set_b(NULL,"CList","WindowShadow",1); } corecli.pfnLoadCluiGlobalOpts(); @@ -1343,9 +1343,9 @@ int CLUI_TestCursorOnBorders() if (g_bTransparentFlag) { if ( !bTransparentFocus && gf != hwnd) { CLUI_SmoothAlphaTransition(hwnd, db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), 1); - //g_proc_SetLayeredWindowAttributes(hwnd, RGB(0,0,0), (BYTE)DBGetContactSettingByte(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), LWA_ALPHA); + //g_proc_SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE)DBGetContactSettingByte(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), LWA_ALPHA); bTransparentFocus = 1; - CLUI_SafeSetTimer(hwnd, TM_AUTOALPHA,250,NULL); + CLUI_SafeSetTimer(hwnd, TM_AUTOALPHA,250, NULL); } } } @@ -1387,7 +1387,7 @@ int CLUI_TestCursorOnBorders() if ( !(pt.x >= r.left && pt.x <= r.right && pt.y >= r.top && pt.y <= r.bottom)) k = 0; k *= mouse_in_window; hCurs1 = LoadCursor(NULL, IDC_ARROW); - if (g_CluiData.nBehindEdgeState <= 0 && (!(db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT)))) + if (g_CluiData.nBehindEdgeState <= 0 && (!( db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT)))) switch(k) { case 1: @@ -1409,7 +1409,7 @@ int CLUI_TestCursorOnBorders() int CLUI_SizingOnBorder(POINT pt, int PerformSize) { - if ( !(db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT))) + if ( !( db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT))) { RECT r; HWND hwnd = pcli->hwndContactList; @@ -1465,14 +1465,14 @@ static void CLUI_SmoothAnimationThreadProc(HWND hwnd) { if ( !MirandaExiting()) Sync(CLUI_SyncSmoothAnimation, 0, (LPARAM)hwnd ); - SleepEx(20,TRUE); + SleepEx(20, TRUE); if (MirandaExiting()) { g_dwSmoothAnimationThreadID = 0; return; } } - else SleepEx(0,TRUE); + else SleepEx(0, TRUE); } while (mutex_bAnimationInProgress); g_dwSmoothAnimationThreadID = 0; @@ -1800,7 +1800,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) } else { - SetRect(&rcCorrectSizeRect,0,0,0,0); + SetRect(&rcCorrectSizeRect, 0, 0, 0, 0); // bNeedFixSizingRect = 0; } return DefWindowProc(m_hWnd,msg,wParam,lParam); @@ -1842,7 +1842,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) CheckFramesPos(&rc); Sync(CLUIFrames_OnMoving,m_hWnd,&rc); if ( !IsIconic(m_hWnd)) { - if ( !CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) + if ( !CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) { //if g_CluiData.fDocked, dont remember pos (except for width) db_set_dw(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top)); db_set_dw(NULL,"CList","x",(DWORD)rc.left); @@ -1877,12 +1877,12 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) Sync(CLUIFrames_OnClistResize_mod,(WPARAM)m_hWnd,(LPARAM)1); CLUIFrames_ApplyNewSizes(2); CLUIFrames_ApplyNewSizes(1); - SendMessage(m_hWnd,CLN_LISTSIZECHANGE,0,0); + SendMessage(m_hWnd,CLN_LISTSIZECHANGE, 0, 0); g_mutex_bSizing = 0; } // ske_RedrawCompleteWindow(); - if ( !CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) + if ( !CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) { //if g_CluiData.fDocked, dont remember pos (except for width) db_set_dw(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top)); db_set_dw(NULL,"CList","x",(DWORD)rc.left); @@ -1901,8 +1901,8 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) h = (r.right-r.left)>(w*2)?w:(r.right-r.left); v = (r.bottom-r.top)>(w*2)?w:(r.bottom-r.top); h = (h < v)?h:v; - hRgn1 = CreateRoundRectRgn(0,0,(r.right-r.left+1),(r.bottom-r.top+1),h,h); - if ((db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0))) + hRgn1 = CreateRoundRectRgn(0, 0, (r.right-r.left+1),(r.bottom-r.top+1),h,h); + if (( db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0))) SetWindowRgn(m_hWnd,hRgn1,FALSE); else { @@ -1913,7 +1913,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) } } else { - if (db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT)) { + if ( db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT)) { CLUI_ShowWindowMod(m_hWnd, SW_HIDE); db_set_b(NULL,"CList","State",SETTING_STATE_HIDDEN); } @@ -2062,7 +2062,7 @@ LRESULT CLUI::OnCreate( UINT msg, WPARAM wParam, LPARAM lParam ) { TranslateMenu(GetMenu(m_hWnd)); DrawMenuBar(m_hWnd); - CLUIServices_ProtocolStatusChanged(0,0); + CLUIServices_ProtocolStatusChanged(0, 0); MENUITEMINFO mii; ZeroMemory(&mii,sizeof(mii)); @@ -2071,7 +2071,7 @@ LRESULT CLUI::OnCreate( UINT msg, WPARAM wParam, LPARAM lParam ) mii.dwItemData = MENU_MIRANDAMENU; mii.fType = MFT_OWNERDRAW; mii.dwTypeData = NULL; - SetMenuItemInfo(GetMenu(m_hWnd),0,TRUE,&mii); + SetMenuItemInfo(GetMenu(m_hWnd), 0, TRUE,&mii); // mii.fMask = MIIM_TYPE; mii.fType = MFT_OWNERDRAW; @@ -2165,7 +2165,7 @@ LRESULT CLUI::OnStatusBarUpdateTimer( UINT msg, WPARAM wParam, LPARAM lParam ) if (pt->bGlobal) status = g_bMultiConnectionMode?ID_STATUS_CONNECTING:0; else - status = CallProtoService(pt->szProto,PS_GETSTATUS,0,0); + status = CallProtoService(pt->szProto,PS_GETSTATUS, 0, 0); if ( !(status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES)) { @@ -2311,7 +2311,7 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) BOOL IsOption = FALSE; SetCursor(LoadCursor(NULL, IDC_ARROW)); SendMessage(pcli->hwndContactTree, WM_ACTIVATE, wParam, lParam); - if (db_get_b(NULL, "ModernData", "HideBehind", SETTING_HIDEBEHIND_DEFAULT)) + if ( db_get_b(NULL, "ModernData", "HideBehind", SETTING_HIDEBEHIND_DEFAULT)) { if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && GetParent((HWND)lParam) != m_hWnd && !IsOption) { @@ -2332,7 +2332,7 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) { if (g_bTransparentFlag) if (bTransparentFocus) - CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA,250,NULL); + CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA,250, NULL); } else { @@ -2367,7 +2367,7 @@ LRESULT CLUI::OnSetCursor( UINT msg, WPARAM wParam, LPARAM lParam ) { CLUI_SmoothAlphaTransition(m_hWnd, db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), 1); bTransparentFocus = 1; - CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA,250,NULL); + CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA,250, NULL); } } int k = CLUI_TestCursorOnBorders(); @@ -2430,7 +2430,7 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) pt.y = (short)HIWORD(lParam); t = MenuItemFromPoint(m_hWnd,g_hMenuMain,pt); - if (t == -1 && (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT))) + if (t == -1 && ( db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT))) return HTCAPTION; } @@ -2441,7 +2441,7 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) pt.x = (short)LOWORD(lParam); pt.y = (short)HIWORD(lParam); k = CLUI_SizingOnBorder(pt,0); - if ( !k && (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT))) + if ( !k && ( db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT))) return HTCAPTION; else return k+9; } @@ -2458,7 +2458,7 @@ LRESULT CLUI::OnShowWindow( UINT msg, WPARAM wParam, LPARAM lParam ) if ( !wParam) gAlpha = 0; else - gAlpha = (db_get_b(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT):255); + gAlpha = ( db_get_b(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT):255); if (wParam) { g_CluiData.bCurrentAlpha = 0; @@ -2483,7 +2483,7 @@ LRESULT CLUI::OnSysCommand( UINT msg, WPARAM wParam, LPARAM lParam ) } DefWindowProc(m_hWnd, msg, wParam, lParam); - if (db_get_b(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT)) + if ( db_get_b(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT)) Sync( CLUIFrames_ActivateSubContainers, TRUE ); return FALSE; } @@ -2491,7 +2491,7 @@ LRESULT CLUI::OnSysCommand( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnKeyDown( UINT msg, WPARAM wParam, LPARAM lParam ) { if (wParam == VK_F5) - SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0); + SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD, 0, 0); return DefCluiWndProc( msg, wParam, lParam ); } @@ -2528,7 +2528,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) rcWindow = rcSizingRect; else GetWindowRect(m_hWnd,&rcWindow); - if ( !g_CluiData.fAutoSize || pcli->hwndContactTree == 0 || CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) + if ( !g_CluiData.fAutoSize || pcli->hwndContactTree == 0 || CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) return FALSE; maxHeight = db_get_b(NULL,"CLUI","MaxSizeHeight",SETTING_MAXSIZEHEIGHT_DEFAULT); @@ -2540,11 +2540,11 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) if (frm) rcTree2 = frm->wndSize; else - SetRect(&rcTree2,0,0,0,0); + SetRect(&rcTree2, 0, 0, 0, 0); winstyle = GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE); - SystemParametersInfo(SPI_GETWORKAREA,0,&rcWorkArea,FALSE); + SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea,FALSE); if (MyMonitorFromWindow) { HMONITOR hMon = MyMonitorFromWindow(pcli->hwndContactTree, MONITOR_DEFAULTTONEAREST); @@ -2573,7 +2573,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) if (newHeight == (rcWindow.bottom-rcWindow.top)) return 0; - if (db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT)) { + if ( db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT)) { rcWindow.top = rcWindow.bottom-newHeight; if (rcWindow.top < rcWorkArea.top) rcWindow.top = rcWorkArea.top; } @@ -2596,10 +2596,10 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) bNeedFixSizingRect = 0; } if ( !mutex_bDuringSizing) - SetWindowPos(m_hWnd,0,rcWindow.left,rcWindow.top,rcWindow.right-rcWindow.left,rcWindow.bottom-rcWindow.top,SWP_NOZORDER|SWP_NOACTIVATE); + SetWindowPos(m_hWnd, 0, rcWindow.left,rcWindow.top,rcWindow.right-rcWindow.left,rcWindow.bottom-rcWindow.top,SWP_NOZORDER|SWP_NOACTIVATE); else { - SetWindowPos(m_hWnd,0,rcWindow.left,rcWindow.top,rcWindow.right-rcWindow.left,rcWindow.bottom-rcWindow.top,SWP_NOZORDER|SWP_NOACTIVATE); + SetWindowPos(m_hWnd, 0, rcWindow.left,rcWindow.top,rcWindow.right-rcWindow.left,rcWindow.bottom-rcWindow.top,SWP_NOZORDER|SWP_NOACTIVATE); } nRequiredHeight = 0; @@ -2616,7 +2616,7 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0) return DefCluiWndProc(WM_NOTIFY, 0, (LPARAM)pnmc); - if (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) { + if ( db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) { POINT pt; int res; pt = pnmc->pt; @@ -2625,7 +2625,7 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) return res; } - if (db_get_b(NULL,"CLUI","DragToScroll",SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) + if ( db_get_b(NULL,"CLUI","DragToScroll",SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) return ClcEnterDragToScroll(pcli->hwndContactTree,pnmc->pt.y); return 0; @@ -2665,8 +2665,8 @@ LRESULT CLUI::OnContextMenu( UINT msg, WPARAM wParam, LPARAM lParam ) if (PtInRect( &rc ,pt )) { HMENU hMenu; - hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDGROUP,0,0); - TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,m_hWnd,NULL); + hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDGROUP, 0, 0); + TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y, 0, m_hWnd,NULL); DestroyTrayMenu(hMenu); } return FALSE; @@ -2766,7 +2766,7 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 3, dis->itemState); mir_snprintf(buf,SIZEOF(buf),"Main,ID=MainMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False"); SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf); - DrawState(dis->hDC,NULL,NULL,(LPARAM)hIcon,0,(dis->rcItem.right+dis->rcItem.left-GetSystemMetrics(SM_CXSMICON))/2+dx,(dis->rcItem.bottom+dis->rcItem.top-GetSystemMetrics(SM_CYSMICON))/2+dx,0,0,DST_ICON|(dis->itemState&ODS_INACTIVE && FALSE?DSS_DISABLED:DSS_NORMAL)); + DrawState(dis->hDC,NULL,NULL,(LPARAM)hIcon, 0, (dis->rcItem.right+dis->rcItem.left-GetSystemMetrics(SM_CXSMICON))/2+dx,(dis->rcItem.bottom+dis->rcItem.top-GetSystemMetrics(SM_CYSMICON))/2+dx, 0, 0, DST_ICON|(dis->itemState&ODS_INACTIVE && FALSE?DSS_DISABLED:DSS_NORMAL)); Skin_ReleaseIcon(hIcon); nMirMenuState = dis->itemState; } @@ -2827,7 +2827,7 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam ) { RECT r; GetWindowRect(pcli->hwndContactList,&r); - if (db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT)) + if ( db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT)) r.top = r.bottom-CLUIFrames_GetTotalHeight(); else r.bottom = r.top+CLUIFrames_GetTotalHeight(); diff --git a/plugins/Clist_modern/src/modern_cluiframes.cpp b/plugins/Clist_modern/src/modern_cluiframes.cpp index 70bc97ec4b..55822c76be 100644 --- a/plugins/Clist_modern/src/modern_cluiframes.cpp +++ b/plugins/Clist_modern/src/modern_cluiframes.cpp @@ -139,7 +139,7 @@ int CLUIFrames_OnMoving( HWND hwnd, RECT *r) dy = (r->top-wr.top)+pt.y; x = Frame->wndSize.left; y = Frame->wndSize.top; - SetWindowPos(Frame->OwnerWindow,NULL,x+dx,y+dy,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSENDCHANGING|SWP_ASYNCWINDOWPOS|SWP_DEFERERASE|SWP_NOOWNERZORDER); + SetWindowPos(Frame->OwnerWindow,NULL,x+dx,y+dy, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSENDCHANGING|SWP_ASYNCWINDOWPOS|SWP_DEFERERASE|SWP_NOOWNERZORDER); }; } @@ -204,10 +204,10 @@ int CLUIFrames_ActivateSubContainers( BOOL active) { HWND hwnd = g_pfwFrames[i].OwnerWindow; hwnd = g_pfwFrames[i].hWnd;//OwnerWindow; - if (db_get_b(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT)) + if ( db_get_b(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT)) { - SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); - SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); + SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); + SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); } else SetWindowPos(g_pfwFrames[i].OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE|SWP_NOSIZE | SWP_NOMOVE); }; @@ -251,13 +251,13 @@ int CLUIFrames_OnShowHide( HWND hwnd, int mode ) if (mode != SW_HIDE) { - SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); - if (db_get_b(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT)) + SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); + if ( db_get_b(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT)) { - SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); - SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); + SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); + SetWindowPos(g_pfwFrames[i].OwnerWindow,HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); } - else SetWindowPos(g_pfwFrames[i].OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0,SWP_NOACTIVATE|SWP_NOSIZE | SWP_NOMOVE); + else SetWindowPos(g_pfwFrames[i].OwnerWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE|SWP_NOSIZE | SWP_NOMOVE); } } } @@ -436,11 +436,11 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) GetWindowRect( pThumb->ContainerWnd, &rcOld ); } - memset(&fakeMainWindow,0,sizeof(fakeMainWindow)); + memset(&fakeMainWindow, 0, sizeof(fakeMainWindow)); fakeMainWindow.ContainerWnd = pcli->hwndContactList; fakeMainWindow.floating = TRUE; - memset(&fakeTaskBarWindow,0,sizeof(fakeTaskBarWindow)); + memset(&fakeTaskBarWindow, 0, sizeof(fakeTaskBarWindow)); fakeTaskBarWindow.ContainerWnd = hWndExplorerToolBar; fakeTaskBarWindow.floating = TRUE; @@ -623,8 +623,8 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) HWND_TOPMOST, nNewX, nNewY, - 0, - 0, + 0, + 0, SWP_NOSIZE | SWP_NOZORDER|SWP_NOACTIVATE ); @@ -683,27 +683,27 @@ static int DBLoadFrameSettingsAtPos(int pos,int Frameid) _itoa(pos,sadd,10); - //DBWriteContactSettingString(0,CLUIFrameModule,strcat("Name",sadd),Frames[Frameid].name); + //DBWriteContactSettingString(0, CLUIFrameModule,strcat("Name",sadd),Frames[Frameid].name); //bool - g_pfwFrames[Frameid].collapsed = db_get_b(0,CLUIFrameModule,AS(buf,"Collapse",sadd),g_pfwFrames[Frameid].collapsed); + g_pfwFrames[Frameid].collapsed = db_get_b(0, CLUIFrameModule,AS(buf,"Collapse",sadd),g_pfwFrames[Frameid].collapsed); - g_pfwFrames[Frameid].Locked = db_get_b(0,CLUIFrameModule,AS(buf,"Locked",sadd),g_pfwFrames[Frameid].Locked); - g_pfwFrames[Frameid].visible = db_get_b(0,CLUIFrameModule,AS(buf,"Visible",sadd),g_pfwFrames[Frameid].visible); - g_pfwFrames[Frameid].TitleBar.ShowTitleBar = db_get_b(0,CLUIFrameModule,AS(buf,"TBVisile",sadd),g_pfwFrames[Frameid].TitleBar.ShowTitleBar); + g_pfwFrames[Frameid].Locked = db_get_b(0, CLUIFrameModule,AS(buf,"Locked",sadd),g_pfwFrames[Frameid].Locked); + g_pfwFrames[Frameid].visible = db_get_b(0, CLUIFrameModule,AS(buf,"Visible",sadd),g_pfwFrames[Frameid].visible); + g_pfwFrames[Frameid].TitleBar.ShowTitleBar = db_get_b(0, CLUIFrameModule,AS(buf,"TBVisile",sadd),g_pfwFrames[Frameid].TitleBar.ShowTitleBar); - g_pfwFrames[Frameid].height = db_get_w(0,CLUIFrameModule,AS(buf,"Height",sadd),g_pfwFrames[Frameid].height); - g_pfwFrames[Frameid].HeightWhenCollapsed = db_get_w(0,CLUIFrameModule,AS(buf,"HeightCollapsed",sadd),0); - g_pfwFrames[Frameid].align = db_get_w(0,CLUIFrameModule,AS(buf,"Align",sadd),g_pfwFrames[Frameid].align); + g_pfwFrames[Frameid].height = db_get_w(0, CLUIFrameModule,AS(buf,"Height",sadd),g_pfwFrames[Frameid].height); + g_pfwFrames[Frameid].HeightWhenCollapsed = db_get_w(0, CLUIFrameModule,AS(buf,"HeightCollapsed",sadd),0); + g_pfwFrames[Frameid].align = db_get_w(0, CLUIFrameModule,AS(buf,"Align",sadd),g_pfwFrames[Frameid].align); - g_pfwFrames[Frameid].FloatingPos.x = DBGetContactSettingRangedWord(0,CLUIFrameModule,AS(buf,"FloatX",sadd),100,0,2048); - g_pfwFrames[Frameid].FloatingPos.y = DBGetContactSettingRangedWord(0,CLUIFrameModule,AS(buf,"FloatY",sadd),100,0,2048); - g_pfwFrames[Frameid].FloatingSize.x = DBGetContactSettingRangedWord(0,CLUIFrameModule,AS(buf,"FloatW",sadd),100,0,2048); - g_pfwFrames[Frameid].FloatingSize.y = DBGetContactSettingRangedWord(0,CLUIFrameModule,AS(buf,"FloatH",sadd),100,0,2048); + g_pfwFrames[Frameid].FloatingPos.x = DBGetContactSettingRangedWord(0, CLUIFrameModule,AS(buf,"FloatX",sadd),100, 0, 2048); + g_pfwFrames[Frameid].FloatingPos.y = DBGetContactSettingRangedWord(0, CLUIFrameModule,AS(buf,"FloatY",sadd),100, 0, 2048); + g_pfwFrames[Frameid].FloatingSize.x = DBGetContactSettingRangedWord(0, CLUIFrameModule,AS(buf,"FloatW",sadd),100, 0, 2048); + g_pfwFrames[Frameid].FloatingSize.y = DBGetContactSettingRangedWord(0, CLUIFrameModule,AS(buf,"FloatH",sadd),100, 0, 2048); - g_pfwFrames[Frameid].floating = db_get_b(0,CLUIFrameModule,AS(buf,"Floating",sadd),0); - g_pfwFrames[Frameid].order = db_get_w(0,CLUIFrameModule,AS(buf,"Order",sadd),0); + g_pfwFrames[Frameid].floating = db_get_b(0, CLUIFrameModule,AS(buf,"Floating",sadd),0); + g_pfwFrames[Frameid].order = db_get_w(0, CLUIFrameModule,AS(buf,"Order",sadd),0); - g_pfwFrames[Frameid].UseBorder = db_get_b(0,CLUIFrameModule,AS(buf,"UseBorder",sadd),g_pfwFrames[Frameid].UseBorder); + g_pfwFrames[Frameid].UseBorder = db_get_b(0, CLUIFrameModule,AS(buf,"UseBorder",sadd),g_pfwFrames[Frameid].UseBorder); return 0; } @@ -715,25 +715,25 @@ static int DBStoreFrameSettingsAtPos(int pos,int Frameid) _itoa(pos,sadd,10); - db_set_ws(0,CLUIFrameModule,AS(buf,"Name",sadd),g_pfwFrames[Frameid].Name); + db_set_ws(0, CLUIFrameModule,AS(buf,"Name",sadd),g_pfwFrames[Frameid].Name); //bool - db_set_b(0,CLUIFrameModule,AS(buf,"Collapse",sadd),(BYTE)btoint(g_pfwFrames[Frameid].collapsed)); - db_set_b(0,CLUIFrameModule,AS(buf,"Locked",sadd),(BYTE)btoint(g_pfwFrames[Frameid].Locked)); - db_set_b(0,CLUIFrameModule,AS(buf,"Visible",sadd),(BYTE)btoint(g_pfwFrames[Frameid].visible)); - db_set_b(0,CLUIFrameModule,AS(buf,"TBVisile",sadd),(BYTE)btoint(g_pfwFrames[Frameid].TitleBar.ShowTitleBar)); - - db_set_w(0,CLUIFrameModule,AS(buf,"Height",sadd),(WORD)g_pfwFrames[Frameid].height); - db_set_w(0,CLUIFrameModule,AS(buf,"HeightCollapsed",sadd),(WORD)g_pfwFrames[Frameid].HeightWhenCollapsed); - db_set_w(0,CLUIFrameModule,AS(buf,"Align",sadd),(WORD)g_pfwFrames[Frameid].align); + db_set_b(0, CLUIFrameModule,AS(buf,"Collapse",sadd),(BYTE)btoint(g_pfwFrames[Frameid].collapsed)); + db_set_b(0, CLUIFrameModule,AS(buf,"Locked",sadd),(BYTE)btoint(g_pfwFrames[Frameid].Locked)); + db_set_b(0, CLUIFrameModule,AS(buf,"Visible",sadd),(BYTE)btoint(g_pfwFrames[Frameid].visible)); + db_set_b(0, CLUIFrameModule,AS(buf,"TBVisile",sadd),(BYTE)btoint(g_pfwFrames[Frameid].TitleBar.ShowTitleBar)); + + db_set_w(0, CLUIFrameModule,AS(buf,"Height",sadd),(WORD)g_pfwFrames[Frameid].height); + db_set_w(0, CLUIFrameModule,AS(buf,"HeightCollapsed",sadd),(WORD)g_pfwFrames[Frameid].HeightWhenCollapsed); + db_set_w(0, CLUIFrameModule,AS(buf,"Align",sadd),(WORD)g_pfwFrames[Frameid].align); //FloatingPos - db_set_w(0,CLUIFrameModule,AS(buf,"FloatX",sadd),(WORD)g_pfwFrames[Frameid].FloatingPos.x); - db_set_w(0,CLUIFrameModule,AS(buf,"FloatY",sadd),(WORD)g_pfwFrames[Frameid].FloatingPos.y); - db_set_w(0,CLUIFrameModule,AS(buf,"FloatW",sadd),(WORD)g_pfwFrames[Frameid].FloatingSize.x); - db_set_w(0,CLUIFrameModule,AS(buf,"FloatH",sadd),(WORD)g_pfwFrames[Frameid].FloatingSize.y); - - db_set_b(0,CLUIFrameModule,AS(buf,"Floating",sadd),(BYTE)btoint(g_pfwFrames[Frameid].floating)); - db_set_b(0,CLUIFrameModule,AS(buf,"UseBorder",sadd),(BYTE)btoint(g_pfwFrames[Frameid].UseBorder)); - db_set_w(0,CLUIFrameModule,AS(buf,"Order",sadd),(WORD)g_pfwFrames[Frameid].order); + db_set_w(0, CLUIFrameModule,AS(buf,"FloatX",sadd),(WORD)g_pfwFrames[Frameid].FloatingPos.x); + db_set_w(0, CLUIFrameModule,AS(buf,"FloatY",sadd),(WORD)g_pfwFrames[Frameid].FloatingPos.y); + db_set_w(0, CLUIFrameModule,AS(buf,"FloatW",sadd),(WORD)g_pfwFrames[Frameid].FloatingSize.x); + db_set_w(0, CLUIFrameModule,AS(buf,"FloatH",sadd),(WORD)g_pfwFrames[Frameid].FloatingSize.y); + + db_set_b(0, CLUIFrameModule,AS(buf,"Floating",sadd),(BYTE)btoint(g_pfwFrames[Frameid].floating)); + db_set_b(0, CLUIFrameModule,AS(buf,"UseBorder",sadd),(BYTE)btoint(g_pfwFrames[Frameid].UseBorder)); + db_set_w(0, CLUIFrameModule,AS(buf,"Order",sadd),(WORD)g_pfwFrames[Frameid].order); return 0; } @@ -766,7 +766,7 @@ static int CLUIFramesLoadFrameSettings(int Frameid) if (Frameid < 0 || Frameid >= g_nFramesCount) return -1; - maxstored = db_get_w(0,CLUIFrameModule,"StoredFrames",-1); + maxstored = db_get_w(0, CLUIFrameModule,"StoredFrames",-1); if (maxstored == -1) return 0; storpos = LocateStorePosition(Frameid,maxstored); @@ -784,14 +784,14 @@ static int CLUIFramesStoreFrameSettings(int Frameid) if (Frameid < 0 || Frameid >= g_nFramesCount) return -1; - maxstored = db_get_w(0,CLUIFrameModule,"StoredFrames",-1); + maxstored = db_get_w(0, CLUIFrameModule,"StoredFrames",-1); if (maxstored == -1) maxstored = 0; storpos = LocateStorePosition(Frameid,maxstored); if (storpos == -1) {storpos = maxstored; maxstored++;} DBStoreFrameSettingsAtPos(storpos,Frameid); - db_set_w(0,CLUIFrameModule,"StoredFrames",(WORD)maxstored); + db_set_w(0, CLUIFrameModule,"StoredFrames",(WORD)maxstored); return 0; } @@ -1206,7 +1206,7 @@ static int UpdateTBToolTip(int framepos) ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ; ti.uId = (UINT_PTR)g_pfwFrames[framepos].TitleBar.hwnd; - return(SendMessage(g_pfwFrames[framepos].TitleBar.hwndTip,TTM_UPDATETIPTEXT ,0,(LPARAM)&ti)); + return(SendMessage(g_pfwFrames[framepos].TitleBar.hwndTip,TTM_UPDATETIPTEXT , 0, (LPARAM)&ti)); } }; @@ -1258,7 +1258,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) } CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); - SetWindowPos(fw.TitleBar.hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED|SWP_NOACTIVATE); + SetWindowPos(fw.TitleBar.hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED|SWP_NOACTIVATE); return 0; case FO_NAME: @@ -1431,7 +1431,7 @@ static int _us_DoShowHideFrame(WPARAM wParam,LPARAM lParam) if (g_pfwFrames[pos].OwnerWindow) CLUI_ShowWindowMod(g_pfwFrames[pos].OwnerWindow,(g_pfwFrames[pos].visible && g_pfwFrames[pos].collapsed && IsWindowVisible(pcli->hwndContactList))?SW_SHOW/*NOACTIVATE*/:SW_HIDE); else if (g_pfwFrames[pos].visible) { - g_pfwFrames[pos].OwnerWindow = CreateSubContainerWindow(pcli->hwndContactList,g_pfwFrames[pos].FloatingPos.x,g_pfwFrames[pos].FloatingPos.y,10,10); + g_pfwFrames[pos].OwnerWindow = CreateSubContainerWindow(pcli->hwndContactList,g_pfwFrames[pos].FloatingPos.x,g_pfwFrames[pos].FloatingPos.y,10, 10); SetParent(g_pfwFrames[pos].hWnd,g_pfwFrames[pos].OwnerWindow); CLUI_ShowWindowMod(g_pfwFrames[pos].OwnerWindow,(g_pfwFrames[pos].visible && g_pfwFrames[pos].collapsed && IsWindowVisible(pcli->hwndContactList))?SW_SHOW/*NOACTIVATE*/:SW_HIDE); } @@ -1476,7 +1476,7 @@ static int _us_DoMoveFrame(WPARAM wParam,LPARAM lParam) curalign = g_pfwFrames[pos].align; v = 0; sd = (SortData*)malloc(sizeof(SortData)*g_nFramesCount); - memset(sd,0,sizeof(SortData)*g_nFramesCount); + memset(sd, 0, sizeof(SortData)*g_nFramesCount); for (i=0;i < g_nFramesCount;i++) { if (g_pfwFrames[i].floating || (!g_pfwFrames[i].visible) || (g_pfwFrames[i].align != curalign)){continue;}; @@ -1596,7 +1596,7 @@ static int _us_DoSetFrameBorder(WPARAM wParam,LPARAM lParam) GetWindowRect(hw,&rc); CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_FLAGS,wParam),oldflags); - SetWindowPos(hw,0,0,0,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE|SWP_DRAWFRAME); + SetWindowPos(hw, 0, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE|SWP_DRAWFRAME); return 0; } @@ -1620,7 +1620,7 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam) if (g_pfwFrames[FrameId].align == alClient && !(g_pfwFrames[FrameId].Locked || (!g_pfwFrames[FrameId].visible) || g_pfwFrames[FrameId].floating)) { RECT rc; - if (CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) {return 0;}; + if (CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) {return 0;}; if ( !g_CluiData.fDocked && g_CluiData.fAutoSize) {return 0;}; GetWindowRect(pcli->hwndContactList,&rc); @@ -1637,7 +1637,7 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam) g_pfwFrames[FrameId].collapsed = TRUE; } - SetWindowPos(pcli->hwndContactList,NULL,0,0,rc.right-rc.left,rc.bottom,SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE); + SetWindowPos(pcli->hwndContactList,NULL, 0, 0, rc.right-rc.left,rc.bottom,SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE); CLUIFramesStoreAllFrames(); @@ -1699,8 +1699,8 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam) } else { - //SetWindowPos(Frames[FrameId].hWnd,HWND_TOP,0,0,Frames[FrameId].wndSize.right-Frames[FrameId].wndSize.left,Frames[FrameId].height,SWP_SHOWWINDOW|SWP_NOMOVE); - SetWindowPos(g_pfwFrames[FrameId].ContainerWnd,HWND_TOP,0,0,g_pfwFrames[FrameId].wndSize.right-g_pfwFrames[FrameId].wndSize.left+6,g_pfwFrames[FrameId].height+DEFAULT_TITLEBAR_HEIGHT+4,SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOMOVE); + //SetWindowPos(Frames[FrameId].hWnd,HWND_TOP, 0, 0, Frames[FrameId].wndSize.right-Frames[FrameId].wndSize.left,Frames[FrameId].height,SWP_SHOWWINDOW|SWP_NOMOVE); + SetWindowPos(g_pfwFrames[FrameId].ContainerWnd,HWND_TOP, 0, 0, g_pfwFrames[FrameId].wndSize.right-g_pfwFrames[FrameId].wndSize.left+6,g_pfwFrames[FrameId].height+DEFAULT_TITLEBAR_HEIGHT+4,SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOMOVE); }; @@ -1715,14 +1715,14 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam) } else { - //SetWindowPos(Frames[FrameId].hWnd,HWND_TOP,0,0,Frames[FrameId].wndSize.right-Frames[FrameId].wndSize.left,Frames[FrameId].height,SWP_SHOWWINDOW|SWP_NOMOVE); + //SetWindowPos(Frames[FrameId].hWnd,HWND_TOP, 0, 0, Frames[FrameId].wndSize.right-Frames[FrameId].wndSize.left,Frames[FrameId].height,SWP_SHOWWINDOW|SWP_NOMOVE); RECT contwnd; GetWindowRect(g_pfwFrames[FrameId].ContainerWnd,&contwnd); contwnd.top = contwnd.bottom-contwnd.top;//height contwnd.left = contwnd.right-contwnd.left;//width contwnd.top -= (oldHeight-g_pfwFrames[FrameId].height);//newheight - SetWindowPos(g_pfwFrames[FrameId].ContainerWnd,HWND_TOP,0,0,contwnd.left,contwnd.top,SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOMOVE); + SetWindowPos(g_pfwFrames[FrameId].ContainerWnd,HWND_TOP, 0, 0, contwnd.left,contwnd.top,SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOMOVE); }; CLUIFramesStoreAllFrames(); return 0; @@ -1795,7 +1795,7 @@ static HFONT CLUILoadTitleBarFont() char facename[] = "MS Shell Dlg"; HFONT hfont; LOGFONTA logfont; - memset(&logfont,0,sizeof(logfont)); + memset(&logfont, 0, sizeof(logfont)); memmove(logfont.lfFaceName,facename,sizeof(facename)); logfont.lfWeight = FW_NORMAL; logfont.lfHeight = -10; @@ -1819,7 +1819,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) g_pfwFrames = (FRAMEWND*)realloc(g_pfwFrames,sizeof(FRAMEWND)*(g_nFramesCount+1)); - memset(&g_pfwFrames[g_nFramesCount],0,sizeof(FRAMEWND)); + memset(&g_pfwFrames[g_nFramesCount], 0, sizeof(FRAMEWND)); g_pfwFrames[g_nFramesCount].id = _iNextFrameId++; g_pfwFrames[g_nFramesCount].align = clfrm->align; g_pfwFrames[g_nFramesCount].hWnd = clfrm->hWnd; @@ -1834,7 +1834,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) //override tbbtip //clfrm->Flags |= F_SHOWTBTIP; // - if (db_get_b(0,CLUIFrameModule,"RemoveAllBorders",0) == 1) + if ( db_get_b(0, CLUIFrameModule,"RemoveAllBorders",0) == 1) { clfrm->Flags |= F_NOBORDER; }; @@ -1873,12 +1873,12 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) g_pfwFrames[g_nFramesCount].TitleBar.hwnd = CreateWindow(CLUIFrameTitleBarClassName,g_pfwFrames[g_nFramesCount].Name, - (db_get_b(0,CLUIFrameModule,"RemoveAllTitleBarBorders",1)?0:WS_BORDER) + ( db_get_b(0, CLUIFrameModule,"RemoveAllTitleBarBorders",1)?0:WS_BORDER) |WS_CHILD|WS_CLIPCHILDREN| (g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBar?WS_VISIBLE:0)| WS_CLIPCHILDREN, - 0,0,0,0,pcli->hwndContactList,NULL,g_hInst,NULL); + 0, 0, 0, 0, pcli->hwndContactList,NULL,g_hInst,NULL); SetWindowLongPtr(g_pfwFrames[g_nFramesCount].TitleBar.hwnd,GWLP_USERDATA,g_pfwFrames[g_nFramesCount].id); @@ -1890,7 +1890,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) pcli->hwndContactList, NULL, g_hInst, NULL); - SetWindowPos(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip, HWND_TOPMOST,0, 0, 0, 0, + SetWindowPos(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); { TOOLINFOA ti; @@ -1902,7 +1902,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) ti.hinst = g_hInst; ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ; ti.uId = (UINT_PTR)g_pfwFrames[g_nFramesCount].TitleBar.hwnd; - res = SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ADDTOOL,0,(LPARAM)&ti); + res = SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ADDTOOL, 0, (LPARAM)&ti); } SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip,0); @@ -2084,7 +2084,7 @@ static int CLUIFrameMoveResize(const FRAMEWND *Frame) Frame->wndSize.right-Frame->wndSize.left, Frame->wndSize.bottom-Frame->wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE ); //- -= -= - SetWindowPos(Frame->hWnd,NULL,0,0, + SetWindowPos(Frame->hWnd,NULL, 0, 0, Frame->wndSize.right-Frame->wndSize.left, Frame->wndSize.bottom-Frame->wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE); } @@ -2396,7 +2396,7 @@ int CLUIFrames_ApplyNewSizes(int mode) if (IsWindowVisible(pcli->hwndContactList)) { ske_DrawNonFramedObjects(1,0); - CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,0,0); + CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE, 0, 0); } g_CluiData.mutexPreventDockMoving = 1; return 0; @@ -2483,7 +2483,7 @@ int SizeFramesByWindowRect(RECT *r, HDWP * PosBatch, int mode) hwnd = GetParent(g_pfwFrames[i].OwnerWindow); *PosBatch = DeferWindowPos(*PosBatch,g_pfwFrames[i].OwnerWindow,NULL,g_pfwFrames[i].wndSize.left+r->left,g_pfwFrames[i].wndSize.top+r->top, g_pfwFrames[i].wndSize.right-g_pfwFrames[i].wndSize.left, g_pfwFrames[i].wndSize.bottom-g_pfwFrames[i].wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE); - SetWindowPos(g_pfwFrames[i].hWnd,NULL,0,0, + SetWindowPos(g_pfwFrames[i].hWnd,NULL, 0, 0, g_pfwFrames[i].wndSize.right-g_pfwFrames[i].wndSize.left, g_pfwFrames[i].wndSize.bottom-g_pfwFrames[i].wndSize.top,SWP_NOZORDER|SWP_NOACTIVATE/*|SWP_NOSENDCHANGING*/); } //Frame @@ -2552,7 +2552,7 @@ int CheckFramesPos(RECT *wr) RECT r; GetWindowRect(g_pfwFrames[i].hWnd,&r); if (r.top-wr->top != g_pfwFrames[i].wndSize.top || r.left-wr->left != g_pfwFrames[i].wndSize.left) - SetWindowPos(g_pfwFrames[i].hWnd,NULL,g_pfwFrames[i].wndSize.left, g_pfwFrames[i].wndSize.top,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE); + SetWindowPos(g_pfwFrames[i].hWnd,NULL,g_pfwFrames[i].wndSize.left, g_pfwFrames[i].wndSize.top, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE); } if (g_pfwFrames[i].TitleBar.ShowTitleBar) { @@ -2686,9 +2686,9 @@ int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam) if (hBmpBackground) {DeleteObject(hBmpBackground); hBmpBackground = NULL;} if (g_CluiData.fDisableSkinEngine) { - if (db_get_b(NULL,"FrameTitleBar","UseBitmap",CLCDEFAULT_USEBITMAP)) { + if ( db_get_b(NULL,"FrameTitleBar","UseBitmap",CLCDEFAULT_USEBITMAP)) { if ( !DBGetContactSettingString(NULL,"FrameTitleBar","BkBitmap",&dbv)) { - hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal); + hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal); db_free(&dbv); } } @@ -2719,9 +2719,9 @@ void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColou HFONT hFont; - //InvalidateRect(hwnd,0,FALSE); + //InvalidateRect(hwnd, 0, FALSE); - hFont = (HFONT)SendMessage(hwnd,WM_GETFONT,0,0); + hFont = (HFONT)SendMessage(hwnd,WM_GETFONT, 0, 0); if (mhdc) { @@ -2808,7 +2808,7 @@ void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColou for (;y < maxy;y += desth) { if (y < rcPaint->top-desth) continue; for (x = 0;x < maxx;x += destw) - StretchBlt(hdcMem,x,y,destw,desth,hdcBmp,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY); + StretchBlt(hdcMem,x,y,destw,desth,hdcBmp, 0, 0, bmp.bmWidth,bmp.bmHeight,SRCCOPY); } DeleteDC(hdcBmp); } @@ -2891,7 +2891,7 @@ int DrawTitleBar(HDC hdcMem2,RECT *rect,int Frameid) { ske_BltBackImage(g_pfwFrames[pos].TitleBar.hwnd,hdcMem,&rc); } - else BitBlt(hdcMem,0,0,rc.right-rc.left,rc.bottom-rc.top,hdcMem2,rect->left,rect->top,SRCCOPY); + else BitBlt(hdcMem, 0, 0, rc.right-rc.left,rc.bottom-rc.top,hdcMem2,rect->left,rect->top,SRCCOPY); SkinDrawGlyph(hdcMem,&rc,&rc,"Main,ID=FrameCaption"); } if (bThemed) @@ -2905,7 +2905,7 @@ int DrawTitleBar(HDC hdcMem2,RECT *rect,int Frameid) if (g_pfwFrames[pos].TitleBar.hicon != NULL) { - mod_DrawIconEx_helper(hdcMem,rc.left +2,rc.top+((g_nTitleBarHeight>>1)-(GetSystemMetrics(SM_CYSMICON)>>1)),g_pfwFrames[pos].TitleBar.hicon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL); + mod_DrawIconEx_helper(hdcMem,rc.left +2,rc.top+((g_nTitleBarHeight>>1)-(GetSystemMetrics(SM_CYSMICON)>>1)),g_pfwFrames[pos].TitleBar.hicon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL); textrc.left += GetSystemMetrics(SM_CXSMICON)+4; textrc.top += 2; } @@ -2926,11 +2926,11 @@ int DrawTitleBar(HDC hdcMem2,RECT *rect,int Frameid) } if ( !AlignCOLLIconToLeft) { - mod_DrawIconEx_helper(hdcMem,g_pfwFrames[pos].TitleBar.wndSize.right-GetSystemMetrics(SM_CXSMICON)-2,rc.top+((g_nTitleBarHeight>>1)-(GetSystemMetrics(SM_CXSMICON)>>1)),g_pfwFrames[pos].collapsed?LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN):LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT),GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL); + mod_DrawIconEx_helper(hdcMem,g_pfwFrames[pos].TitleBar.wndSize.right-GetSystemMetrics(SM_CXSMICON)-2,rc.top+((g_nTitleBarHeight>>1)-(GetSystemMetrics(SM_CXSMICON)>>1)),g_pfwFrames[pos].collapsed?LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN):LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT),GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL); } else { - mod_DrawIconEx_helper(hdcMem,rc.left,rc.top+((g_nTitleBarHeight>>1)-(GetSystemMetrics(SM_CXSMICON)>>1)),g_pfwFrames[pos].collapsed?LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN):LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT),GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL); + mod_DrawIconEx_helper(hdcMem,rc.left,rc.top+((g_nTitleBarHeight>>1)-(GetSystemMetrics(SM_CXSMICON)>>1)),g_pfwFrames[pos].collapsed?LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN):LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT),GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL); } @@ -2941,12 +2941,12 @@ int DrawTitleBar(HDC hdcMem2,RECT *rect,int Frameid) { HRGN rgn = CreateRectRgn(rect->left,rect->top,rect->right,rect->bottom); SelectClipRgn(hdcMem2,rgn); - BitBlt(hdcMem2,rect->left,rect->top,rc.right-rc.left,rc.bottom-rc.top,hdcMem,0,0,SRCCOPY); + BitBlt(hdcMem2,rect->left,rect->top,rc.right-rc.left,rc.bottom-rc.top,hdcMem, 0, 0, SRCCOPY); DeleteObject(rgn); } else - BitBlt(hdcMem2,rect->left,rect->top,rc.right-rc.left,rc.bottom-rc.top,hdcMem,0,0,SRCCOPY); - //MyAlphaBlend(hdcMem2,rect.left,rect.top,rc.right-rc.left,rc.bottom-rc.top,hdcMem,0,0,rc.right-rc.left,rc.bottom-rc.top,bf); + BitBlt(hdcMem2,rect->left,rect->top,rc.right-rc.left,rc.bottom-rc.top,hdcMem, 0, 0, SRCCOPY); + //MyAlphaBlend(hdcMem2,rect.left,rect.top,rc.right-rc.left,rc.bottom-rc.top,hdcMem, 0, 0, rc.right-rc.left,rc.bottom-rc.top,bf); } SelectObject(hdcMem,b2); @@ -2967,7 +2967,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam int xpos,ypos; Frameid = (GetWindowLongPtr(hwnd,GWLP_USERDATA)); - memset(&rect,0,sizeof(rect)); + memset(&rect, 0, sizeof(rect)); switch(msg) @@ -3067,7 +3067,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam }; - TrackPopupMenu(hmenu,TPM_LEFTALIGN,pt.x,pt.y,0,hwnd,0); + TrackPopupMenu(hmenu,TPM_LEFTALIGN,pt.x,pt.y, 0, hwnd,0); DestroyMenu(hmenu); } break; @@ -3106,7 +3106,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam if ((!(wParam&MK_CONTROL)) && g_pfwFrames[framepos].Locked && (!(g_pfwFrames[framepos].floating))) { - if (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) { + if ( db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) { POINT pt; int res; //pt = nm->pt; @@ -3247,7 +3247,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam g_pfwFrames[pos].FloatingPos.x = newpos.x; g_pfwFrames[pos].FloatingPos.y = newpos.y; CLUIFrames_SetFrameFloat(id,0); - //SetWindowPos(Frames[pos].ContainerWnd,0,newpos.x,newpos.y,0,0,SWP_NOSIZE); + //SetWindowPos(Frames[pos].ContainerWnd, 0, newpos.x,newpos.y, 0, 0, SWP_NOSIZE); newpt.x = 0;newpt.y = 0; @@ -3309,8 +3309,8 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam HWND_TOPMOST, nLeft, nTop, - 0, - 0, + 0, + 0, SWP_NOSIZE |SWP_NOACTIVATE| SWP_NOZORDER ); }; @@ -3442,17 +3442,17 @@ static int CLUIFrameResizeFloatingFrame(int framepos) //if (Frames[framepos].Locked){return 0;}; g_pfwFrames[framepos].height = height-DEFAULT_TITLEBAR_HEIGHT; - SetWindowPos(g_pfwFrames[framepos].TitleBar.hwnd,HWND_TOP,0,0,width,DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_DRAWFRAME); - SetWindowPos(g_pfwFrames[framepos].hWnd,HWND_TOP,0,DEFAULT_TITLEBAR_HEIGHT,width,height-DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW); + SetWindowPos(g_pfwFrames[framepos].TitleBar.hwnd,HWND_TOP, 0, 0, width,DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_DRAWFRAME); + SetWindowPos(g_pfwFrames[framepos].hWnd,HWND_TOP, 0, DEFAULT_TITLEBAR_HEIGHT,width,height-DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW); } else { - //SetWindowPos(Frames[framepos].TitleBar.hwnd,HWND_TOP,0,0,width,DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW|SWP_NOMOVE); + //SetWindowPos(Frames[framepos].TitleBar.hwnd,HWND_TOP, 0, 0, width,DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW|SWP_NOMOVE); //if (Frames[framepos].Locked){return 0;}; g_pfwFrames[framepos].height = height; CLUI_ShowWindowMod(g_pfwFrames[framepos].TitleBar.hwnd,SW_HIDE); - SetWindowPos(g_pfwFrames[framepos].hWnd,HWND_TOP,0,0,width,height,SWP_SHOWWINDOW|SWP_NOACTIVATE); + SetWindowPos(g_pfwFrames[framepos].hWnd,HWND_TOP, 0, 0, width,height,SWP_SHOWWINDOW|SWP_NOACTIVATE); }; // CLUIFramesForceUpdateFrame(&Frames[framepos]); @@ -3480,7 +3480,7 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP int Frameid; Frameid = (GetWindowLongPtr(hwnd,GWLP_USERDATA)); - memset(&rect,0,sizeof(rect)); + memset(&rect, 0, sizeof(rect)); /* if ((msg == WM_MOVE) || (msg == WM_MOVING) || (msg == WM_NCLBUTTONDOWN) || (msg == WM_SYSCOMMAND) ) @@ -3488,7 +3488,7 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP if ( ServiceExists("Utils/SnapWindowProc")) { SnapWindowProc_t SnapInfo; - memset(&SnapInfo,0,sizeof(SnapInfo)); + memset(&SnapInfo, 0, sizeof(SnapInfo)); SnapInfo.hWnd = hwnd; SnapInfo.wParam = wParam; @@ -3507,7 +3507,7 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP { HWND hw = lParam?GetParent((HWND)lParam):0; alpha = db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT); - if (hw) SetWindowPos(hw,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE); + if (hw) SetWindowPos(hw,HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE); CLUI_SmoothAlphaTransition(hwnd, alpha, 1); } } @@ -3558,7 +3558,7 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP static HWND CreateSubContainerWindow(HWND parent,int x,int y,int width,int height) { HWND hwnd; - hwnd = CreateWindowEx(g_proc_SetLayeredWindowAttributesNew ? WS_EX_LAYERED:0,CLUIFrameSubContainerClassName,_T("SubContainerWindow"),WS_POPUP|(!g_CluiData.fLayered ? WS_BORDER : 0),x,y,width,height,parent,0,g_hInst,0); + hwnd = CreateWindowEx(g_proc_SetLayeredWindowAttributesNew ? WS_EX_LAYERED:0, CLUIFrameSubContainerClassName,_T("SubContainerWindow"),WS_POPUP|(!g_CluiData.fLayered ? WS_BORDER : 0),x,y,width,height,parent, 0, g_hInst,0); SetWindowLongPtr(hwnd,GWL_STYLE,GetWindowLongPtr(hwnd,GWL_STYLE)&~(WS_CAPTION|WS_BORDER)); if (g_CluiData.fOnDesktop) { @@ -3580,14 +3580,14 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP int Frameid; Frameid = (GetWindowLongPtr(hwnd,GWLP_USERDATA)); - memset(&rect,0,sizeof(rect)); + memset(&rect, 0, sizeof(rect)); /* if ((msg == WM_MOVE) || (msg == WM_MOVING) || (msg == WM_NCLBUTTONDOWN) || (msg == WM_SYSCOMMAND) ) { if ( ServiceExists("Utils/SnapWindowProc")) { SnapWindowProc_t SnapInfo; - memset(&SnapInfo,0,sizeof(SnapInfo)); + memset(&SnapInfo, 0, sizeof(SnapInfo)); SnapInfo.hWnd = hwnd; SnapInfo.wParam = wParam; @@ -3604,7 +3604,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP int framepos; framepos = id2pos(Frameid); - //SetWindowPos(Frames[framepos].TitleBar.hwndTip, HWND_TOPMOST,0, 0, 0, 0,SWP_NOMOVE | SWP_NOSIZE ); + //SetWindowPos(Frames[framepos].TitleBar.hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); return 0; }; @@ -3634,8 +3634,8 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP }; - memset(&minmax,0,sizeof(minmax)); - if (SendMessage(g_pfwFrames[framepos].hWnd,WM_GETMINMAXINFO,0,(LPARAM)&minmax) == 0) + memset(&minmax, 0, sizeof(minmax)); + if (SendMessage(g_pfwFrames[framepos].hWnd,WM_GETMINMAXINFO, 0, (LPARAM)&minmax) == 0) { RECT border; int tbh = g_nTitleBarHeight*btoint(g_pfwFrames[framepos].TitleBar.ShowTitleBar); @@ -3714,7 +3714,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP g_pfwFrames[framepos].FloatingPos.x = newpos.x; g_pfwFrames[framepos].FloatingPos.y = newpos.y; CLUIFrames_SetFrameFloat(Frameid,0); - //SetWindowPos(Frames[pos].ContainerWnd,0,newpos.x,newpos.y,0,0,SWP_NOSIZE); + //SetWindowPos(Frames[pos].ContainerWnd, 0, newpos.x,newpos.y, 0, 0, SWP_NOSIZE); newpt.x = 0;newpt.y = 0; @@ -3762,7 +3762,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP }; case WM_LBUTTONDOWN: { - if (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) { + if ( db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) { POINT pt; GetCursorPos(&pt); return SendMessage( hwnd, WM_SYSCOMMAND, SC_MOVE|HTCAPTION,MAKELPARAM(pt.x,pt.y)); @@ -3792,7 +3792,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP }; static HWND CreateContainerWindow(HWND parent,int x,int y,int width,int height) { - return(CreateWindow(_T("FramesContainer"),_T("FramesContainer"),WS_POPUP|WS_THICKFRAME,x,y,width,height,parent,0,g_hInst,0)); + return(CreateWindow(_T("FramesContainer"),_T("FramesContainer"),WS_POPUP|WS_THICKFRAME,x,y,width,height,parent, 0, g_hInst,0)); }; @@ -3808,7 +3808,7 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam) { if (g_pfwFrames[pos].OwnerWindow != (HWND)-2 && g_pfwFrames[pos].visible) { - if (g_pfwFrames[pos].OwnerWindow == 0) g_pfwFrames[pos].OwnerWindow = CreateSubContainerWindow(pcli->hwndContactList,g_pfwFrames[pos].FloatingPos.x,g_pfwFrames[pos].FloatingPos.y,10,10); + if (g_pfwFrames[pos].OwnerWindow == 0) g_pfwFrames[pos].OwnerWindow = CreateSubContainerWindow(pcli->hwndContactList,g_pfwFrames[pos].FloatingPos.x,g_pfwFrames[pos].FloatingPos.y,10, 10); CLUI_ShowWindowMod(g_pfwFrames[pos].OwnerWindow,(g_pfwFrames[pos].visible && g_pfwFrames[pos].collapsed && IsWindowVisible(pcli->hwndContactList))?SW_SHOW/*NOACTIVATE*/:SW_HIDE); SetParent(g_pfwFrames[pos].hWnd,g_pfwFrames[pos].OwnerWindow); SetParent(g_pfwFrames[pos].TitleBar.hwnd,pcli->hwndContactList); @@ -3848,7 +3848,7 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam) recttb.top = recttb.bottom = recttb.left = recttb.right = 0; }; - g_pfwFrames[pos].ContainerWnd = CreateContainerWindow(pcli->hwndContactList,g_pfwFrames[pos].FloatingPos.x,g_pfwFrames[pos].FloatingPos.y,10,10); + g_pfwFrames[pos].ContainerWnd = CreateContainerWindow(pcli->hwndContactList,g_pfwFrames[pos].FloatingPos.x,g_pfwFrames[pos].FloatingPos.y,10, 10); @@ -3905,10 +3905,10 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam) hwndtmp = g_pfwFrames[pos].ContainerWnd; CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); - if (hwndtmp) SendMessage(hwndtmp,WM_SIZE,0,0); + if (hwndtmp) SendMessage(hwndtmp,WM_SIZE, 0, 0); - SetWindowPos(hwndtooltiptmp, HWND_TOPMOST,0, 0, 0, 0,SWP_NOMOVE | SWP_NOSIZE|SWP_NOACTIVATE ); + SetWindowPos(hwndtooltiptmp, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE|SWP_NOACTIVATE ); return 0; } @@ -3918,7 +3918,7 @@ int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam) { /* HOOK */ CLUIFramesLoadMainMenu(); - CLUIFramesCreateMenuForFrame(-1,-1,000010000,Menu_AddContextFrameMenuItem); + CLUIFramesCreateMenuForFrame(-1,-1,000010000, Menu_AddContextFrameMenuItem); return 0; } int CLUIFrameOnModulesUnload(WPARAM wParam,LPARAM lParam) @@ -4017,15 +4017,15 @@ int LoadCLUIFramesModule(void) CreateCluiFramesServices(); - hWndExplorerToolBar = FindWindowEx(0,0,_T("Shell_TrayWnd"),NULL); - OnFrameTitleBarBackgroundChange(0,0); + hWndExplorerToolBar = FindWindowEx(0, 0, _T("Shell_TrayWnd"),NULL); + OnFrameTitleBarBackgroundChange(0, 0); _fCluiFramesModuleNotStarted = FALSE; return 0; } static INT_PTR UnloadMainMenu() { - CLUIFrameOnModulesUnload(0,0); + CLUIFrameOnModulesUnload(0, 0); if (_hmiRoot != (HANDLE)-1) { CallService(MS_CLIST_REMOVEMAINMENUITEM,(WPARAM)_hmiRoot,0); @@ -4106,7 +4106,7 @@ int CLUIFrames_SetLayeredMode( BOOL fLayeredMode, HWND hwnd ) if (g_pfwFrames[i].visible && GetParent(g_pfwFrames[i].hWnd) == pcli->hwndContactList && g_pfwFrames[i].PaintCallbackProc == NULL) { //create owner window - g_pfwFrames[i].OwnerWindow = CreateSubContainerWindow(pcli->hwndContactList,g_pfwFrames[i].FloatingPos.x,g_pfwFrames[i].FloatingPos.y,10,10); + g_pfwFrames[i].OwnerWindow = CreateSubContainerWindow(pcli->hwndContactList,g_pfwFrames[i].FloatingPos.x,g_pfwFrames[i].FloatingPos.y,10, 10); SetParent(g_pfwFrames[i].hWnd,g_pfwFrames[i].OwnerWindow); } } diff --git a/plugins/Clist_modern/src/modern_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp index d0eb6765c6..e3eb5652ca 100644 --- a/plugins/Clist_modern/src/modern_cluiservices.cpp +++ b/plugins/Clist_modern/src/modern_cluiservices.cpp @@ -48,7 +48,7 @@ void cliCluiProtocolStatusChanged(int status,const char * proto) INT_PTR SortList(WPARAM wParam,LPARAM lParam) { pcli->pfnClcBroadcast( WM_TIMER,TIMERID_DELAYEDRESORTCLC,0); - pcli->pfnClcBroadcast( INTM_SCROLLBARCHANGED,0,0); + pcli->pfnClcBroadcast( INTM_SCROLLBARCHANGED, 0, 0); return 0; } @@ -120,22 +120,22 @@ static INT_PTR ListEndRebuild(WPARAM wParam, LPARAM lParam) { int rebuild = 0; //CLC does this automatically, but we need to force it if hideoffline or hideempty has changed - if ((db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEOFFLINE) == 0)) { - if (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) + if (( db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEOFFLINE) == 0)) { + if ( db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEOFFLINE); else SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEOFFLINE); rebuild = 1; } - if ((db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) == 0)) { - if (db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT)) + if (( db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) == 0)) { + if ( db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT)) SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEEMPTYGROUPS); else SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS); rebuild = 1; } - if ((db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS) == 0)) { - if (db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) + if (( db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS) == 0)) { + if ( db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_USEGROUPS); else SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_USEGROUPS); diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 74ee963705..f28495e9f1 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -137,7 +137,7 @@ int CompareContacts2(const ClcContact *contact1,const ClcContact *contact2, int if (by == SORTBY_NAME_LOCALE) { //name static int LocaleId = -1; - if (LocaleId == -1) LocaleId = CallService(MS_LANGPACK_GETLOCALE,0,0); + if (LocaleId == -1) LocaleId = CallService(MS_LANGPACK_GETLOCALE, 0, 0); return (CompareString(LocaleId,NORM_IGNORECASE,SAFETSTRING(namea),-1,SAFETSTRING(nameb),-1))-2; } else if (by == SORTBY_LASTMSG) diff --git a/plugins/Clist_modern/src/modern_docking.cpp b/plugins/Clist_modern/src/modern_docking.cpp index 63a8220bd0..8f4ddbff8c 100644 --- a/plugins/Clist_modern/src/modern_docking.cpp +++ b/plugins/Clist_modern/src/modern_docking.cpp @@ -115,9 +115,9 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) switch(msg->message) { case WM_CREATE: //if (GetSystemMetrics(SM_CMONITORS)>1) return 0; - if (db_get_b(NULL,"CList","Docked",0) && db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT)) + if ( db_get_b(NULL,"CList","Docked",0) && db_get_b(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT)) { - PostMessage(msg->hwnd,WM_CREATEDOCKED,0,0); + PostMessage(msg->hwnd,WM_CREATEDOCKED, 0, 0); } draggingTitle = 0; return 0; @@ -206,11 +206,11 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) dx = (rc->left < rcMonitor.left)?rc->left-rcMonitor.left:0; OffsetRect(rc,-dx,0); Docking_AdjustPosition(msg->hwnd,(LPRECT)&rcMonitor,(LPRECT)msg->lParam); - SendMessage(msg->hwnd,WM_SIZE,0,0); + SendMessage(msg->hwnd,WM_SIZE, 0, 0); g_CluiData.mutexPreventDockMoving = 0; Sync(CLUIFrames_OnMoving,msg->hwnd,(LPRECT)msg->lParam); g_CluiData.mutexPreventDockMoving = 1; - mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); + mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); db_set_b(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked); ModernSkinButton_ReposButtons( msg->hwnd, SBRF_DO_NOT_DRAW, NULL ); return TRUE; @@ -227,7 +227,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) Docking_AdjustPosition(msg->hwnd,&rcMonitor,&rcWindow); *((LRESULT*)lParam) = TRUE; g_CluiData.mutexPreventDockMoving = 0; - SetWindowPos(msg->hwnd,0,rcWindow.left,rcWindow.top,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOSENDCHANGING); + SetWindowPos(msg->hwnd, 0, rcWindow.left,rcWindow.top, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOSENDCHANGING); Sync(CLUIFrames_OnMoving,msg->hwnd,&rcWindow); ModernSkinButton_ReposButtons( msg->hwnd, SBRF_DO_NOT_DRAW, NULL );// -= -= -= g_CluiData.mutexPreventDockMoving = 1; @@ -328,7 +328,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) g_CluiData.fDocked = 0; GetCursorPos(&pt); PostMessage(msg->hwnd,WM_NCLBUTTONDOWN,HTCAPTION,MAKELPARAM(pt.x,pt.y)); - SetWindowPos(msg->hwnd,0,pt.x-rc.right/2,pt.y-GetSystemMetrics(SM_CYFRAME)-GetSystemMetrics(SM_CYSMCAPTION)/2,db_get_dw(NULL,"CList","Width",0),db_get_dw(NULL,"CList","Height",0),SWP_NOZORDER); + SetWindowPos(msg->hwnd, 0, pt.x-rc.right/2,pt.y-GetSystemMetrics(SM_CYFRAME)-GetSystemMetrics(SM_CYSMCAPTION)/2,db_get_dw(NULL,"CList","Width",0),db_get_dw(NULL,"CList","Height",0),SWP_NOZORDER); db_set_b(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked); // ModernSkinButton_ReposButtons(msg->hwnd, SBRF_DO_NOT_DRAW, NULL); } diff --git a/plugins/Clist_modern/src/modern_gdiplus.cpp b/plugins/Clist_modern/src/modern_gdiplus.cpp index b70ebc3bb0..c64c5079b4 100644 --- a/plugins/Clist_modern/src/modern_gdiplus.cpp +++ b/plugins/Clist_modern/src/modern_gdiplus.cpp @@ -74,7 +74,7 @@ HBITMAP GDIPlus_LoadGlyphImage(char *szFileName) HBITMAP hbmp = NULL; if (clone) { - clone->GetHBITMAP(Color(0,0,0),&hbmp); + clone->GetHBITMAP(Color(0, 0, 0),&hbmp); delete clone; } return hbmp; @@ -85,12 +85,12 @@ void TextOutWithGDIp(HDC hDestDC, int x, int y, LPCTSTR lpString, int nCount) // HBITMAP hs; // hs = (HBITMAP)GetCurrentObject(hDestDC,OBJ_BITMAP); // Bitmap sb(hs,NULL); -// Bitmap *b = (sb.Clone(x,y,150,30,PixelFormat32bppARGB)); -// Graphics g(b);//(100,100,PixelFormat32bppPARGB); +// Bitmap *b = (sb.Clone(x,y,150, 30, PixelFormat32bppARGB)); +// Graphics g(b);//(100, 100, PixelFormat32bppPARGB); // //g.DrawImage(sb); // // s.SetCompositingMode(CompositingModeSourceCopy); // // g.SetCompositingMode(CompositingModeSourceCopy); -// g.DrawImage(&sb,0,0,x,y,100,30,UnitPixel); +// g.DrawImage(&sb, 0, 0, x,y,100, 30, UnitPixel); // //s.SetCompositingMode(CompositingModeSourceCopy); // //g.SetCompositingMode(CompositingModeSourceCopy); // // Create a string. @@ -112,7 +112,7 @@ void TextOutWithGDIp(HDC hDestDC, int x, int y, LPCTSTR lpString, int nCount) // //s.SetCompositingMode(CompositingModeSourceCopy); // free(string); // //HDC temp = g.GetHDC(); -// //BitBlt(hDestDC,x,y,100,100,temp,0,0,SRCCOPY); +// //BitBlt(hDestDC,x,y,100, 100, temp, 0, 0, SRCCOPY); // //g.ReleaseHDC(temp); // s.DrawImage(b,origin2); // @@ -276,7 +276,7 @@ void GDIPlus_ExtractAnimatedGIF (TCHAR * szName, int width, int height, HBITMAP graphics.SetInterpolationMode( InterpolationModeHighQualityBicubic ); graphics.SetPixelOffsetMode( PixelOffsetModeHalf ); int * delays = (int*)malloc(nFrameCount*sizeof(int)); - memset(delays,0,nFrameCount*sizeof(int)); + memset(delays, 0, nFrameCount*sizeof(int)); GUID pageGuid = FrameDimensionTime; /* @@ -288,7 +288,7 @@ void GDIPlus_ExtractAnimatedGIF (TCHAR * szName, int width, int height, HBITMAP for (int i=0; i < nFrameCount; i++) { image.SelectActiveFrame( &pageGuid, i ); - graphics.DrawImage( &image, Rect(i*clipWidth, 0,clipWidth,clipHeight ), 0, 0, imWidth, imHeight , UnitPixel, &attr); + graphics.DrawImage( &image, Rect(i*clipWidth, 0, clipWidth,clipHeight ), 0, 0, imWidth, imHeight , UnitPixel, &attr); long lPause = ((long*) pPropertyItem->value)[i] * 10; delays[i] = (int)lPause; } diff --git a/plugins/Clist_modern/src/modern_gettextasync.cpp b/plugins/Clist_modern/src/modern_gettextasync.cpp index ef7631a2b8..f73bb8cee8 100644 --- a/plugins/Clist_modern/src/modern_gettextasync.cpp +++ b/plugins/Clist_modern/src/modern_gettextasync.cpp @@ -89,7 +89,7 @@ static int gtaThreadProc(void * lpParam) do { if ( !MirandaExiting()) - SleepEx(0,TRUE); //1000 contacts per second + SleepEx(0, TRUE); //1000 contacts per second if (MirandaExiting()) { g_dwGetTextAsyncThreadID = 0; @@ -111,7 +111,7 @@ static int gtaThreadProc(void * lpParam) ClcCacheEntry cacheEntry; memset( &cacheEntry, 0, sizeof(cacheEntry)); cacheEntry.hContact = mpChain.hContact; - if ( !Sync(CLUI_SyncGetPDNCE, (WPARAM) 0,(LPARAM)&cacheEntry)) + if ( !Sync(CLUI_SyncGetPDNCE, (WPARAM) 0, (LPARAM)&cacheEntry)) { if ( !MirandaExiting()) Cache_GetSecondLineText(dat, &cacheEntry); @@ -128,7 +128,7 @@ static int gtaThreadProc(void * lpParam) return 0; } KillTimer(dat->hWnd,TIMERID_INVALIDATE_FULL); - CLUI_SafeSetTimer(dat->hWnd,TIMERID_INVALIDATE_FULL,500,NULL); + CLUI_SafeSetTimer(dat->hWnd,TIMERID_INVALIDATE_FULL,500, NULL); } } while (!exit); diff --git a/plugins/Clist_modern/src/modern_groupmenu.cpp b/plugins/Clist_modern/src/modern_groupmenu.cpp index 4b265c382d..df63d36e8f 100644 --- a/plugins/Clist_modern/src/modern_groupmenu.cpp +++ b/plugins/Clist_modern/src/modern_groupmenu.cpp @@ -72,10 +72,10 @@ INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam) //hMenu = wParam; int tick = GetTickCount(); - NotifyEventHooks(g_CluiData.hEventPreBuildGroupMenu,0,0); + NotifyEventHooks(g_CluiData.hEventPreBuildGroupMenu, 0, 0); CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)¶m); - //DrawMenuBar((HWND)CallService("CLUI/GetHwnd",0,0)); + //DrawMenuBar((HWND)CallService("CLUI/GetHwnd", 0, 0)); tick = GetTickCount()-tick; return (INT_PTR)hMenu; } @@ -108,7 +108,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hGroupMenuObject,(LPARAM)&tmi); op.Setting = OPT_MENUITEMSETUNIQNAME; op.Value = (INT_PTR)buf; - CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op); return (INT_PTR)op.Handle; } @@ -130,12 +130,12 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) { } if (hGroupMainMenuItemProxy == (HANDLE)lParam) { mii->fMask |= MIIM_SUBMENU; - mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0); + mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0); } if (hGroupStatusMenuItemProxy == (HANDLE)lParam) { mii->fMask |= MIIM_SUBMENU; - mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); } return TRUE; @@ -188,17 +188,17 @@ INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam) INT_PTR HideOfflineRootHelper(WPARAM wParam,LPARAM lParam) { SendMessage( - (HWND)CallService(MS_CLUI_GETHWNDTREE,0,0), + (HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0), CLM_SETHIDEOFFLINEROOT, - !SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0),CLM_GETHIDEOFFLINEROOT,0,0), + !SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0),CLM_GETHIDEOFFLINEROOT, 0, 0), 0); return 0; } INT_PTR CreateGroupHelper(WPARAM wParam,LPARAM lParam) { - SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0), CLM_SETHIDEEMPTYGROUPS, 0, 0); - SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0), CLM_SETUSEGROUPS, 1, 0); + SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0), CLM_SETHIDEEMPTYGROUPS, 0, 0); + SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0), CLM_SETUSEGROUPS, 1, 0); CallService(MS_CLIST_GROUPCREATE, 0, 0); return 0; }; @@ -208,10 +208,10 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam) if (MirandaExiting()) return 0; CLISTMENUITEM mi = { sizeof(mi) }; - mi.flags = CMIM_FLAGS | (db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0); + mi.flags = CMIM_FLAGS | ( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0); CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersMenuItem, (LPARAM)&mi); - mi.flags = CMIM_FLAGS | (SendMessage(pcli->hwndContactTree,CLM_GETHIDEOFFLINEROOT,0,0)?CMIF_CHECKED:0); + mi.flags = CMIM_FLAGS | (SendMessage(pcli->hwndContactTree,CLM_GETHIDEOFFLINEROOT, 0, 0)?CMIF_CHECKED:0); CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersOutHereMenuItem, (LPARAM)&mi); mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0); @@ -269,23 +269,23 @@ void GroupMenus_Init(void) tmp.CheckService = NULL; tmp.ExecService = "CLISTMENUSGroup/ExecService"; tmp.name = LPGEN("GroupMenu"); - hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp); + hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp); OptParam op; op.Handle = hGroupMenuObject; op.Setting = OPT_USERDEFINEDITEMS; op.Value = TRUE; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); op.Handle = hGroupMenuObject; op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE; op.Value = (INT_PTR)"CLISTMENUSGroup/FreeOwnerDataGroupMenu"; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); op.Handle = hGroupMenuObject; op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE; op.Value = (INT_PTR)"CLISTMENUSGroup/GroupMenuonAddService"; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); //add exit command to menu GroupMenuParam gmp; @@ -296,31 +296,31 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT); mi.pszName = LPGEN("E&xit"); mi.flags = CMIF_ICONFROMICOLIB; - AddGroupMenuItem(0,(LPARAM)&mi); + AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 500; mi.pszService = MS_CLIST_SHOWHIDE; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE); mi.pszName = LPGEN("&Hide/Show"); - hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi); + hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 200000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER); mi.pszService = "FindAdd/FindAddCommand"; mi.pszName = LPGEN("&Find/Add Contacts..."); - AddGroupMenuItem(0,(LPARAM)&mi); + AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 300000; mi.pszService = ""; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004 mi.pszName = LPGEN("&Main Menu"); - hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi); + hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 300100; mi.pszService = ""; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004 mi.pszName = LPGEN("&Status"); - hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi); + hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi); mi.position = 400000; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS); @@ -339,7 +339,7 @@ void GroupMenus_Init(void) mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0); mi.pszService = "CLISTMENUSGroup/CreateGroupHelper"; mi.pszName = LPGEN("&New Group"); - hNewGroupMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi); + hNewGroupMenuItem = (HANDLE)AddGroupMenuItem(0, (LPARAM)&mi); DestroyIcon_protect(mi.hIcon); mi.position = 100001; @@ -435,7 +435,7 @@ INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam) NotifyEventHooks(g_CluiData.hEventPreBuildSubGroupMenu,wParam,0); CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)¶m); - //DrawMenuBar((HWND)CallService("CLUI/GetHwnd",0,0)); + //DrawMenuBar((HWND)CallService("CLUI/GetHwnd", 0, 0)); tick = GetTickCount()-tick; return (INT_PTR)hMenu; } @@ -474,7 +474,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hSubGroupMenuObject,(LPARAM)&tmi); op.Setting = OPT_MENUITEMSETUNIQNAME; op.Value = (INT_PTR)buf; - CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op); return (INT_PTR)op.Handle; } @@ -505,8 +505,7 @@ INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam) { if (wParam != 0) { lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam; - if ( !mir_strcmp(mmep->szServiceName,"Help/AboutCommand")) - { + if ( !mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) { //bug in help.c,it used wparam as parent window handle without reason. mmep->Param1 = 0; CallService(mmep->szServiceName,mmep->Param1,lParam); @@ -537,7 +536,6 @@ INT_PTR GroupMenuExecProxy(WPARAM wParam,LPARAM lParam) void InitSubGroupMenus(void) { - TMenuParam tmp; OptParam op; CreateServiceFunction("CLISTMENUSSubGroup/ExecService",SubGroupMenuExecService); @@ -546,10 +544,6 @@ void InitSubGroupMenus(void) CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuCheckService",SubGroupMenuCheckService); CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy",GroupMenuExecProxy); - //CreateServiceFunction("CLISTMENUSSubGroup/HideSubGroupsHelper",HideSubGroupsHelper); - //CreateServiceFunction("CLISTMENUSSubGroup/UseSubGroupsHelper",UseSubGroupsHelper); - //CreateServiceFunction("CLISTMENUSSubGroup/HideOfflineRootHelper",HideOfflineRootHelper); - CreateServiceFunction("CList/AddSubGroupMenuItem",AddSubGroupMenuItem); CreateServiceFunction(MS_CLIST_REMOVESUBGROUPMENUITEM,RemoveSubGroupMenuItem); CreateServiceFunction(MS_CLIST_MENUBUILDSUBGROUP,BuildSubGroupMenu); @@ -557,32 +551,31 @@ void InitSubGroupMenus(void) HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU,OnBuildSubGroupMenu); //SubGroup menu - memset(&tmp,0,sizeof(tmp)); - tmp.cbSize = sizeof(tmp); + TMenuParam tmp = { sizeof(tmp) }; tmp.CheckService = NULL; tmp.ExecService = "CLISTMENUSSubGroup/ExecService"; tmp.name = LPGEN("SubGroupMenu"); - hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp); + hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp); op.Handle = hSubGroupMenuObject; op.Setting = OPT_USERDEFINEDITEMS; op.Value = TRUE; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); op.Handle = hSubGroupMenuObject; op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE; op.Value = (INT_PTR)"CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu"; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); op.Handle = hSubGroupMenuObject; op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE; op.Value = (INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuonAddService"; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); op.Handle = hSubGroupMenuObject; op.Setting = OPT_MENUOBJECT_SET_CHECK_SERVICE; op.Value = (INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuCheckService"; - CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op); + CallService(MO_SETOPTIONSMENUOBJECT, 0, (LPARAM)&op); //add exit command to menu GroupMenuParam gmp; @@ -612,7 +605,7 @@ void InitSubGroupMenus(void) gmp.wParam = POPUP_GROUPSHOWOFFLINE; hShowOfflineUsersHereMenuItem = (HANDLE)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi); - memset(&mi,0,sizeof(mi)); + memset(&mi, 0, sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = 900001; mi.flags = CMIF_ICONFROMICOLIB; diff --git a/plugins/Clist_modern/src/modern_newrowopts.cpp b/plugins/Clist_modern/src/modern_newrowopts.cpp index b44ea0dbe3..3cbb3fc197 100644 --- a/plugins/Clist_modern/src/modern_newrowopts.cpp +++ b/plugins/Clist_modern/src/modern_newrowopts.cpp @@ -56,11 +56,11 @@ NodeList * AddNode(NodeList * Parent) if ( !Parent) { res = (NodeList *)mir_alloc(sizeof(NodeList)); - memset(res,0,sizeof(NodeList)); + memset(res, 0, sizeof(NodeList)); return res; } Parent->childNodes = (NodeList*) mir_realloc(Parent->childNodes,sizeof(NodeList)*(Parent->AllocatedChilds+1)); - memset(&(Parent->childNodes[Parent->AllocatedChilds]),0,sizeof(NodeList)); + memset(&(Parent->childNodes[Parent->AllocatedChilds]), 0, sizeof(NodeList)); Parent->childNodes[Parent->AllocatedChilds].itemParent = Parent; Parent->AllocatedChilds++; return &(Parent->childNodes[Parent->AllocatedChilds-1]); diff --git a/plugins/Clist_modern/src/modern_popup.cpp b/plugins/Clist_modern/src/modern_popup.cpp index 9da27e5ff9..63b4c0418d 100644 --- a/plugins/Clist_modern/src/modern_popup.cpp +++ b/plugins/Clist_modern/src/modern_popup.cpp @@ -13,25 +13,23 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include "hdr/modern_commonheaders.h" #include "hdr/modern_popup.h" - BOOL EnablePopups = FALSE; static LRESULT CALLBACK DumbPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); - // Show an error popup void ShowErrPopup(const char *title, const char *description) { ShowPopup(title == NULL ? "Modern Contact List Error" : title, description, POPUP_TYPE_ERROR); } - // Show an trace popup void ShowTracePopup(const char *text) { @@ -52,35 +50,27 @@ void ShowTracePopup(const char *text) // Show an popup void ShowPopup(const char *title, const char *description, int type) { - POPUPDATAEX ppd; - int ret; - if ( !ServiceExists(MS_POPUP_ADDPOPUPEX) || !EnablePopups) - { return; - } // Make popup - ZeroMemory(&ppd, sizeof(ppd)); + POPUPDATAEX ppd = { 0 }; ppd.lchContact = 0; ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA); strncpy(ppd.lpzContactName, title == NULL ? "Modern Contact List" : title, SIZEOF(ppd.lpzContactName)-1); ppd.lpzContactName[SIZEOF(ppd.lpzContactName)-1] = '\0'; - if (description != NULL) - { + if (description != NULL) { strncpy(ppd.lpzText, description, SIZEOF(ppd.lpzText)-1); ppd.lpzText[SIZEOF(ppd.lpzText)-1] = '\0'; } - if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST) - { + if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST) { ppd.colorBack = 0; ppd.colorText = 0; } - else // if (type == POPUP_TYPE_ERROR) - { + else { ppd.colorBack = -1; ppd.colorText = RGB(255,255,255); } @@ -88,44 +78,29 @@ void ShowPopup(const char *title, const char *description, int type) ppd.PluginWindowProc = DumbPopupDlgProc; if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST) - { ppd.iSeconds = 0; - } - else // if (type == POPUP_TYPE_ERROR) - { + else ppd.iSeconds = 0; - } // Now that every field has been filled, we want to see the popup. - ret = CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd,0); - - ret++; + CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0); } - - // Handle to popup events static LRESULT CALLBACK DumbPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch(message) { - case WM_COMMAND: - { - PUDeletePopUp(hWnd); - return TRUE; - } - - case WM_CONTEXTMENU: - { - PUDeletePopUp(hWnd); - return TRUE; - } - - case UM_FREEPLUGINDATA: - { - return TRUE; - } + case WM_COMMAND: + PUDeletePopUp(hWnd); + return TRUE; + + case WM_CONTEXTMENU: + PUDeletePopUp(hWnd); + return TRUE; + + case UM_FREEPLUGINDATA: + return TRUE; } return DefWindowProc(hWnd, message, wParam, lParam); } - diff --git a/plugins/Clist_modern/src/modern_row.cpp b/plugins/Clist_modern/src/modern_row.cpp index f6bf9e272a..093bfb6d68 100644 --- a/plugins/Clist_modern/src/modern_row.cpp +++ b/plugins/Clist_modern/src/modern_row.cpp @@ -70,7 +70,7 @@ ROWCELL *cppInitModernRow(ROWCELL ** tabAccess) int i=0; if ( !db_get_b(NULL,"ModernData","UseAdvancedRowLayout",SETTING_ROW_ADVANCEDLAYOUT_DEFAULT)) return NULL; tmplbuf = NULL; - if (db_get_b(NULL,"ModernData","UseAdvancedRowLayout",SETTING_ROW_ADVANCEDLAYOUT_DEFAULT) == 1) + if ( db_get_b(NULL,"ModernData","UseAdvancedRowLayout",SETTING_ROW_ADVANCEDLAYOUT_DEFAULT) == 1) tmplbuf = db_get_sa(NULL,"ModernData","RowTemplate"); if (tmplbuf) { rowParse(RowRoot, RowRoot, tmplbuf, i, seq,tabAccess); @@ -361,7 +361,7 @@ void rowResetEmptyRects(ROWCELL* cell) if ( !cell) return; if (cell->type == 0) { - SetRect(&(cell->r),0,0,0,0); + SetRect(&(cell->r), 0, 0, 0, 0); cell->full_width = 0; cell->fixed_width = 0; } @@ -378,7 +378,7 @@ void rowResetEmptyRects(ROWCELL* cell) void rowCalculateMinSize(ROWCELL* cell) { ROWCELL* curchild = NULL; - int w = 0,h = 0; + int w = 0, h = 0; int wl = 0, hl = 0; int fullWidth = 0; if ( !cell) return; diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index 427467bdbc..8f684c53a9 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -119,7 +119,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i if (gl_RowTabAccess[i]->type != TC_SPACE) { gl_RowTabAccess[i]->h = 0; gl_RowTabAccess[i]->w = 0; - SetRect(&(gl_RowTabAccess[i]->r),0,0,0,0); + SetRect(&(gl_RowTabAccess[i]->r), 0, 0, 0, 0); switch (gl_RowTabAccess[i]->type) { case TC_TEXT1: { @@ -131,10 +131,10 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i { //calculate text width here SIZE size = {0}; - RECT dummyRect = {0,0,1024,tmp}; + RECT dummyRect = {0, 0, 1024,tmp}; HDC hdc = CreateCompatibleDC(NULL); g_clcPainter.ChangeToFont(hdc,dat,g_clcPainter.GetBasicFontID(contact),NULL); - g_clcPainter.GetTextSize(&size,hdc,dummyRect,contact->szText,contact->ssText.plText,0, dat->text_resize_smileys ? 0 : contact->ssText.iMaxSmileyHeight); + g_clcPainter.GetTextSize(&size,hdc,dummyRect,contact->szText,contact->ssText.plText, 0, dat->text_resize_smileys ? 0 : contact->ssText.iMaxSmileyHeight); if (contact->type == CLCIT_GROUP) { char * szCounts = pcli->pfnGetGroupCountsText(dat, contact); @@ -175,10 +175,10 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i //calculate text width here SIZE size = {0}; - RECT dummyRect = {0,0,1024,tmp}; + RECT dummyRect = {0, 0, 1024,tmp}; HDC hdc = CreateCompatibleDC(NULL); g_clcPainter.ChangeToFont(hdc,dat,FONTID_SECONDLINE,NULL); - g_clcPainter.GetTextSize(&size,hdc,dummyRect,pdnce->szSecondLineText,pdnce->ssSecondLine.plText,0, dat->text_resize_smileys ? 0 : pdnce->ssSecondLine.iMaxSmileyHeight); + g_clcPainter.GetTextSize(&size,hdc,dummyRect,pdnce->szSecondLineText,pdnce->ssSecondLine.plText, 0, dat->text_resize_smileys ? 0 : pdnce->ssSecondLine.iMaxSmileyHeight); gl_RowTabAccess[i]->w = size.cx; SelectObject(hdc,GetStockObject(DEFAULT_GUI_FONT)); ske_ResetTextEffect(hdc); @@ -200,10 +200,10 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i if (item == -1) { //calculate text width here SIZE size = {0}; - RECT dummyRect = {0,0,1024,tmp}; + RECT dummyRect = {0, 0, 1024,tmp}; HDC hdc = CreateCompatibleDC(NULL); g_clcPainter.ChangeToFont(hdc,dat,FONTID_THIRDLINE,NULL); - g_clcPainter.GetTextSize(&size,hdc,dummyRect,pdnce->szThirdLineText,pdnce->ssThirdLine.plText,0, dat->text_resize_smileys ? 0 : pdnce->ssThirdLine.iMaxSmileyHeight); + g_clcPainter.GetTextSize(&size,hdc,dummyRect,pdnce->szThirdLineText,pdnce->ssThirdLine.plText, 0, dat->text_resize_smileys ? 0 : pdnce->ssThirdLine.iMaxSmileyHeight); gl_RowTabAccess[i]->w = size.cx; SelectObject(hdc,GetStockObject(DEFAULT_GUI_FONT)); ske_ResetTextEffect(hdc); @@ -375,7 +375,7 @@ BOOL RowHeights_Alloc(ClcData *dat, int size) } dat->row_heights = tmp; - memset(dat->row_heights+(dat->row_heights_allocated),0,sizeof(int) * (size_grow-dat->row_heights_allocated)); + memset(dat->row_heights+(dat->row_heights_allocated), 0, sizeof(int) * (size_grow-dat->row_heights_allocated)); } else { dat->row_heights = (int *) malloc(sizeof(int) * size_grow); @@ -384,7 +384,7 @@ BOOL RowHeights_Alloc(ClcData *dat, int size) RowHeights_Free(dat); return FALSE; } - memset(dat->row_heights,0,sizeof(int) * size_grow); + memset(dat->row_heights, 0, sizeof(int) * size_grow); } dat->row_heights_allocated = size_grow; } diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index 3e11a9c127..de3a761d7d 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -39,7 +39,7 @@ TCHAR *types[] = { _T("extra9"), _T("time"), _T("space"), _T("fspace") }; -RECT da = {205,58,440,130}; // Draw area +RECT da = {205,58,440, 130}; // Draw area void rowOptBuildTA(pROWCELL cell, pROWCELL* TA, int* i) { @@ -70,8 +70,8 @@ void rowOptShowSettings(HWND hwnd) EnableWindow(GetDlgItem(hwnd,IDC_CONTHEIGHT),0); EnableWindow(GetDlgItem(hwnd,IDC_SPINCONTWIDTH) ,0); EnableWindow(GetDlgItem(hwnd,IDC_SPINCONTHEIGHT),0); - SendDlgItemMessage(hwnd,IDC_SPINCONTWIDTH, UDM_SETPOS,0,0); - SendDlgItemMessage(hwnd,IDC_SPINCONTHEIGHT,UDM_SETPOS,0,0); + SendDlgItemMessage(hwnd,IDC_SPINCONTWIDTH, UDM_SETPOS, 0, 0); + SendDlgItemMessage(hwnd,IDC_SPINCONTHEIGHT,UDM_SETPOS, 0, 0); EnableWindow(GetDlgItem(hwnd,IDC_CONTLAYER),0); return; } @@ -86,16 +86,16 @@ void rowOptShowSettings(HWND hwnd) EnableWindow(GetDlgItem(hwnd,IDC_CONTHEIGHT),0); EnableWindow(GetDlgItem(hwnd,IDC_SPINCONTWIDTH) ,0); EnableWindow(GetDlgItem(hwnd,IDC_SPINCONTHEIGHT),0); - SendDlgItemMessage(hwnd,IDC_SPINCONTWIDTH, UDM_SETPOS,0,0); - SendDlgItemMessage(hwnd,IDC_SPINCONTHEIGHT,UDM_SETPOS,0,0); + SendDlgItemMessage(hwnd,IDC_SPINCONTWIDTH, UDM_SETPOS, 0, 0); + SendDlgItemMessage(hwnd,IDC_SPINCONTHEIGHT,UDM_SETPOS, 0, 0); } else { EnableWindow(GetDlgItem(hwnd,IDC_CONTWIDTH) ,1); EnableWindow(GetDlgItem(hwnd,IDC_CONTHEIGHT),1); EnableWindow(GetDlgItem(hwnd,IDC_SPINCONTWIDTH) ,1); EnableWindow(GetDlgItem(hwnd,IDC_SPINCONTHEIGHT),1); - SendDlgItemMessage(hwnd,IDC_SPINCONTWIDTH, UDM_SETPOS,0,MAKELONG(cell->w,0)); - SendDlgItemMessage(hwnd,IDC_SPINCONTHEIGHT,UDM_SETPOS,0,MAKELONG(cell->h,0)); + SendDlgItemMessage(hwnd,IDC_SPINCONTWIDTH, UDM_SETPOS, 0, MAKELONG(cell->w,0)); + SendDlgItemMessage(hwnd,IDC_SPINCONTHEIGHT,UDM_SETPOS, 0, MAKELONG(cell->h,0)); } SendDlgItemMessage(hwnd, IDC_CONTTYPE, CB_SETCURSEL, cell->type, 0); @@ -355,30 +355,30 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if ( !rowOptTmplStr) rowOptTmplStr = mir_strdup(""); - SendDlgItemMessage(hwndDlg,IDC_SPINCONTWIDTH, UDM_SETRANGE,0,MAKELONG(999,0)); - SendDlgItemMessage(hwndDlg,IDC_SPINCONTHEIGHT,UDM_SETRANGE,0,MAKELONG(999,0)); + SendDlgItemMessage(hwndDlg,IDC_SPINCONTWIDTH, UDM_SETRANGE, 0, MAKELONG(999,0)); + SendDlgItemMessage(hwndDlg,IDC_SPINCONTHEIGHT,UDM_SETRANGE, 0, MAKELONG(999,0)); int i, item; for (i=0; i < SIZEOF(types); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_CONTTYPE,CB_ADDSTRING,0,(LPARAM)TranslateTS(types[i])); + item = SendDlgItemMessage(hwndDlg,IDC_CONTTYPE,CB_ADDSTRING, 0, (LPARAM)TranslateTS(types[i])); SendDlgItemMessage(hwndDlg,IDC_CONTTYPE,CB_SETITEMDATA,item,0); } - SendDlgItemMessage(hwndDlg,IDC_CONTTYPE,CB_SETCURSEL,0,0); + SendDlgItemMessage(hwndDlg,IDC_CONTTYPE,CB_SETCURSEL, 0, 0); TCHAR *h_alignment[] = {_T("left"), _T("hCenter"), _T("right")}; for (i=0; i < SIZEOF(h_alignment); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_HALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(h_alignment[i])); + item = SendDlgItemMessage(hwndDlg,IDC_HALIGN,CB_ADDSTRING, 0, (LPARAM)TranslateTS(h_alignment[i])); SendDlgItemMessage(hwndDlg,IDC_HALIGN,CB_SETITEMDATA,item,0); } - SendDlgItemMessage(hwndDlg,IDC_HALIGN,CB_SETCURSEL,0,0); + SendDlgItemMessage(hwndDlg,IDC_HALIGN,CB_SETCURSEL, 0, 0); TCHAR *v_alignment[] = {_T("top"), _T("vCenter"), _T("bottom")}; for (i=0; i < SIZEOF(v_alignment); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_VALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(v_alignment[i])); + item = SendDlgItemMessage(hwndDlg,IDC_VALIGN,CB_ADDSTRING, 0, (LPARAM)TranslateTS(v_alignment[i])); SendDlgItemMessage(hwndDlg,IDC_VALIGN,CB_SETITEMDATA,item,0); } - SendDlgItemMessage(hwndDlg,IDC_VALIGN,CB_SETCURSEL,0,0); + SendDlgItemMessage(hwndDlg,IDC_VALIGN,CB_SETCURSEL, 0, 0); rowDeleteTree(rowOptTmplRoot); rowOptTmplRoot = NULL; diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index dd456c8940..91a1ee3466 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -191,7 +191,7 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc) { RECT r = {0}; GetClientRect(bct->hwnd,&r); - BitBlt(whdc,0,0,r.right,r.bottom,hdc,0,0,SRCCOPY); + BitBlt(whdc, 0, 0, r.right,r.bottom,hdc, 0, 0, SRCCOPY); } SelectObject(hdc,oldbmp); DeleteObject(bmp); @@ -467,7 +467,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM SetCapture(bct->hwnd); bct->hover = 1; //KillTimer(bct->hwnd,1234); - //CLUI_SafeSetTimer(bct->hwnd,1234,100,NULL); + //CLUI_SafeSetTimer(bct->hwnd,1234,100, NULL); ModernSkinButtonPaintWorker(bct->hwnd,0); return 0; } @@ -487,7 +487,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM case WM_LBUTTONDOWN: { //KillTimer(bct->hwnd,1234); - //CLUI_SafeSetTimer(bct->hwnd,1234,100,NULL); + //CLUI_SafeSetTimer(bct->hwnd,1234,100, NULL); bct->down = 1; SetForegroundWindow(GetParent(bct->hwnd)); ModernSkinButtonPaintWorker(bct->hwnd,0); @@ -512,7 +512,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM if (bct->down) { //KillTimer(bct->hwnd,1234); - //CLUI_SafeSetTimer(bct->hwnd,1234,100,NULL); + //CLUI_SafeSetTimer(bct->hwnd,1234,100, NULL); ReleaseCapture(); bct->hover = 0; bct->down = 0; @@ -547,7 +547,7 @@ HWND SetToolTip(HWND hwnd, TCHAR * tip) hwnd, NULL, GetModuleHandle(NULL), NULL); - SetWindowPos(hwndToolTips, HWND_TOPMOST,0, 0, 0, 0, + SetWindowPos(hwndToolTips, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); } @@ -562,7 +562,7 @@ HWND SetToolTip(HWND hwnd, TCHAR * tip) ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS; ti.uId = (UINT_PTR)hwnd; ti.lpszText = (TCHAR*)tip; - SendMessage(hwndToolTips,TTM_ADDTOOL,0,(LPARAM)&ti); + SendMessage(hwndToolTips,TTM_ADDTOOL, 0, (LPARAM)&ti); LeaveCriticalSection(&csTips); return hwndToolTips; @@ -628,7 +628,7 @@ int ModernSkinButton_AddButton(HWND parent, ( sbFlags & SBF_ALIGN_BR_VCENTER ) ? ( _center_v( &rc ) + Bottom ) : ( rc.top + Bottom ); bct = (ModernSkinButtonCtrl *)mir_alloc(sizeof(ModernSkinButtonCtrl)); - memset(bct,0,sizeof(ModernSkinButtonCtrl)); + memset(bct, 0, sizeof(ModernSkinButtonCtrl)); bct->Left = l; bct->Right = r; bct->Top = t; diff --git a/plugins/Clist_modern/src/modern_skineditor.cpp b/plugins/Clist_modern/src/modern_skineditor.cpp index 0b1f0fe7f9..6fb70ab4d0 100644 --- a/plugins/Clist_modern/src/modern_skineditor.cpp +++ b/plugins/Clist_modern/src/modern_skineditor.cpp @@ -163,7 +163,7 @@ int FillObjectTree(HWND hwndDlg, int ObjectTreeID, char * wildmask) dbces.pfnEnumProc = enumDB_SkinObjectsForEditorProc; dbces.szModule = SKIN; dbces.ofsSettings = 0; - CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces); + CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces); return 0; } TCHAR *TYPES[] = {_T("- Empty - (do not draw this object)"),_T("Solid fill object"),_T("Image (draw image)"),_T("Fragment (draw portion of image)")}; @@ -256,9 +256,9 @@ void SetControls(HWND hwndDlg, char * str) g = atoi(GetParamN(str,buf,SIZEOF(buf),3,',',TRUE)); b = atoi(GetParamN(str,buf,SIZEOF(buf),4,',',TRUE)); a = atoi(GetParamN(str,buf,SIZEOF(buf),5,',',TRUE)); - SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETCOLOUR,0,(LPARAM)RGB(r,g,b)); - SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETDEFAULTCOLOUR,0,(LPARAM)RGB(r,g,b)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS,0,MAKELONG(a,0)); + SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETCOLOUR, 0, (LPARAM)RGB(r,g,b)); + SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETDEFAULTCOLOUR, 0, (LPARAM)RGB(r,g,b)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS, 0, MAKELONG(a,0)); } break; case 2: @@ -275,14 +275,14 @@ void SetControls(HWND hwndDlg, char * str) b = atoi(GetParamN(str,buf,SIZEOF(buf),7,',',TRUE)); a = atoi(GetParamN(str,buf,SIZEOF(buf),8,',',TRUE)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS,0,MAKELONG(a,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETPOS,0,MAKELONG(l,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETPOS,0,MAKELONG(t,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_SETPOS,0,MAKELONG(r,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_SETPOS,0,MAKELONG(b,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS, 0, MAKELONG(a,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETPOS, 0, MAKELONG(l,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETPOS, 0, MAKELONG(t,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_SETPOS, 0, MAKELONG(r,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_SETPOS, 0, MAKELONG(b,0)); GetParamN(str,buf,SIZEOF(buf),2,',',TRUE); - SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT,0,(LPARAM)buf); + SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT, 0, (LPARAM)buf); GetParamN(str,buf,SIZEOF(buf),3,',',TRUE); if (mir_bool_strcmpi(buf,"TileBoth")) fitmode = FM_TILE_BOTH; @@ -310,23 +310,23 @@ void SetControls(HWND hwndDlg, char * str) l = atoi(GetParamN(str,buf,SIZEOF(buf),8,',',TRUE)); t = atoi(GetParamN(str,buf,SIZEOF(buf),9,',',TRUE)); - r = atoi(GetParamN(str,buf,SIZEOF(buf),10,',',TRUE)); + r = atoi(GetParamN(str,buf,SIZEOF(buf),10, ',',TRUE)); b = atoi(GetParamN(str,buf,SIZEOF(buf),11,',',TRUE)); a = atoi(GetParamN(str,buf,SIZEOF(buf),12,',',TRUE)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS,0,MAKELONG(a,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETPOS,0,MAKELONG(l,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETPOS,0,MAKELONG(t,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_SETPOS,0,MAKELONG(r,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_SETPOS,0,MAKELONG(b,0)); - - SendDlgItemMessage(hwndDlg,IDC_SPIN_POSLEFT,UDM_SETPOS,0,MAKELONG(x,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_SETPOS,0,MAKELONG(y,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_SETPOS,0,MAKELONG(w,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_SETPOS,0,MAKELONG(h,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS, 0, MAKELONG(a,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETPOS, 0, MAKELONG(l,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETPOS, 0, MAKELONG(t,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_SETPOS, 0, MAKELONG(r,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_SETPOS, 0, MAKELONG(b,0)); + + SendDlgItemMessage(hwndDlg,IDC_SPIN_POSLEFT,UDM_SETPOS, 0, MAKELONG(x,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_SETPOS, 0, MAKELONG(y,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_SETPOS, 0, MAKELONG(w,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_SETPOS, 0, MAKELONG(h,0)); GetParamN(str,buf,SIZEOF(buf),2,',',TRUE); - SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT,0,(LPARAM)buf); + SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT, 0, (LPARAM)buf); GetParamN(str,buf,SIZEOF(buf),7,',',TRUE); if (mir_bool_strcmpi(buf,"TileBoth")) fitmode = FM_TILE_BOTH; @@ -348,7 +348,7 @@ int GetShortFileName(char * FullFile) char * f = strrchr(FullFile,'\\'); char * file = f?mir_strdup(f+1):0; if ( !file) return 0; - ske_GetFullFilename(buf,file,0,TRUE); + ske_GetFullFilename(buf,file, 0, TRUE); if (mir_bool_strcmpi(buf,FullFile)) { _snprintf(FullFile,MAX_PATH,"%s",file); @@ -369,7 +369,7 @@ int GetShortFileName(char * FullFile) char * MadeString(HWND hwndDlg) { char buf[MAX_PATH*2] = {0}; - int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,0,0); + int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL, 0, 0); switch (i) { case 0: @@ -379,8 +379,8 @@ char * MadeString(HWND hwndDlg) { BYTE a; DWORD col; - a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS,0,0); - col = (DWORD)SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_GETCOLOUR,0,0); + a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS, 0, 0); + col = (DWORD)SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_GETCOLOUR, 0, 0); mir_snprintf(buf,SIZEOF(buf),"Glyph,Solid,%d,%d,%d,%d",GetRValue(col),GetGValue(col),GetBValue(col),a); } break; @@ -390,13 +390,13 @@ char * MadeString(HWND hwndDlg) WORD l,t,b,r; char buf_name[MAX_PATH] = {0}; int i=0; - a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS,0,0); - l = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_GETPOS,0,0); - t = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_GETPOS,0,0); - r = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_GETPOS,0,0); - b = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_GETPOS,0,0); + a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS, 0, 0); + l = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_GETPOS, 0, 0); + t = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_GETPOS, 0, 0); + r = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_GETPOS, 0, 0); + b = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_GETPOS, 0, 0); SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_GETTEXT,(WPARAM)MAX_PATH,(LPARAM)buf_name); - i = SendDlgItemMessage(hwndDlg,IDC_FIT,CB_GETCURSEL,0,0); + i = SendDlgItemMessage(hwndDlg,IDC_FIT,CB_GETCURSEL, 0, 0); mir_snprintf(buf,SIZEOF(buf),"Glyph,Image,%s,%s,%d,%d,%d,%d,%d",buf_name, //fitmode (i == FM_TILE_BOTH)?"TileBoth": @@ -412,20 +412,20 @@ char * MadeString(HWND hwndDlg) WORD x,y,w,h; char buf_name[MAX_PATH] = {0}; int i=0; - a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS,0,0); - l = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_GETPOS,0,0); - t = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_GETPOS,0,0); - r = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_GETPOS,0,0); - b = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_GETPOS,0,0); + a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS, 0, 0); + l = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_GETPOS, 0, 0); + t = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_GETPOS, 0, 0); + r = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_GETPOS, 0, 0); + b = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_GETPOS, 0, 0); - x = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_POSLEFT,UDM_GETPOS,0,0); - y = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_GETPOS,0,0); + x = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_POSLEFT,UDM_GETPOS, 0, 0); + y = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_GETPOS, 0, 0); - w = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_GETPOS,0,0); - h = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_GETPOS,0,0); + w = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_GETPOS, 0, 0); + h = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_GETPOS, 0, 0); SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_GETTEXT,(WPARAM)MAX_PATH,(LPARAM)buf_name); - i = SendDlgItemMessage(hwndDlg,IDC_FIT,CB_GETCURSEL,0,0); + i = SendDlgItemMessage(hwndDlg,IDC_FIT,CB_GETCURSEL, 0, 0); mir_snprintf(buf,SIZEOF(buf),"Glyph,Fragment,%s,%d,%d,%d,%d,%s,%d,%d,%d,%d,%d",buf_name,x,y,w,h, //fitmode (i == FM_TILE_BOTH)?"TileBoth": @@ -443,10 +443,10 @@ void UpdateInfo(HWND hwndDlg) char *b = MadeString(hwndDlg); if ( !b) { - SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT,0,(LPARAM)""); + SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT, 0, (LPARAM)""); return; } - SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT,0,(LPARAM)b); + SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT, 0, (LPARAM)b); { OPT_OBJECT_DATA *sd = NULL; HTREEITEM hti = TreeView_GetSelection(GetDlgItem(hwndDlg,IDC_OBJECT_TREE)); @@ -510,7 +510,7 @@ int GetFileSizes(HWND hwndDlg) char buf[MAX_PATH]; SIZE sz = {0}; SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_GETTEXT,(WPARAM)MAX_PATH,(LPARAM)buf); - ske_GetFullFilename(buf,buf,0,TRUE); + ske_GetFullFilename(buf,buf, 0, TRUE); { HBITMAP hbmp = ske_LoadGlyphImage(buf); if (hbmp) @@ -523,7 +523,7 @@ int GetFileSizes(HWND hwndDlg) } } _snprintf(buf, MAX_PATH, "%s %d x %d %s",Translate("Image size is"),sz.cx, sz.cy, Translate("pixels")); - SendDlgItemMessageA(hwndDlg,IDC_S_SIZE,WM_SETTEXT,0,(LPARAM)buf); + SendDlgItemMessageA(hwndDlg,IDC_S_SIZE,WM_SETTEXT, 0, (LPARAM)buf); return 0; } @@ -552,27 +552,27 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM { //Fill types combo int i=0; for (i=0; i < SIZEOF(TYPES); i++) - SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_ADDSTRING,0,(LPARAM)TranslateTS(TYPES[i])); + SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_ADDSTRING, 0, (LPARAM)TranslateTS(TYPES[i])); } { //Fill fit combo int i=0; for (i=0; i < SIZEOF(FITMODES); i++) - SendDlgItemMessage(hwndDlg,IDC_FIT,CB_ADDSTRING,0,(LPARAM)TranslateTS(FITMODES[i])); + SendDlgItemMessage(hwndDlg,IDC_FIT,CB_ADDSTRING, 0, (LPARAM)TranslateTS(FITMODES[i])); } //SPIN Ranges { - SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETRANGE,0,MAKELONG(255,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS,0,MAKELONG(255,0)); - - SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETRANGE,0,MAKELONG(900,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETRANGE,0,MAKELONG(900,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_SETRANGE,0,MAKELONG(900,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_SETRANGE,0,MAKELONG(900,0)); - - SendDlgItemMessage(hwndDlg,IDC_SPIN_POSLEFT,UDM_SETRANGE,0,MAKELONG(1000,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_SETRANGE,0,MAKELONG(1000,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_SETRANGE,0,MAKELONG(1000,0)); - SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_SETRANGE,0,MAKELONG(1000,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETRANGE, 0, MAKELONG(255,0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS, 0, MAKELONG(255,0)); + + SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_SETRANGE, 0, MAKELONG(900, 0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_SETRANGE, 0, MAKELONG(900, 0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_BOTTOM,UDM_SETRANGE, 0, MAKELONG(900, 0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_RIGHT,UDM_SETRANGE, 0, MAKELONG(900, 0)); + + SendDlgItemMessage(hwndDlg,IDC_SPIN_POSLEFT,UDM_SETRANGE, 0, MAKELONG(1000, 0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_POSTOP,UDM_SETRANGE, 0, MAKELONG(1000, 0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_WIDTH,UDM_SETRANGE, 0, MAKELONG(1000, 0)); + SendDlgItemMessage(hwndDlg,IDC_SPIN_HEIGHT,UDM_SETRANGE, 0, MAKELONG(1000, 0)); } EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_GROUP_1),FALSE); EnableGroup(hwndDlg,GetDlgItem(hwndDlg,IDC_ST_COLOUR),FALSE); @@ -591,7 +591,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM { if (HIWORD(wParam) == CBN_SELCHANGE) { - int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,0,0); + int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL, 0, 0); //if (IsWindowEnabled(GetDlgItem(hwndDlg,IDC_TYPE))) SetAppropriateGroups(hwndDlg,i); if (GetFocus() == GetDlgItem(hwndDlg,IDC_TYPE)) @@ -661,7 +661,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM } else { - ske_GetFullFilename(str,str,(char*)0,TRUE); + ske_GetFullFilename(str,str,(char*)0, TRUE); } ofn.lpstrFile = str; @@ -671,7 +671,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM res = GetOpenFileNameA(&ofn); if (res) { GetShortFileName(ofn.lpstrFile); - SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT,0,(LPARAM)ofn.lpstrFile); + SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT, 0, (LPARAM)ofn.lpstrFile); SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); UpdateInfo(hwndDlg); } @@ -746,14 +746,14 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM char buf[255]; mir_snprintf(buf,SIZEOF(buf),"%s = %s",data->szName, data->szValue); - SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT,0,(LPARAM)buf); + SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT, 0, (LPARAM)buf); SetControls(hwndDlg,data->szValue); EnableWindow(GetDlgItem(hwndDlg,IDC_COPY),TRUE); EnableWindow(GetDlgItem(hwndDlg,IDC_PASTE),object_clipboard != NULL); } else { - SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT,0,(LPARAM)""); + SendDlgItemMessageA(hwndDlg,IDC_EDIT1,WM_SETTEXT, 0, (LPARAM)""); SetControls(hwndDlg,NULL); EnableWindow(GetDlgItem(hwndDlg,IDC_COPY),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_PASTE),FALSE); @@ -782,8 +782,8 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM StoreTreeToDB(GetDlgItem(hwndDlg,IDC_OBJECT_TREE),SKIN); //ReloadSkin ske_LoadSkinFromDB(); - pcli->pfnClcBroadcast( INTM_RELOADOPTIONS,0,0); - Sync(CLUIFrames_OnClistResize_mod,0,0); + pcli->pfnClcBroadcast( INTM_RELOADOPTIONS, 0, 0); + Sync(CLUIFrames_OnClistResize_mod, 0, 0); ske_RedrawCompleteWindow(); Sync(CLUIFrames_OnClistResize_mod, 0, 0); { diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 8972752fe5..475760652f 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -114,7 +114,7 @@ static pfnImgDeleteDIBSection ImgDeleteDIBSection; typedef DWORD (__stdcall *pfnImgGetHandle)(LPVOID /*in*/pImg, HBITMAP /*out*/*pBitmap, LPVOID /*out*/*ppDIBBits); static pfnImgGetHandle ImgGetHandle; -static MODERNEFFECT meCurrentEffect = {-1,{0},0,0}; +static MODERNEFFECT meCurrentEffect = {-1,{0}, 0, 0}; ////////////////////////////////////////////////////////////////////////// @@ -499,14 +499,14 @@ HRESULT SkinEngineLoadModule() //create event handle hSkinLoadedEvent = HookEvent(ME_SKIN_SERVICESCREATED,CLUI_OnSkinLoad); - NotifyEventHooks(g_CluiData.hEventSkinServicesCreated,0,0); + NotifyEventHooks(g_CluiData.hEventSkinServicesCreated, 0, 0); return S_OK; } int SkinEngineUnloadModule() { //unload services - ModernSkinButtonUnloadModule(0,0); + ModernSkinButtonUnloadModule(0, 0); ske_UnloadSkin(&g_SkinObjectList); mir_free_and_nil(g_SkinObjectList.pObjects); @@ -592,7 +592,7 @@ CRITICAL_SECTION BufferListCS = {0}; SortedList * BufferList = NULL; enum { - BUFFER_DRAWICON = 0, + BUFFER_DRAWICON = 0, BUFFER_DRAWIMAGE }; @@ -611,7 +611,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle DCBUFFER * pBuf; if (BufferList == NULL) { - BufferList = List_Create(0,2); + BufferList = List_Create(0, 2); BufferList->sortFunc = SortBufferList; InitializeCriticalSection(&BufferListCS); } @@ -646,7 +646,7 @@ HDC ske_RequestBufferDC(HDC hdcOwner, int dcID, int width, int height, BOOL fCle pBuf->hBitmap = ske_CreateDIB32Point(width,height,&(pBuf->pImage)); pBuf->oldBitmap = (HBITMAP)SelectObject(pBuf->hDC,pBuf->hBitmap); } else if (fClear) - memset(pBuf->pImage,0,width*height*sizeof(DWORD)); + memset(pBuf->pImage, 0, width*height*sizeof(DWORD)); } pBuf->dwDestroyAfterTime = 0; LeaveCriticalSection(&BufferListCS); @@ -695,7 +695,7 @@ BOOL ske_SetRgnOpaque(HDC memdc,HRGN hrgn, BOOL force) DWORD d; RECT *rect; if (g_CluiData.fDisableSkinEngine && !force) return TRUE; - rgnsz = GetRegionData(hrgn,0,NULL); + rgnsz = GetRegionData(hrgn, 0, NULL); rdata = (RGNDATA *) mir_alloc(rgnsz); GetRegionData(hrgn,rgnsz,rdata); rect = (RECT *)rdata->Buffer; @@ -790,7 +790,7 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r { ske_AlphaBlend(mem2dc,rFill->left-wr.left,rFill->top-wr.top,rFill->right-rFill->left,rFill->bottom-rFill->top, hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,rGlyph->bottom-rGlyph->top,bf); - ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc,0,0,wr.right-wr.left, wr.bottom -wr.top,bf); + ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc, 0, 0, wr.right-wr.left, wr.bottom -wr.top,bf); } else { @@ -804,7 +804,7 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r // BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 }; ske_AlphaBlend(mem2dc,rFill->left-wr.left,rFill->top-wr.top,rFill->right-rFill->left,rFill->bottom-rFill->top, hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,rGlyph->bottom-rGlyph->top,bf); - ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc,0,0,wr.right-wr.left, wr.bottom -wr.top,bf); + ske_AlphaBlend(hDest,wr.left,wr.top,wr.right-wr.left, wr.bottom -wr.top,mem2dc, 0, 0, wr.right-wr.left, wr.bottom -wr.top,bf); } if (drawMode != 2) { @@ -838,8 +838,8 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r w = wr.right-wr.left; { // BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 }; - ske_AlphaBlend(mem2dc,-(wr.left-rFill->left),0,rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,bf); - //StretchBlt(mem2dc,-(wr.left-rFill->left),0,rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,SRCCOPY); + ske_AlphaBlend(mem2dc,-(wr.left-rFill->left), 0, rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,bf); + //StretchBlt(mem2dc,-(wr.left-rFill->left), 0, rFill->right-rFill->left,h,hSource,rGlyph->left,rGlyph->top,rGlyph->right-rGlyph->left,h,SRCCOPY); } if (drawMode == 0 || drawMode == 2) { @@ -853,16 +853,16 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int ht; y = wr.top; ht = (y+h-dy <= wr.bottom)?(h-dy):(wr.bottom-wr.top); - BitBlt(hDest,wr.left,y,w,ht,mem2dc,0,dy,SRCCOPY); + BitBlt(hDest,wr.left,y,w,ht,mem2dc, 0, dy,SRCCOPY); } y = wr.top+h-dy; while (y < wr.bottom-h){ - BitBlt(hDest,wr.left,y,w,h,mem2dc,0,0,SRCCOPY); + BitBlt(hDest,wr.left,y,w,h,mem2dc, 0, 0, SRCCOPY); y += h; } if (y <= wr.bottom) - BitBlt(hDest,wr.left,y,w,wr.bottom-y, mem2dc,0,0,SRCCOPY); + BitBlt(hDest,wr.left,y,w,wr.bottom-y, mem2dc, 0, 0, SRCCOPY); } else @@ -871,13 +871,13 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r while (y < wr.bottom-h) { // BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 }; - ske_AlphaBlend(hDest,wr.left,y,w,h, mem2dc,0,0,w,h,bf); + ske_AlphaBlend(hDest,wr.left,y,w,h, mem2dc, 0, 0, w,h,bf); y += h; } if (y <= wr.bottom) { // BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 }; - ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc,0,0,w,wr.bottom-y,bf); + ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc, 0, 0, w,wr.bottom-y,bf); } } @@ -895,17 +895,17 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int ht; y = wr.top; ht = (y+h-dy <= wr.bottom)?(h-dy):(wr.bottom-wr.top); - ske_AlphaBlend(hDest,wr.left,y,w,ht,mem2dc,0,dy,w,ht,bf); + ske_AlphaBlend(hDest,wr.left,y,w,ht,mem2dc, 0, dy,w,ht,bf); } y = wr.top+h-dy; while (y < wr.bottom-h) { - ske_AlphaBlend(hDest,wr.left,y,w,h,mem2dc,0,0,w,h,bf); + ske_AlphaBlend(hDest,wr.left,y,w,h,mem2dc, 0, 0, w,h,bf); y += h; } if (y <= wr.bottom) - ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc,0,0,w,wr.bottom-y,bf); + ske_AlphaBlend(hDest,wr.left,y,w,wr.bottom-y, mem2dc, 0, 0, w,wr.bottom-y,bf); } } } @@ -935,10 +935,10 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int x = 0, sy = 0, maxy = 0; { //SetStretchBltMode(mem2dc, HALFTONE); - //StretchBlt(mem2dc,0,0,w,h,hSource,rGlyph->left+(wr.left-rFill->left),rGlyph->top,w,h,SRCCOPY); + //StretchBlt(mem2dc, 0, 0, w,h,hSource,rGlyph->left+(wr.left-rFill->left),rGlyph->top,w,h,SRCCOPY); // BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, 0 }; - ske_AlphaBlend(mem2dc,0,-(wr.top-rFill->top),w,rFill->bottom-rFill->top,hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf); + ske_AlphaBlend(mem2dc, 0, -(wr.top-rFill->top),w,rFill->bottom-rFill->top,hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf); if (drawMode == 0 || drawMode == 2) { if (drawMode == 0) @@ -951,15 +951,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt; x = wr.left; wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left); - BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx,0,SRCCOPY); + BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx, 0, SRCCOPY); } x = wr.left+w-dx; while (x < wr.right-w){ - BitBlt(hDest,x,wr.top,w,h,mem2dc,0,0,SRCCOPY); + BitBlt(hDest,x,wr.top,w,h,mem2dc, 0, 0, SRCCOPY); x += w; } if (x <= wr.right) - BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,SRCCOPY); + BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, SRCCOPY); } else { @@ -967,11 +967,11 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r dx = (wr.left-rFill->left)%w; x = wr.left-dx; while (x < wr.right-w){ - ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf); + ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf); x += w; } if (x <= wr.right) - ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf); + ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf); } } @@ -985,15 +985,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt; x = wr.left; wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left); - ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx,0,wt,h,bf); + ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx, 0, wt,h,bf); } x = wr.left+w-dx; while (x < wr.right-w){ - ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf); + ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf); x += w; } if (x <= wr.right) - ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf); + ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf); } } @@ -1032,7 +1032,7 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r while (y < wr.bottom-wr.top) { - ske_AlphaBlend(mem2dc,0,y,w,rGlyph->bottom-rGlyph->top, hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf); + ske_AlphaBlend(mem2dc, 0, y,w,rGlyph->bottom-rGlyph->top, hSource,rGlyph->left,rGlyph->top,w,rGlyph->bottom-rGlyph->top,bf); y += rGlyph->bottom-rGlyph->top; } @@ -1050,15 +1050,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt; x = wr.left; wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left); - BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx,0,SRCCOPY); + BitBlt(hDest,x,wr.top,wt,h,mem2dc,dx, 0, SRCCOPY); } x = wr.left+w-dx; while (x < wr.right-w){ - BitBlt(hDest,x,wr.top,w,h,mem2dc,0,0,SRCCOPY); + BitBlt(hDest,x,wr.top,w,h,mem2dc, 0, 0, SRCCOPY); x += w; } if (x <= wr.right) - BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,SRCCOPY); + BitBlt(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, SRCCOPY); } else { @@ -1066,11 +1066,11 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r dx = (wr.left-rFill->left)%w; x = wr.left-dx; while (x < wr.right-w){ - ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf); + ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf); x += w; } if (x <= wr.right) - ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf); + ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf); } } @@ -1085,15 +1085,15 @@ static BOOL ske_SkinFillRectByGlyph(HDC hDest, HDC hSource, RECT *rFill, RECT *r int wt; x = wr.left; wt = (x+w-dx <= wr.right)?(w-dx):(wr.right-wr.left); - ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx,0,wt,h,bf); + ske_AlphaBlend(hDest,x,wr.top,wt,h,mem2dc,dx, 0, wt,h,bf); } x = wr.left+w-dx; while (x < wr.right-w){ - ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc,0,0,w,h,bf); + ske_AlphaBlend(hDest,x,wr.top,w,h,mem2dc, 0, 0, w,h,bf); x += w; } if (x <= wr.right) - ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc,0,0,wr.right-x,h,bf); + ske_AlphaBlend(hDest,x,wr.top,wr.right-x,h, mem2dc, 0, 0, wr.right-x,h,bf); } } @@ -1147,7 +1147,7 @@ HBITMAP ske_CreateDIB32Point(int cx, int cy, void ** bits) #endif ; } - else memset(ptPixels,0,cx*cy*4); + else memset(ptPixels, 0, cx*cy*4); if (bits != NULL) *bits = ptPixels; return DirectBitmap; } @@ -1220,7 +1220,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) HDC memdc = NULL, glyphdc = NULL; int k = 0; //BITMAP bmp = {0}; - HBITMAP membmp = 0,oldbmp = 0,oldglyph = 0; + HBITMAP membmp = 0, oldbmp = 0, oldglyph = 0; BYTE Is32Bit = 0; RECT PRect; POINT mode2offset = {0}; @@ -1283,7 +1283,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) RECT fr; if (mode == 2) { - SetRect(&fr,0,0,PRect.right-PRect.left,PRect.bottom-PRect.top); + SetRect(&fr, 0, 0, PRect.right-PRect.left,PRect.bottom-PRect.top); FillRect(memdc,&fr,br); ske_SetRectOpaque(memdc,&fr); // FillRectAlpha(memdc,&fr,pobj->dwColor|0xFF000000); @@ -1291,7 +1291,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) else { fr = PRect; - // SetRect(&fr,0,0,PRect.right-PRect.left,PRect.bottom-PRect.top); + // SetRect(&fr, 0, 0, PRect.right-PRect.left,PRect.bottom-PRect.top); FillRect(preq->hDC,&fr,br); } DeleteObject(br); @@ -1434,7 +1434,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.right = lft+pobj->dwLeft; rGlyph.bottom = top+pobj->dwTop; - k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth); + k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth); } // Draw Top-Right corner... if (1) @@ -1453,7 +1453,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.right = rgh; rGlyph.bottom = top+pobj->dwTop; - k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth); + k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth); } // Draw Bottom-Left corner... @@ -1474,7 +1474,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.top = btm-pobj->dwBottom; rGlyph.bottom = btm; - k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth); + k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth); } // Draw Bottom-Right corner... if (1) @@ -1493,7 +1493,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) rGlyph.top = btm-pobj->dwBottom; rGlyph.bottom = btm; - k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect,0,mode,depth); + k += ske_SkinFillRectByGlyph(memdc,glyphdc,&rFill,&rGlyph,&PRect, 0, mode,depth); } } @@ -1506,7 +1506,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) if (mode == 2) OffsetRect(&PRect,mode2offset.x,mode2offset.y); ske_AlphaBlend( preq->hDC,PRect.left,PRect.top,PRect.right-PRect.left,PRect.bottom-PRect.top, - memdc,0,0,PRect.right-PRect.left,PRect.bottom-PRect.top,bf); + memdc, 0, 0, PRect.right-PRect.left,PRect.bottom-PRect.top,bf); } } } @@ -1877,7 +1877,7 @@ static BOOL ske_ReadTGAImageData(void * From, DWORD fromSize, BYTE * destBuf, DW static HBITMAP ske_LoadGlyphImage_TGA(char * szFilename) { BYTE *colormap = NULL; - int cx = 0,cy = 0; + int cx = 0, cy = 0; BOOL err = FALSE; tga_header_t header; if ( !szFilename) return NULL; @@ -2032,12 +2032,12 @@ static HBITMAP ske_LoadGlyphImageByDecoders(char * szFileName) hBitmap = ske_LoadGlyphImage_Png2Dib(szFileName); GetObject(hBitmap, sizeof(BITMAP), &bmpInfo); f = (bmpInfo.bmBits != NULL); - // hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)szFileName); + // hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)szFileName); // f = 1; } else if (hImageDecoderModule == NULL || !mir_bool_strcmpi(ext,".png")) - hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)szFileName); + hBitmap = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)szFileName); else { f = 1; @@ -2063,7 +2063,7 @@ static HBITMAP ske_LoadGlyphImageByDecoders(char * szFileName) hBitmap32 = ske_CreateDIB32(bmpInfo.bmWidth,bmpInfo.bmHeight); obmp24 = (HBITMAP)SelectObject(dc24,hBitmap); obmp32 = (HBITMAP)SelectObject(dc32,hBitmap32); - BitBlt(dc32,0,0,bmpInfo.bmWidth,bmpInfo.bmHeight,dc24,0,0,SRCCOPY); + BitBlt(dc32, 0, 0, bmpInfo.bmWidth,bmpInfo.bmHeight,dc24, 0, 0, SRCCOPY); SelectObject(dc24,obmp24); SelectObject(dc32,obmp32); DeleteDC(dc24); @@ -2303,7 +2303,7 @@ static void ske_LinkSkinObjects(SKINOBJECTSLIST * pObjectList) { if ( !globj->plTextList) { - globj->plTextList = List_Create(0,1); + globj->plTextList = List_Create(0, 1); globj->plTextList->sortFunc = ske_SortTextGlyphObjectFunc; } List_Insert(globj->plTextList,(void*)glText,globj->plTextList->realCount); @@ -2349,7 +2349,7 @@ static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin) if (g_CluiData.fDisableSkinEngine) return 0; Skin->pMaskList = (LISTMODERNMASK*)mir_alloc(sizeof(LISTMODERNMASK)); - memset(Skin->pMaskList,0,sizeof(LISTMODERNMASK)); + memset(Skin->pMaskList, 0, sizeof(LISTMODERNMASK)); Skin->szSkinPlace = db_get_sa(NULL,SKIN,"SkinFolder"); if ( !Skin->szSkinPlace || (strchr(Skin->szSkinPlace, '%') && !db_get_b(NULL,SKIN,"Modified",0))) { @@ -2367,7 +2367,7 @@ static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin) dbces.pfnEnumProc = ske_enumdb_SkinObjectsProc; dbces.szModule = SKIN; dbces.ofsSettings = 0; - CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces); + CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces); SortMaskList(pCurrentSkin->pMaskList); ske_LinkSkinObjects(pCurrentSkin); @@ -2440,7 +2440,7 @@ static int ske_DeleteAllSettingInSection(char * SectionName) dbces.szModule = SectionName; dbces.ofsSettings = 0; - CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces); + CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces); //delete all settings if (nArrayLen == 0){return 0;}; @@ -2448,7 +2448,7 @@ static int ske_DeleteAllSettingInSection(char * SectionName) int i; for (i=0;i < nArrayLen;i++) { - db_unset(0,SectionName,pszSettingName[i]); + db_unset(0, SectionName,pszSettingName[i]); free(pszSettingName[i]); }; free(pszSettingName); @@ -2544,7 +2544,7 @@ BOOL ske_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD Second if (EffectID == -1) return ske_ResetTextEffect(hdc); if ( !pEffectStack) { - pEffectStack = List_Create(0,1); + pEffectStack = List_Create(0, 1); } { int i; @@ -2655,13 +2655,13 @@ static BOOL ske_DrawTextEffect(BYTE* destPt,BYTE* maskPt, DWORD width, DWORD hei //Here perform effect on buffer and place results to outbuf for (k = 0; k < (effectCount&0x7F); k++) { - minX = max( 0, minX + mcLeftStart - 2 ); - minY = max( 0, minY + mcTopStart - 2 ); + minX = max( 0, minX + mcLeftStart - 2 ); + minY = max( 0, minY + mcTopStart - 2 ); maxX = min((int)width, maxX + mcRightEnd - 1 ); maxY = min((int)height, maxY + mcBottomEnd - 1 ); outbuf = (sbyte*)malloc(width*height*sizeof(sbyte)); - memset(outbuf,0,width*height*sizeof(sbyte)); + memset(outbuf, 0, width*height*sizeof(sbyte)); for (y = (DWORD)minY; y < (DWORD)maxY; y++) { int val; @@ -3160,7 +3160,7 @@ BOOL ske_ImageList_DrawEx( HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,i HICON hIcon = ske_ImageList_GetIcon(himl,i,ILD_NORMAL); if (hIcon) { - ske_DrawIconEx(hdcDst,x,y,hIcon,dx?dx:GetSystemMetrics(SM_CXSMICON),dy?dy:GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL|(alpha << 24)); + ske_DrawIconEx(hdcDst,x,y,hIcon,dx?dx:GetSystemMetrics(SM_CXSMICON),dy?dy:GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL|(alpha << 24)); DestroyIcon(hIcon); return TRUE; } @@ -3226,7 +3226,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy { GetObject(tBmp,sizeof(BITMAP),&imbt); otBmp = (HBITMAP)SelectObject(tempDC1,tBmp); - DrawIconEx(tempDC1,0,0,hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE); + DrawIconEx(tempDC1, 0, 0, hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE); noMirrorMask = TRUE; } @@ -3242,7 +3242,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy tempDC1 = ske_RequestBufferDC(hdcDst,BUFFER_DRAWICON,imbt.bmWidth,imbt.bmHeight); if (tempDC1) { - DrawIconEx(tempDC1,0,0,hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE); + DrawIconEx(tempDC1, 0, 0, hIcon,imbt.bmWidth,imbt.bmHeight,istepIfAniCur,hbrFlickerFreeDraw,DI_IMAGE); noMirrorMask = TRUE; ske_ReleaseBufferDC(tempDC1,2000); //keep buffer for 2 seconds } @@ -3343,7 +3343,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy } { BLENDFUNCTION bf = {AC_SRC_OVER, diFlags&128, alpha, AC_SRC_ALPHA }; - ske_AlphaBlend(hdcDst,xLeft,yTop,cxWidth, cyWidth, imDC,0,0, cx,icy,bf); + ske_AlphaBlend(hdcDst,xLeft,yTop,cxWidth, cyWidth, imDC, 0, 0, cx,icy,bf); } if (immaskbt.bmBits == NULL) free(immaskbits); if (imbt.bmBits == NULL) free(imimagbits); @@ -3381,7 +3381,7 @@ int ske_RedrawCompleteWindow() if (g_CluiData.fLayered) { ske_DrawNonFramedObjects(TRUE,0); - CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,0,0); + CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE, 0, 0); } else { @@ -3482,8 +3482,8 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) } if ( !frm->UpdateRgn) { - frm->UpdateRgn = CreateRectRgn(0,0,1,1); - CombineRgn(frm->UpdateRgn,r2,0,RGN_COPY); + frm->UpdateRgn = CreateRectRgn(0, 0, 1,1); + CombineRgn(frm->UpdateRgn,r2, 0, RGN_COPY); } else CombineRgn(frm->UpdateRgn,frm->UpdateRgn,r2,RGN_OR); DeleteObject(r2); @@ -3499,7 +3499,7 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) else Sync( QueueAllFramesUpdating , (BYTE)1 ); if ( !flag_bUpdateQueued || g_flag_bPostWasCanceled) - if (PostMessage(pcli->hwndContactList,UM_UPDATE,0,0)) + if (PostMessage(pcli->hwndContactList,UM_UPDATE, 0, 0)) { flag_bUpdateQueued = 1; g_flag_bPostWasCanceled = 0; @@ -3856,7 +3856,7 @@ int ske_ValidateFrameImageProc(RECT *r) // Callin } if (IsNewCache) { - ske_DrawNonFramedObjects(0,&wnd); + ske_DrawNonFramedObjects(0, &wnd); IsForceAllPainting = 1; } if (flag_bJustDrawNonFramedObjects) @@ -3866,7 +3866,7 @@ int ske_ValidateFrameImageProc(RECT *r) // Callin } if (IsForceAllPainting) { - BitBlt(g_pCachedWindow->hImageDC,0,0,g_pCachedWindow->Width,g_pCachedWindow->Height,g_pCachedWindow->hBackDC,0,0,SRCCOPY); + BitBlt(g_pCachedWindow->hImageDC, 0, 0, g_pCachedWindow->Width,g_pCachedWindow->Height,g_pCachedWindow->hBackDC, 0, 0, SRCCOPY); Sync( QueueAllFramesUpdating, (BYTE)1 ); } //-- Validating frames @@ -3937,7 +3937,7 @@ void ske_ApplyTransluency() if ( !g_CluiData.fLayered && (/*(g_CluiData.bCurrentAlpha == 255) || */(g_proc_SetLayeredWindowAttributesNew && IsTransparancy))) { if ( !layered) SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED); - if (g_proc_SetLayeredWindowAttributesNew) g_proc_SetLayeredWindowAttributesNew(hwnd, RGB(0,0,0), (BYTE)g_CluiData.bCurrentAlpha, LWA_ALPHA); + if (g_proc_SetLayeredWindowAttributesNew) g_proc_SetLayeredWindowAttributesNew(hwnd, RGB(0, 0, 0), (BYTE)g_CluiData.bCurrentAlpha, LWA_ALPHA); } AniAva_RedrawAllAvatars(FALSE); @@ -3958,7 +3958,7 @@ int ske_JustUpdateWindowImage() int ske_JustUpdateWindowImageRect(RECT *rty) //Update window image { - BLENDFUNCTION bf = {AC_SRC_OVER, 0,g_CluiData.bCurrentAlpha, AC_SRC_ALPHA }; + BLENDFUNCTION bf = {AC_SRC_OVER, 0, g_CluiData.bCurrentAlpha, AC_SRC_ALPHA }; POINT dest = {0}, src = {0}; int res; RECT wnd = *rty; @@ -3995,7 +3995,7 @@ int ske_DrawImageAt(HDC hdc, RECT *rc) { BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA }; BitBlt(g_pCachedWindow->hImageDC,rc->left,rc->top,rc->right-rc->left,rc->bottom-rc->top,g_pCachedWindow->hBackDC,rc->left,rc->top,SRCCOPY); - ske_AlphaBlend(g_pCachedWindow->hImageDC,rc->left,rc->top,rc->right-rc->left,rc->bottom-rc->top,hdc,0,0,rc->right-rc->left,rc->bottom-rc->top,bf); + ske_AlphaBlend(g_pCachedWindow->hImageDC,rc->left,rc->top,rc->right-rc->left,rc->bottom-rc->top,hdc, 0, 0, rc->right-rc->left,rc->bottom-rc->top,bf); if ( !g_mutex_bLockUpdating) ske_UpdateWindowImage(); return 0; @@ -4017,7 +4017,7 @@ static DWORD ske_HexToARGB(char * Hex) char * st; BYTE alpha; DWORD AARRGGBB = 0; - _snprintf(buf,10,"%s\n",Hex); + _snprintf(buf,10, "%s\n",Hex); if (buf[1] == 'x' || buf[1] == 'X') _snprintf(buf2,11,"0x%s\n",buf+2); else @@ -4123,7 +4123,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS GLYPHOBJECT *globj = NULL; { char buf[255] = {0}; - GetParamN(szDefineString,buf,sizeof(buf),0,',',TRUE); + GetParamN(szDefineString,buf,sizeof(buf), 0, ',',TRUE); if (strlen(buf)) { SKINOBJECTDESCRIPTOR * lpobj; @@ -4137,7 +4137,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS if ( !globj->plTextList) { - globj->plTextList = List_Create(0,1); + globj->plTextList = List_Create(0, 1); globj->plTextList->sortFunc = ske_SortTextGlyphObjectFunc; } glText = (GLYPHTEXT*)mir_calloc(sizeof(GLYPHTEXT)); @@ -4148,7 +4148,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS glText->iRight = atoi(GetParamN(szDefineString,buf,sizeof(buf),3,',',TRUE)); glText->iBottom = atoi(GetParamN(szDefineString,buf,sizeof(buf),4,',',TRUE)); { - memset(buf,0,6); + memset(buf, 0, 6); GetParamN(szDefineString,buf,sizeof(buf),5,',',TRUE); buf[0] &= 95; buf[1] &= 95; buf[2] &= 95; buf[3] &= 95; buf[4] &= 95; buf[5] &= 95; //to uppercase: &01011111 (0-95) glText->RelativeFlags = @@ -4175,7 +4175,7 @@ static void OLDske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineS static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineString,SKINOBJECTSLIST *Skin) { char buf[255] = {0}; - GetParamN(szDefineString,buf,sizeof(buf),0,',',TRUE); + GetParamN(szDefineString,buf,sizeof(buf), 0, ',',TRUE); if (strlen(buf)) { GLYPHTEXT * glText; @@ -4187,7 +4187,7 @@ static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineStri glText->iRight = atoi(GetParamN(szDefineString,buf,sizeof(buf),3,',',TRUE)); glText->iBottom = atoi(GetParamN(szDefineString,buf,sizeof(buf),4,',',TRUE)); { - memset(buf,0,6); + memset(buf, 0, 6); GetParamN(szDefineString,buf,sizeof(buf),5,',',TRUE); buf[0] &= 95; buf[1] &= 95; buf[2] &= 95; buf[3] &= 95; buf[4] &= 95; buf[5] &= 95; //to uppercase: &01011111 (0-95) glText->RelativeFlags = @@ -4206,7 +4206,7 @@ static void ske_AddParseTextGlyphObject(char * szGlyphTextID,char * szDefineStri glText->stText = ske_ParseText(glText->stValueText); if ( !Skin->pTextList) - Skin->pTextList = List_Create(0,1); + Skin->pTextList = List_Create(0, 1); List_InsertPtr(Skin->pTextList,glText); } } @@ -4235,7 +4235,7 @@ static void ske_AddParseSkinFont(char * szFontID,char * szDefineString,SKINOBJEC logfont.lfQuality = DEFAULT_QUALITY; logfont.lfPitchAndFamily = DEFAULT_PITCH|FF_DONTCARE; - strncpy(logfont.lfFaceName,GetParamN(szDefineString,buf,sizeof(buf),0,',',TRUE),32); + strncpy(logfont.lfFaceName,GetParamN(szDefineString,buf,sizeof(buf), 0, ',',TRUE),32); logfont.lfHeight = atoi(GetParamN(szDefineString,buf,sizeof(buf),1,',',TRUE)); if (logfont.lfHeight < 0) { @@ -4255,7 +4255,7 @@ static void ske_AddParseSkinFont(char * szFontID,char * szDefineString,SKINOBJEC { sf->szFontID = mir_strdup(szFontID); if ( !gl_plSkinFonts) - gl_plSkinFonts = List_Create(0,1); + gl_plSkinFonts = List_Create(0, 1); if (gl_plSkinFonts) { List_Insert(gl_plSkinFonts,(void*)sf,gl_plSkinFonts->realCount); @@ -4290,8 +4290,8 @@ if (sz.cx == 0 || sz.cy == 0) return NULL; tempDC = CreateCompatibleDC(NULL); nImage = ske_CreateDIB32(sz.cx,sz.cy); oImage = SelectObject(tempDC,nImage); -ske_DrawIconEx(tempDC,0,0,hBottom,sz.cx,sz.cy,0,NULL,DI_NORMAL); -ske_DrawIconEx(tempDC,0,0,hTop,sz.cx,sz.cy,0,NULL,DI_NORMAL|(alpha << 24)); +ske_DrawIconEx(tempDC, 0, 0, hBottom,sz.cx,sz.cy, 0, NULL,DI_NORMAL); +ske_DrawIconEx(tempDC, 0, 0, hTop,sz.cx,sz.cy, 0, NULL,DI_NORMAL|(alpha << 24)); SelectObject(tempDC,oImage); DeleteDC(tempDC); { @@ -4318,7 +4318,7 @@ return res; */ static BOOL ske_CheckHasAlfaChannel(BYTE * from, int widthByte, int height) { - int i=0,j = 0; + int i=0, j = 0; DWORD * pt = (DWORD*)from; while (j < height) { @@ -4523,8 +4523,8 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) } else { - ske_DrawIconEx(tempDC,0,0,hBottom,16,16,0,NULL,DI_NORMAL); - ske_DrawIconEx(tempDC,0,0,hTop,16,16,0,NULL,DI_NORMAL|(alpha << 24)); + ske_DrawIconEx(tempDC, 0, 0, hBottom,16,16, 0, NULL,DI_NORMAL); + ske_DrawIconEx(tempDC, 0, 0, hTop,16,16, 0, NULL,DI_NORMAL|(alpha << 24)); } DeleteObject(iciBottom.hbmColor); DeleteObject(iciTop.hbmColor); @@ -4535,7 +4535,7 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) DeleteDC(tempDC); { //BYTE *p = malloc(32); - //memset(p,0,32); + //memset(p, 0, 32); BYTE p[32] = {0}; nMask = CreateBitmap(16,16,1,1,(void*)&p); { @@ -4544,9 +4544,9 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) HBITMAP hbm = CreateCompatibleBitmap(tempDC3,16,16); HBITMAP obmp = (HBITMAP)SelectObject(tempDC2,nMask); HBITMAP obmp2 = (HBITMAP)SelectObject(tempDC3,hbm); - DrawIconEx(tempDC2,0,0,hBottom,16,16,0,NULL,DI_MASK); - DrawIconEx(tempDC3,0,0,hTop,16,16,0,NULL,DI_MASK); - BitBlt(tempDC2,0,0,16,16,tempDC3,0,0,SRCAND); + DrawIconEx(tempDC2, 0, 0, hBottom,16,16, 0, NULL,DI_MASK); + DrawIconEx(tempDC3, 0, 0, hTop,16,16, 0, NULL,DI_MASK); + BitBlt(tempDC2, 0, 0, 16,16,tempDC3, 0, 0, SRCAND); SelectObject(tempDC2,obmp); SelectObject(tempDC3,obmp2); DeleteObject(hbm); diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp index 8497361179..10b651ad97 100644 --- a/plugins/Clist_modern/src/modern_skinselector.cpp +++ b/plugins/Clist_modern/src/modern_skinselector.cpp @@ -454,7 +454,7 @@ int ParseToModernMask(MODERNMASK *mm, char * szText) } memmove(&(mm->pl_Params[curParam]),¶m,sizeof(MASKPARAM)); curParam++; - memset(¶m,0,sizeof(MASKPARAM)); + memset(¶m, 0, sizeof(MASKPARAM)); } return 0; }; @@ -573,7 +573,7 @@ TCHAR * GetParamNT(char * string, TCHAR * buf, int buflen, BYTE paramN, char Del { char *ansibuf = (char*)mir_alloc(buflen/sizeof(TCHAR)); GetParamN(string, ansibuf, buflen/sizeof(TCHAR), paramN, Delim, SkipSpaces); - MultiByteToWideChar(CP_UTF8,0,ansibuf,-1,buf,buflen); + MultiByteToWideChar(CP_UTF8, 0, ansibuf,-1,buf,buflen); mir_free(ansibuf); return buf; } @@ -617,7 +617,7 @@ int RegisterButtonByParce(char * ObjectName, char * Params) { char buf [255]; int res; - GetParamN(Params,buf, SIZEOF(buf),0,',',0); + GetParamN(Params,buf, SIZEOF(buf), 0, ',',0); // if (boolstrcmpi("Push",buf) { //Push type char buf2[20] = {0}; @@ -677,7 +677,7 @@ int RegisterObjectByParce(char * ObjectName, char * Params) SKINOBJECTDESCRIPTOR obj = {0}; char buf[250]; obj.szObjectID = mir_strdup(ObjectName); - GetParamN(Params,buf, SIZEOF(buf),0,',',0); + GetParamN(Params,buf, SIZEOF(buf), 0, ',',0); if (mir_bool_strcmpi(buf,"Glyph")) obj.bType = OT_GLYPHOBJECT; else if (mir_bool_strcmpi(buf,"Font")) @@ -729,7 +729,7 @@ int RegisterObjectByParce(char * ObjectName, char * Params) gl.dwLeft = atoi(GetParamN(Params,buf, SIZEOF(buf),8,',',0)); gl.dwTop = atoi(GetParamN(Params,buf, SIZEOF(buf),9,',',0)); - gl.dwRight = atoi(GetParamN(Params,buf, SIZEOF(buf),10,',',0)); + gl.dwRight = atoi(GetParamN(Params,buf, SIZEOF(buf),10, ',',0)); gl.dwBottom = atoi(GetParamN(Params,buf, SIZEOF(buf),11,',',0)); gl.dwAlpha = atoi(GetParamN(Params,buf, SIZEOF(buf),12,',',0)); GetParamN(Params,buf, SIZEOF(buf),7,',',0); @@ -775,7 +775,7 @@ int __inline SkinDrawWindowBack(HWND hwndIn, HDC hdc, RECT *rcClip, char * objec POINT pt = {0}; RECT rc,r1; - HWND hwnd = (HWND)CallService(MS_CLUI_GETHWND,0,0); + HWND hwnd = (HWND)CallService(MS_CLUI_GETHWND, 0, 0); if ( !objectID) return 0; GetWindowRect(hwndIn,&r1); pt.x = r1.left; diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index c80e2c85e6..3417876ab7 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -79,7 +79,7 @@ int LoadStatusBarData() g_StatusBarData.showProtoIcon = db_get_b(NULL,"CLUI","SBarShow",SETTING_SBARSHOW_DEFAULT)&1; g_StatusBarData.showProtoName = db_get_b(NULL,"CLUI","SBarShow",SETTING_SBARSHOW_DEFAULT)&2; g_StatusBarData.showStatusName = db_get_b(NULL,"CLUI","SBarShow",SETTING_SBARSHOW_DEFAULT)&4; - g_StatusBarData.xStatusMode = (BYTE)(db_get_b(NULL,"CLUI","ShowXStatus",SETTING_SHOWXSTATUS_DEFAULT)); + g_StatusBarData.xStatusMode = (BYTE)( db_get_b(NULL,"CLUI","ShowXStatus",SETTING_SHOWXSTATUS_DEFAULT)); g_StatusBarData.connectingIcon = db_get_b(NULL,"CLUI","UseConnectingIcon",SETTING_USECONNECTINGICON_DEFAULT); g_StatusBarData.showProtoEmails = db_get_b(NULL,"CLUI","ShowUnreadEmails",SETTING_SHOWUNREADEMAILS_DEFAULT); g_StatusBarData.SBarRightClk = db_get_b(NULL,"CLUI","SBarRightClk",SETTING_SBARRIGHTCLK_DEFAULT); @@ -118,16 +118,16 @@ int LoadStatusBarData() if (g_CluiData.fDisableSkinEngine) { DBVARIANT dbv; g_StatusBarData.bkColour = sttGetColor("StatusBar","BkColour",CLCDEFAULT_BKCOLOUR); - if (db_get_b(NULL,"StatusBar","UseBitmap",CLCDEFAULT_USEBITMAP)) { + if ( db_get_b(NULL,"StatusBar","UseBitmap",CLCDEFAULT_USEBITMAP)) { if ( !DBGetContactSettingString(NULL,"StatusBar","BkBitmap",&dbv)) { - g_StatusBarData.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal); + g_StatusBarData.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal); db_free(&dbv); } } g_StatusBarData.bkUseWinColors = db_get_b(NULL,"StatusBar", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS); g_StatusBarData.backgroundBmpUse = db_get_w(NULL,"StatusBar","BkBmpUse",CLCDEFAULT_BKBMPUSE); } - SendMessage(pcli->hwndContactList,WM_SIZE,0,0); + SendMessage(pcli->hwndContactList,WM_SIZE, 0, 0); return 1; } @@ -218,7 +218,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if (g_StatusBarData.perProtoConfig && db_get_b(NULL, "CLUI", buf, SETTING_SBARACCOUNTISCUSTOM_DEFAULT)) { mir_snprintf(buf, SIZEOF(buf), "HideAccount_%s", accs[i]->szModuleName); - if (db_get_b(NULL, "CLUI", buf, SETTING_SBARHIDEACCOUNT_DEFAULT)) + if ( db_get_b(NULL, "CLUI", buf, SETTING_SBARHIDEACCOUNT_DEFAULT)) continue; mir_snprintf(buf, SIZEOF(buf), "SBarShow_%s", accs[i]->szModuleName); @@ -258,7 +258,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) p->PaddingRight = 0; } - p->ProtoStatus = CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0); + p->ProtoStatus = CallProtoService(accs[i]->szModuleName,PS_GETSTATUS, 0, 0); p->ProtoEMailCount = NULL; if (p->ProtoStatus > ID_STATUS_OFFLINE) { @@ -384,7 +384,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) char str[MAXMODULELABELLENGTH]; mir_snprintf(str, SIZEOF(str), "%s/GetXStatusIcon", p.AccountName); if ( ServiceExists(str)) - p.extraIcon = (HICON)CallService(str,0,0); + p.extraIcon = (HICON)CallService(str, 0, 0); if (p.extraIcon && (p.xStatusMode & 3) == 3) w += GetSystemMetrics(SM_CXSMICON)+1; } @@ -516,25 +516,25 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if ((p.xStatusMode&3) == 3) { if (hIcon) - mod_DrawIconEx_helper(hDC,x,iconY,hIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL, DI_NORMAL|dim ); + mod_DrawIconEx_helper(hDC,x,iconY,hIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL|dim ); if (hxIcon) { - mod_DrawIconEx_helper(hDC,x+GetSystemMetrics(SM_CXSMICON)+1,iconY,hxIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL|dim); + mod_DrawIconEx_helper(hDC,x+GetSystemMetrics(SM_CXSMICON)+1,iconY,hxIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL|dim); x += GetSystemMetrics(SM_CXSMICON)+1; } p.DoubleIcons = hIcon && hxIcon; } else { if (hxIcon) - mod_DrawIconEx_helper(hDC,x,iconY,hxIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL|dim); + mod_DrawIconEx_helper(hDC,x,iconY,hxIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL|dim); if (hIcon) - mod_DrawIconEx_helper(hDC,x,iconY,hIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL| ((hxIcon && (p.xStatusMode&4))?(192 << 24):0 ) | dim ); + mod_DrawIconEx_helper(hDC,x,iconY,hIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL| ((hxIcon && (p.xStatusMode&4))?(192 << 24):0 ) | dim ); } if (hxIcon || hIcon) { /* TODO g_StatusBarData.bDrawLockOverlay options to draw locked proto*/ if ( db_get_b( NULL,p.AccountName,"LockMainStatus",0 )) { HICON hLockOverlay = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED); if (hLockOverlay != NULL) { - mod_DrawIconEx_helper(hDC, x, iconY, hLockOverlay, GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL | dim); + mod_DrawIconEx_helper(hDC, x, iconY, hLockOverlay, GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON), 0, NULL,DI_NORMAL | dim); Skin_ReleaseIcon(hLockOverlay); } } @@ -608,7 +608,7 @@ static BOOL _ModernStatus_OnExtraIconClick(int protoIndex) if (ProtosData[protoIndex].ProtoStatus < ID_STATUS_ONLINE) return FALSE; - HMENU hMainStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + HMENU hMainStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); if ( !hMainStatusMenu) return FALSE; @@ -715,7 +715,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam { RECT rct; GetWindowRect(hwnd,&rct); - memset((LPMINMAXINFO)lParam,0,sizeof(MINMAXINFO)); + memset((LPMINMAXINFO)lParam, 0, sizeof(MINMAXINFO)); ((LPMINMAXINFO)lParam)->ptMinTrackSize.x = 16; ((LPMINMAXINFO)lParam)->ptMinTrackSize.y = 16; ((LPMINMAXINFO)lParam)->ptMaxTrackSize.x = 1600; @@ -726,14 +726,14 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam case WM_SHOWWINDOW: { if (tooltipshoing) { - NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip,0,0); + NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip, 0, 0); tooltipshoing = FALSE; } int ID = Sync(FindFrameID, hwnd); if (ID) { int res = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS,ID),0); if (res >= 0) - db_set_b(0,"CLUI","ShowSBar",(BYTE)(wParam/*(res&F_VISIBLE)*/?1:0)); + db_set_b(0, "CLUI","ShowSBar",(BYTE)(wParam/*(res&F_VISIBLE)*/?1:0)); } } break; @@ -742,7 +742,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam if (wParam == TM_STATUSBARHIDE) { KillTimer(hwnd,TM_STATUSBARHIDE); if (tooltipshoing) { - NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip,0,0); + NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip, 0, 0); tooltipshoing = FALSE; ReleaseCapture(); } @@ -777,7 +777,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam GetCursorPos(&pt); if ( abs(pt.x-ptToolTipShow.x) > TOOLTIP_TOLERANCE || abs(pt.y-ptToolTipShow.y) > TOOLTIP_TOLERANCE) { KillTimer(hwnd,TM_STATUSBARHIDE); - NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip,0,0); + NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip, 0, 0); tooltipshoing = FALSE; ReleaseCapture(); } @@ -797,7 +797,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam if (tooltipshoing) if ( abs(pt.x-ptToolTipShow.x) > TOOLTIP_TOLERANCE || abs(pt.y-ptToolTipShow.y) > TOOLTIP_TOLERANCE) { KillTimer(hwnd,TM_STATUSBARHIDE); - NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip,0,0); + NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip, 0, 0); tooltipshoing = FALSE; ReleaseCapture(); } @@ -818,7 +818,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam KillTimer(hwnd,TM_STATUSBAR); if (tooltipshoing) - NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip,0,0); + NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip, 0, 0); tooltipshoing = FALSE; for (int i=0; i < ProtosData.getCount(); i++) { @@ -908,12 +908,12 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam if (msg == WM_RBUTTONDOWN) { BOOL a = ((g_StatusBarData.perProtoConfig && p.SBarRightClk) || g_StatusBarData.SBarRightClk ); if ( a ^ bShift ) - hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0); + hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0); else - hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); } else { - hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0); + hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0); unsigned int cpnl = 0; int mcnt = GetMenuItemCount(hMenu); for (int j = 0; j < mcnt; ++j) { @@ -930,7 +930,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam HWND parent = GetParent(hwnd); if (parent != pcli->hwndContactList) parent = GetParent(parent); - TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,parent,NULL); + TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y, 0, parent,NULL); return 0; } } @@ -972,12 +972,12 @@ HWND StatusBar_Create(HWND parent) // register frame CLISTFrame Frame; - memset(&Frame,0,sizeof(Frame)); + memset(&Frame, 0, sizeof(Frame)); Frame.cbSize = sizeof(CLISTFrame); Frame.hWnd = hModernStatusBar; Frame.align = alBottom; Frame.hIcon = LoadSkinnedIcon (SKINICON_OTHER_FRAME); - Frame.Flags = (db_get_b(NULL,"CLUI","ShowSBar",SETTING_SHOWSBAR_DEFAULT)?F_VISIBLE:0)|F_LOCKED|F_NOBORDER|F_NO_SUBCONTAINER|F_TCHAR; + Frame.Flags = ( db_get_b(NULL,"CLUI","ShowSBar",SETTING_SHOWSBAR_DEFAULT)?F_VISIBLE:0)|F_LOCKED|F_NOBORDER|F_NO_SUBCONTAINER|F_TCHAR; Frame.height = h; Frame.tname = _T("Status Bar"); Frame.TBtname = TranslateT("Status Bar"); @@ -985,7 +985,7 @@ HWND StatusBar_Create(HWND parent) CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)Frame.hWnd,(LPARAM)NewStatusPaintCallbackProc); //$$$$$ register sub for frame LoadStatusBarData(); - CLUIServices_ProtocolStatusChanged(0,0); + CLUIServices_ProtocolStatusChanged(0, 0); CallService(MS_CLIST_FRAMES_UPDATEFRAME,-1,0); return hModernStatusBar; } diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp index b0e5bd091b..0fbf3136f2 100644 --- a/plugins/Clist_modern/src/modern_statusbar_options.cpp +++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp @@ -108,11 +108,11 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg) CheckDlgButton(hwndDlg, IDC_RIGHTSTATUS, sbpo.SBarRightClk ? BST_UNCHECKED : BST_CHECKED); CheckDlgButton(hwndDlg, IDC_RIGHTMIRANDA, !IsDlgButtonChecked(hwndDlg,IDC_RIGHTSTATUS) ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_SETPOS,0,MAKELONG(sbpo.PaddingLeft,2)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_SETPOS, 0, MAKELONG(sbpo.PaddingLeft,2)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_SETPOS,0,MAKELONG(sbpo.PaddingRight,2)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_SETPOS, 0, MAKELONG(sbpo.PaddingRight,2)); if ( !sbpo.AccountIsCustomized) UpdateXStatusIconOptions(hwndDlg, perProto, dat, curSelProto); @@ -230,29 +230,29 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l CheckDlgButton(hwndDlg, IDC_EQUALSECTIONS, db_get_b(NULL,"CLUI","EqualSections",SETTING_EQUALSECTIONS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_SETPOS,0,MAKELONG(db_get_b(NULL,"CLUI","StatusBarProtosPerLine",SETTING_PROTOSPERLINE_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_SETPOS, 0, MAKELONG( db_get_b(NULL,"CLUI","StatusBarProtosPerLine",SETTING_PROTOSPERLINE_DEFAULT),0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_SETPOS,0,MAKELONG(db_get_dw(NULL,"CLUI","LeftOffset",SETTING_LEFTOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","LeftOffset",SETTING_LEFTOFFSET_DEFAULT),0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_SETPOS,0,MAKELONG(db_get_dw(NULL,"CLUI","RightOffset",SETTING_RIGHTOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","RightOffset",SETTING_RIGHTOFFSET_DEFAULT),0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_SETPOS,0,MAKELONG(db_get_dw(NULL,"CLUI","TopOffset",SETTING_TOPOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","TopOffset",SETTING_TOPOFFSET_DEFAULT),0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_SETPOS,0,MAKELONG(db_get_dw(NULL,"CLUI","BottomOffset",SETTING_BOTTOMOFFSET_DEFAULT),0)); + SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","BottomOffset",SETTING_BOTTOMOFFSET_DEFAULT),0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_SETRANGE,0,MAKELONG(50,0)); - SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_SETPOS,0,MAKELONG(db_get_dw(NULL,"CLUI","SpaceBetween",SETTING_SPACEBETWEEN_DEFAULT),2)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_SETRANGE, 0, MAKELONG(50, 0)); + SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL,"CLUI","SpaceBetween",SETTING_SPACEBETWEEN_DEFAULT),2)); { int i, item; TCHAR *align[] = {_T("Left"), _T("Center"), _T("Right")}; for (i=0; i < SIZEOF(align); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_SBAR_HORIZ_ALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(align[i])); + item = SendDlgItemMessage(hwndDlg,IDC_SBAR_HORIZ_ALIGN,CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i])); } SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "Align", SETTING_ALIGN_DEFAULT), 0); @@ -262,7 +262,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int i, item; TCHAR *align[] = {_T("Top"), _T("Center"), _T("Bottom")}; for (i=0; i < SIZEOF(align); i++) { - item = SendDlgItemMessage(hwndDlg,IDC_SBAR_VERT_ALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(align[i])); + item = SendDlgItemMessage(hwndDlg,IDC_SBAR_VERT_ALIGN,CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i])); } SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "VAlign", SETTING_VALIGN_DEFAULT), 0); @@ -320,7 +320,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (HIWORD(wParam) == BN_CLICKED) { CHOOSEFONTA fnt; - memset(&fnt,0,sizeof(CHOOSEFONTA)); + memset(&fnt, 0, sizeof(CHOOSEFONTA)); fnt.lStructSize = sizeof(CHOOSEFONTA); fnt.hwndOwner = hwndDlg; fnt.Flags = CF_SCREENFONTS|CF_INITTOLOGFONTSTRUCT; @@ -439,16 +439,16 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l else if (LOWORD(wParam) == IDC_OFFSETICON_LEFT) { if (perProto) - dat[curSelProto].PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_GETPOS,0,0); + dat[curSelProto].PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_GETPOS, 0, 0); else - _GlobalOptions.PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_GETPOS,0,0); + _GlobalOptions.PaddingLeft = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_LEFT,UDM_GETPOS, 0, 0); } else if (LOWORD(wParam) == IDC_OFFSETICON_RIGHT) { if (perProto) - dat[curSelProto].PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_GETPOS,0,0); + dat[curSelProto].PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_GETPOS, 0, 0); else - _GlobalOptions.PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_GETPOS,0,0); + _GlobalOptions.PaddingRight = (DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN_RIGHT,UDM_GETPOS, 0, 0); } else if ( ( @@ -474,7 +474,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: { - int count = db_get_dw(0,"Protocols","ProtoCount",-1); + int count = db_get_dw(0, "Protocols","ProtoCount",-1); db_set_b(NULL, "CLUI", "SBarPerProto", IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO)); for (int i=0; i < count; i++) { @@ -514,20 +514,20 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l db_set_dw(NULL,"CLUI","PaddingRight",_GlobalOptions.PaddingRight); - db_set_b(NULL,"CLUI","StatusBarProtosPerLine",(BYTE)SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_GETPOS,0,0)); + db_set_b(NULL,"CLUI","StatusBarProtosPerLine",(BYTE)SendDlgItemMessage(hwndDlg,IDC_MULTI_SPIN,UDM_GETPOS, 0, 0)); db_set_b(NULL,"CLUI","EqualSections",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_EQUALSECTIONS)); - db_set_b(NULL,"CLUI","Align",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SBAR_HORIZ_ALIGN,CB_GETCURSEL,0,0)); - db_set_b(NULL,"CLUI","VAlign",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SBAR_VERT_ALIGN,CB_GETCURSEL,0,0)); - db_set_dw(NULL,"CLUI","LeftOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_GETPOS,0,0)); - db_set_dw(NULL,"CLUI","RightOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_GETPOS,0,0)); - db_set_dw(NULL,"CLUI","TopOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_GETPOS,0,0)); - db_set_dw(NULL,"CLUI","BottomOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_GETPOS,0,0)); - db_set_dw(NULL,"CLUI","SpaceBetween",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_GETPOS,0,0)); - db_set_dw(NULL,"ModernData","StatusBarFontCol",SendDlgItemMessage(hwndDlg,IDC_COLOUR,CPM_GETCOLOUR,0,0)); + db_set_b(NULL,"CLUI","Align",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SBAR_HORIZ_ALIGN,CB_GETCURSEL, 0, 0)); + db_set_b(NULL,"CLUI","VAlign",(BYTE)SendDlgItemMessage(hwndDlg,IDC_SBAR_VERT_ALIGN,CB_GETCURSEL, 0, 0)); + db_set_dw(NULL,"CLUI","LeftOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN,UDM_GETPOS, 0, 0)); + db_set_dw(NULL,"CLUI","RightOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN2,UDM_GETPOS, 0, 0)); + db_set_dw(NULL,"CLUI","TopOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_TOP_SPIN,UDM_GETPOS, 0, 0)); + db_set_dw(NULL,"CLUI","BottomOffset",(DWORD)SendDlgItemMessage(hwndDlg,IDC_SBAR_BORDER_BOTTOM_SPIN,UDM_GETPOS, 0, 0)); + db_set_dw(NULL,"CLUI","SpaceBetween",(DWORD)SendDlgItemMessage(hwndDlg,IDC_OFFSETSPIN3,UDM_GETPOS, 0, 0)); + db_set_dw(NULL,"ModernData","StatusBarFontCol",SendDlgItemMessage(hwndDlg,IDC_COLOUR,CPM_GETCOLOUR, 0, 0)); db_set_b(NULL,"CLUI","ShowSBar",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR)); LoadStatusBarData(); - CLUIServices_ProtocolStatusChanged(0,0); + CLUIServices_ProtocolStatusChanged(0, 0); return TRUE; } } diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp index 796697fc87..9a797411ec 100644 --- a/plugins/Clist_modern/src/modern_tbbutton.cpp +++ b/plugins/Clist_modern/src/modern_tbbutton.cpp @@ -42,7 +42,7 @@ static HANDLE hBkgChangedHook = NULL; static int OnIconLibIconChanged(WPARAM wParam, LPARAM lParam) { - WindowList_BroadcastAsync(hButtonWindowList, MBM_REFRESHICOLIBICON,0,0); + WindowList_BroadcastAsync(hButtonWindowList, MBM_REFRESHICOLIBICON, 0, 0); return 0; } @@ -136,7 +136,7 @@ static void PaintWorker(TBBUTTONDATA *bct, HDC hdcPaint , POINT *pOffset) ClientToScreen(hwndParent,&pt); OffsetRect(&btnRect,-pt.x,-pt.y); if (ret) - BitBlt(hdcMem,0,0,btnRect.right-btnRect.left,btnRect.bottom-btnRect.top,dc,btnRect.left,btnRect.top,SRCCOPY); + BitBlt(hdcMem, 0, 0, btnRect.right-btnRect.left,btnRect.bottom-btnRect.top,dc,btnRect.left,btnRect.top,SRCCOPY); oldBM = (HBITMAP)SelectObject ( dc, oldBM ); DeleteObject(memBM); DeleteDC(dc); @@ -224,7 +224,7 @@ static void PaintWorker(TBBUTTONDATA *bct, HDC hdcPaint , POINT *pOffset) ske_ResetTextEffect(hdcMem); } if ( !pOffset) - BitBlt(hdcPaint,0,0,width,height,hdcMem,0,0,SRCCOPY); + BitBlt(hdcPaint, 0, 0, width,height,hdcMem, 0, 0, SRCCOPY); // better to use try/finally but looks like last one is Microsoft specific SelectObject(hdcMem,hOldFont); @@ -488,7 +488,7 @@ int Buttons_ModuleLoaded(WPARAM wParam, LPARAM lParam) int Buttons_OnSkinModeSettingsChanged(WPARAM wParam, LPARAM lParam) { - WindowList_BroadcastAsync(hButtonWindowList, MBM_UPDATETRANSPARENTFLAG,0,2); + WindowList_BroadcastAsync(hButtonWindowList, MBM_UPDATETRANSPARENTFLAG, 0, 2); return 0; } diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 0f8532bc5a..f4bb35f70e 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -145,14 +145,14 @@ static int ehhToolBarBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) tbdat.mtb_bkColour = sttGetColor("ToolBar","BkColour",CLCDEFAULT_BKCOLOUR); if ( db_get_b(NULL,"ToolBar","UseBitmap",CLCDEFAULT_USEBITMAP)) { if ( !db_get_s(NULL, "ToolBar", "BkBitmap", &dbv, DBVT_TCHAR)) { - tbdat.mtb_hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.ptszVal); + tbdat.mtb_hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.ptszVal); db_free(&dbv); } } tbdat.mtb_useWinColors = db_get_b(NULL, "ToolBar", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS); tbdat.mtb_backgroundBmpUse = db_get_b(NULL, "ToolBar", "BkBmpUse", CLCDEFAULT_BKBMPUSE); } - PostMessage(pcli->hwndContactList,WM_SIZE,0,0); + PostMessage(pcli->hwndContactList,WM_SIZE, 0, 0); return 0; } @@ -356,7 +356,7 @@ static int Toolbar_ModulesLoaded(WPARAM, LPARAM) HRESULT ToolbarLoadModule() { - ehhToolBarBackgroundSettingsChanged(0,0); + ehhToolBarBackgroundSettingsChanged(0, 0); HookEvent(ME_SYSTEM_MODULESLOADED, Toolbar_ModulesLoaded); return S_OK; } diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index 724bdacf28..de11433e3f 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -90,7 +90,7 @@ DWORD exceptFunction(LPEXCEPTION_POINTERS EP) EP->ExceptionRecord->ExceptionAddress); TRACE(buf); - MessageBoxA(0,buf,"clist_mw Exception",0); + MessageBoxA(0, buf,"clist_mw Exception",0); return EXCEPTION_EXECUTE_HANDLER; } @@ -110,7 +110,7 @@ void TRACE_ERROR() t, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR) &lpMsgBuf, - 0, + 0, NULL )) { // Handle the error. diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 0162d589af..6f23c660bb 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -109,7 +109,7 @@ void CLVM_EnumModes(pfnEnumCallback EnumCallback) dbces.szModule = CLVM_MODULE; dbces.ofsSettings = 0; dbces.lParam = (LPARAM)EnumCallback; - CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces); + CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces); } int FillModes(char *szsetting) @@ -744,11 +744,11 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP } SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)himlViewModes); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRACOLUMNS, ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE, 0); - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKBITMAP,0,(LPARAM)(HBITMAP)NULL); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKCOLOR,GetSysColor(COLOR_WINDOW),0); - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS,0,0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN,2,0); - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT,10,0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT,10, 0); for (i=0;i <= FONTID_MAX;i++) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR,i,GetSysColor(COLOR_WINDOWTEXT)); @@ -1009,7 +1009,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM switch(msg) { case WM_CREATE: { - RECT rcMargins = {12,0,2,0}; + RECT rcMargins = {12, 0, 2,0}; hwndSelector = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP , 0, 0, 20, 20, hwnd, (HMENU) IDC_SELECTMODE, g_hInst, NULL); MakeButtonSkinned(hwndSelector); @@ -1049,21 +1049,21 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM RECT rcCLVMFrame; HDWP PosBatch = BeginDeferWindowPos(3); GetClientRect(hwnd, &rcCLVMFrame); - PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_RESETMODES), 0, + PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_RESETMODES), 0, rcCLVMFrame.right - 23, 1, 22, 18, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS); - PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_CONFIGUREMODES), 0, + PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_CONFIGUREMODES), 0, rcCLVMFrame.right - 45, 1, 22, 18, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS); - PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_SELECTMODE), 0, + PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_SELECTMODE), 0, 1, 1, rcCLVMFrame.right - 46, 18, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS); EndDeferWindowPos(PosBatch); } break; case WM_USER + 100: - SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), MBM_SETICOLIBHANDLE, 0, + SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), MBM_SETICOLIBHANDLE, 0, (LPARAM) RegisterIcolibIconHandle("CLN_CLVM_reset", "Contact List",Translate("Reset view mode"), NULL, 0, g_hInst, IDI_RESETVIEW )); - SendMessage(GetDlgItem(hwnd, IDC_CONFIGUREMODES), MBM_SETICOLIBHANDLE, 0, + SendMessage(GetDlgItem(hwnd, IDC_CONFIGUREMODES), MBM_SETICOLIBHANDLE, 0, (LPARAM) RegisterIcolibIconHandle("CLN_CLVM_set", "Contact List",Translate("Setup view modes"), NULL, 0, g_hInst, IDI_SETVIEW )); { @@ -1278,16 +1278,16 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; view_mode.bkColour = sttGetColor("ViewMode","BkColour",CLCDEFAULT_BKCOLOUR); - if (db_get_b(NULL,"ViewMode","UseBitmap",CLCDEFAULT_USEBITMAP)) { + if ( db_get_b(NULL,"ViewMode","UseBitmap",CLCDEFAULT_USEBITMAP)) { if ( !DBGetContactSettingString(NULL,"ViewMode","BkBitmap",&dbv)) { - view_mode.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal); + view_mode.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal); db_free(&dbv); } } view_mode.useWinColors = db_get_b(NULL, "ViewMode", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS); view_mode.backgroundBmpUse = db_get_w(NULL, "ViewMode", "BkBmpUse", CLCDEFAULT_BKBMPUSE); } - PostMessage(pcli->hwndContactList,WM_SIZE,0,0); + PostMessage(pcli->hwndContactList,WM_SIZE, 0, 0); return 0; } @@ -1295,7 +1295,7 @@ void CreateViewModeFrame() { CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)"View Mode Background/ViewMode",0); HookEvent(ME_BACKGROUNDCONFIG_CHANGED,ehhViewModeBackgroundSettingsChanged); - ehhViewModeBackgroundSettingsChanged(0,0); + ehhViewModeBackgroundSettingsChanged(0, 0); CLISTFrame frame = {0}; WNDCLASS wndclass = {0}; diff --git a/plugins/Clist_modern/src/modern_xptheme.cpp b/plugins/Clist_modern/src/modern_xptheme.cpp index 91efe22898..892926c842 100644 --- a/plugins/Clist_modern/src/modern_xptheme.cpp +++ b/plugins/Clist_modern/src/modern_xptheme.cpp @@ -88,7 +88,7 @@ HRESULT XPThemesLoadModule() if (_xpt_ThemeSupport()) { InitializeCriticalSection(&xptCS); - xptObjectList = List_Create(0,1); + xptObjectList = List_Create(0, 1); xptModuleLoaded = TRUE; } return S_OK; -- cgit v1.2.3