From adaf7196c187cc926146fa65ff1f68a0a1ef3531 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Feb 2021 19:02:13 +0300 Subject: fixes #2744 + code cleaning --- plugins/Clist_modern/src/modern_clcopts.cpp | 8 ++-- plugins/Clist_modern/src/modern_clcpaint.cpp | 8 ++-- plugins/Clist_modern/src/modern_clcutils.cpp | 6 +-- plugins/Clist_modern/src/modern_clistsettings.cpp | 2 +- plugins/Clist_modern/src/modern_clisttray.cpp | 50 +++------------------- plugins/Clist_modern/src/modern_clui.cpp | 34 +++++++-------- plugins/Clist_modern/src/modern_commonprototypes.h | 44 +++++++++---------- plugins/Clist_modern/src/modern_skinengine.cpp | 19 ++++---- plugins/Clist_modern/src/modern_skinopt.cpp | 4 +- plugins/Clist_modern/src/modern_utils.cpp | 2 - 10 files changed, 68 insertions(+), 109 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index bd3048dcad..1a14954084 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -865,7 +865,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM db_set_b(0, "CLUI", "DragToScroll", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL)); g_plugin.setByte("BringToFront", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT)); - g_mutex_bChangingMode = TRUE; + g_bChangingMode = true; db_set_b(0, "CLUI", "ClientAreaDrag", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG)); db_set_b(0, "CLUI", "AutoSize", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE)); db_set_b(0, "CLUI", "LockSize", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LOCKSIZING)); @@ -886,7 +886,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM CLUI_ReloadCLUIOptions(); EventArea_ConfigureEventArea(); cliShowHide(true); - g_mutex_bChangingMode = FALSE; + g_bChangingMode = false; return TRUE; } break; @@ -1122,7 +1122,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP db_set_b(0, "CLC", "RoundCorners", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ROUNDCORNERS)); //====== End of Non-Layered Mode ====== - g_mutex_bChangingMode = TRUE; + g_bChangingMode = true; if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) { HWND hProgMan = FindWindow(L"Progman", nullptr); @@ -1161,7 +1161,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged CLUI_ReloadCLUIOptions(); cliShowHide(true); - g_mutex_bChangingMode = FALSE; + g_bChangingMode = false; return TRUE; } } diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 04b78aa247..85c7854e3c 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -378,7 +378,7 @@ void CLCPaint::_DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE *text_size, wchar // Just draw ellipsis if (free_rc->right <= free_rc->left) { - if (gl_TrimText) + if (g_bTrimText) ske_DrawText(hdcMem, L"...", 3, free_rc, uTextFormat & ~DT_END_ELLIPSIS); } else { @@ -707,7 +707,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R wchar_t *szCounts = nullptr; RECT text_rect = fr_rc; RECT counts_rc = { 0 }; - UINT uTextFormat = DT_LEFT | DT_VCENTER | (gl_TrimText ? DT_END_ELLIPSIS : 0) | DT_SINGLELINE; + UINT uTextFormat = DT_LEFT | DT_VCENTER | (g_bTrimText ? DT_END_ELLIPSIS : 0) | DT_SINGLELINE; uTextFormat |= dat->text_rtl ? DT_RTLREADING : 0; // Select font ChangeToFont(hdcMem, dat, GetBasicFontID(Drawing), nullptr); @@ -1836,7 +1836,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT _StoreItemPos(Drawing, CIT_SELECTION, &selection_text_rc); // Draw text - uTextFormat = uTextFormat | (gl_TrimText ? DT_END_ELLIPSIS : 0); + uTextFormat = uTextFormat | (g_bTrimText ? DT_END_ELLIPSIS : 0); switch (Drawing->type) { case CLCIT_DIVIDER: @@ -2284,7 +2284,7 @@ void CLCPaint::_DrawContactItems(HDC hdcMem, ClcData *dat, ClcContact *Drawing, DT_SINGLELINE | (dat->text_rtl ? DT_RTLREADING : 0) | (dat->text_align_right ? DT_RIGHT : 0) | - (gl_TrimText ? DT_END_ELLIPSIS : 0) | + (g_bTrimText ? DT_END_ELLIPSIS : 0) | ((dat->bForceInDialog || dat->bkChanged) ? DT_FORCENATIVERENDER : 0); RECT text_rc = *row_rc; diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index e5f34f9967..5420e49143 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -204,9 +204,9 @@ void cliRecalcScrollBar(HWND hwnd, ClcData *dat) } else SetScrollInfo(hwnd, SB_VERT, &si, TRUE); - g_mutex_bSizing = 1; + g_bSizing = true; cliScrollTo(hwnd, dat, dat->yScroll, 1); - g_mutex_bSizing = 0; + g_bSizing = false; } @@ -554,7 +554,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) // First line dat->first_line_draw_smileys = g_plugin.getByte("FirstLineDrawSmileys", SETTING_FIRSTLINE_SMILEYS_DEFAULT); dat->first_line_append_nick = g_plugin.getByte("FirstLineAppendNick", SETTING_FIRSTLINE_APPENDNICK_DEFAULT); - gl_TrimText = g_plugin.getByte("TrimText", SETTING_FIRSTLINE_TRIMTEXT_DEFAULT); + g_bTrimText = g_plugin.getByte("TrimText", SETTING_FIRSTLINE_TRIMTEXT_DEFAULT) != 0; dat->rightMargin = db_get_b(0, "CLC", "RightMargin", CLCDEFAULT_RIGHTMARGIN); dat->topMargin = db_get_b(0, "CLC", "TopMargin", 0); diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index eee226c647..aa6993c247 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -139,7 +139,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) Clist_Broadcast(INTM_STATUSCHANGED, hContact, 0); } else if (!strcmp(cws->szModule, META_PROTO) && !memcmp(cws->szSetting, "Status", 6)) { // Status0..N for metacontacts - if (g_clistApi.hwndContactTree && g_flag_bOnModulesLoadedCalled) + if (g_clistApi.hwndContactTree && g_bOnModulesLoadedCalled) Clist_InitAutoRebuild(g_clistApi.hwndContactTree); if ((g_plugin.secondLine.getType() == TEXT_STATUS_MESSAGE || g_plugin.thirdLine.getType() == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->szProto) diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index b1c690adac..b284e83e37 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include "modern_statusbar.h" -int g_mutex_bOnTrayRightClick = 0; -BOOL g_bMultiConnectionMode = FALSE; +bool g_bOnTrayRightClick = false; +bool g_bMultiConnectionMode = false; BOOL IS_WM_MOUSE_DOWN_IN_TRAY; BOOL g_trayTooltipActive = FALSE; POINT tray_hover_pos = { 0 }; @@ -35,50 +35,12 @@ POINT tray_hover_pos = { 0 }; #define NIF_STATE 0x00000008 #define NIF_INFO 0x00000010 -#ifndef _INC_SHLWAPI - -typedef struct _DllVersionInfo -{ - DWORD cbSize; - DWORD dwMajorVersion; // Major version - DWORD dwMinorVersion; // Minor version - DWORD dwBuildNumber; // Build number - DWORD dwPlatformID; // DLLVER_PLATFORM_* -} DLLVERSIONINFO; - -#define DLLVER_PLATFORM_WINDOWS 0x00000001 // Windows 95 -#define DLLVER_PLATFORM_NT 0x00000002 // Windows NT -typedef HRESULT(CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); - -#endif - -BOOL g_MultiConnectionMode = FALSE; char* g_szConnectingProto = nullptr; -int GetStatusVal(int status) -{ - if (IsStatusConnecting(status)) // 'connecting' status has the top priority - return 600; - - switch (status) { - case ID_STATUS_OFFLINE: return 50; - case ID_STATUS_ONLINE: return 100; - case ID_STATUS_FREECHAT: return 110; - case ID_STATUS_INVISIBLE: return 120; - case ID_STATUS_AWAY: return 200; - case ID_STATUS_DND: return 210; - case ID_STATUS_NA: return 220; - case ID_STATUS_OCCUPIED: return 230; - } - - return 0; -} - INT_PTR CListTray_GetGlobalStatus(WPARAM, LPARAM) { g_szConnectingProto = nullptr; - int curstatus = ID_STATUS_OFFLINE; int connectingCount = 0; g_bMultiConnectionMode = false; @@ -93,11 +55,9 @@ INT_PTR CListTray_GetGlobalStatus(WPARAM, LPARAM) else g_bMultiConnectionMode = true; } - else if (GetStatusVal(it->iRealStatus) > GetStatusVal(curstatus)) - curstatus = it->iRealStatus; } - return curstatus; + return Clist_GetGeneralizedStatus(); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -144,7 +104,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !Clist::Tray1Click) { POINT pt; HMENU hMenu = Menu_GetStatusMenu(); - g_mutex_bOnTrayRightClick = 1; + g_bOnTrayRightClick= true; IS_WM_MOUSE_DOWN_IN_TRAY = 1; SetForegroundWindow(msg->hwnd); SetFocus(msg->hwnd); @@ -152,7 +112,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam) g_clistApi.bTrayMenuOnScreen = TRUE; TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON, pt.x, pt.y, 0, msg->hwnd, nullptr); PostMessage(msg->hwnd, WM_NULL, 0, 0); - g_mutex_bOnTrayRightClick = 0; + g_bOnTrayRightClick = false; IS_WM_MOUSE_DOWN_IN_TRAY = 0; } else if (msg->lParam == WM_MBUTTONDOWN || msg->lParam == WM_LBUTTONDOWN || msg->lParam == WM_RBUTTONDOWN) { diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index ad21f0b80e..b3fa6beaf0 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -60,11 +60,11 @@ BOOL CALLBACK ProcessCLUIFrameInternalMsg(HWND hwnd, UINT msg, WPARAM wParam, LP UINT g_dwMainThreadID = 0; HANDLE g_hAwayMsgThread = nullptr, g_hGetTextAsyncThread = nullptr, g_hSmoothAnimationThread = nullptr; -BOOL g_bTransparentFlag = FALSE; - -BOOL g_mutex_bChangingMode = FALSE, g_mutex_bSizing = FALSE; - -BOOL g_flag_bOnModulesLoadedCalled = FALSE; +bool g_bSizing = false; +bool g_bTrimText = true; +bool g_bChangingMode = false; +bool g_bTransparentFlag = false; +bool g_bOnModulesLoadedCalled = false; RECT g_rcEdgeSizingRect = { 0 }; @@ -148,7 +148,7 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM, LPARAM) { cliCluiProtocolStatusChanged(0, nullptr); SleepEx(0, TRUE); - g_flag_bOnModulesLoadedCalled = TRUE; + g_bOnModulesLoadedCalled = true; SendMessage(g_clistApi.hwndContactList, UM_CREATECLC, 0, 0); // $$$ InitSkinHotKeys(); @@ -480,7 +480,7 @@ int CLUI_ShowWindowMod(HWND hWnd, int nCmd) AniAva_RemoveInvalidatedAvatars(); } - if (!g_mutex_bChangingMode && !g_CluiData.fLayered) { + if (!g_bChangingMode && !g_CluiData.fLayered) { if (nCmd == SW_HIDE && g_plugin.getByte("WindowShadow", SETTING_WINDOWSHADOW_DEFAULT)) { ShowWindow(hWnd, SW_MINIMIZE); // removing of shadow return ShowWindow(hWnd, nCmd); @@ -584,7 +584,7 @@ void CLUI_ChangeWindowMode() LONG_PTR curStyle, curStyleEx; if (!g_clistApi.hwndContactList) return; - g_mutex_bChangingMode = TRUE; + g_bChangingMode = true; g_bTransparentFlag = g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT); g_CluiData.fSmoothAnimation = db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) != 0; if (g_bTransparentFlag == 0 && g_CluiData.bCurrentAlpha != 0) @@ -710,8 +710,8 @@ void CLUI_ChangeWindowMode() RedrawWindow(g_clistApi.hwndContactList, nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_UPDATENOW | RDW_ALLCHILDREN); } - g_mutex_bChangingMode = FALSE; - flag_bFirstTimeCall = TRUE; + g_bChangingMode = false; + flag_bFirstTimeCall = true; AniAva_UpdateParent(); } @@ -789,8 +789,8 @@ int CLUI_ShowFromBehindEdge() { int method = g_CluiData.bBehindEdgeSettings; bShowEventStarted = 0; - if (g_mutex_bOnTrayRightClick) { - g_mutex_bOnTrayRightClick = 0; + if (g_bOnTrayRightClick) { + g_bOnTrayRightClick= false; return 0; } @@ -1447,7 +1447,7 @@ BOOL cliInvalidateRect(HWND hWnd, CONST RECT *lpRect, BOOL bErase) if (IsWindowVisible(hWnd)) return SkinInvalidateFrame(hWnd, lpRect); - g_flag_bFullRepaint = 1; + g_bFullRepaint = true; return 0; } @@ -1654,7 +1654,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) return TRUE; case WM_SIZE: - if (g_mutex_bSizing) return 0; + if (g_bSizing) return 0; if (wParam != SIZE_MINIMIZED /* && IsWindowVisible(m_hWnd)*/) { if (g_clistApi.hwndContactList == nullptr) return 0; @@ -1671,12 +1671,12 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) CallService(MS_SKINENG_UPTATEFRAMEIMAGE, (WPARAM)m_hWnd, 0); if (!g_CluiData.fLayered) { - g_mutex_bSizing = 1; + g_bSizing = true; Sync(CLUIFrames_OnClistResize_mod, (WPARAM)m_hWnd, 1); CLUIFrames_ApplyNewSizes(2); CLUIFrames_ApplyNewSizes(1); SendMessage(m_hWnd, CLN_LISTSIZECHANGE, 0, 0); - g_mutex_bSizing = 0; + g_bSizing = false; } // if g_CluiData.fDocked, dont remember pos (except for width) @@ -1734,7 +1734,7 @@ LRESULT CLUI::OnDwmCompositionChanged(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /* LRESULT CLUI::OnUpdate(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/) { - if (g_flag_bPostWasCanceled) + if (g_bPostWasCanceled) return FALSE; return ske_ValidateFrameImageProc(nullptr); } diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index b53f30731f..b93b536176 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -7,37 +7,37 @@ extern CLIST_INTERFACE corecli; -//Global variables +// Global variables extern int ON_SETALLEXTRAICON_CYCLE; -extern FRAMEWND *g_pfwFrames; extern int g_nFramesCount; +extern int g_nTitleBarHeight; +extern int g_mutex_bLockUpdating; extern RECT g_rcEdgeSizingRect; +extern bool g_bSizing; +extern bool g_bChangingMode; +extern bool g_bOnModulesLoadedCalled; +extern bool g_bOnTrayRightClick; +extern bool g_bPostWasCanceled; +extern bool g_bTransparentFlag; +extern bool g_bFullRepaint; +extern bool g_bMultiConnectionMode; +extern BYTE g_bCalledFromShowHide; +extern HWND g_hCLUIOptionsWnd; +extern UINT g_dwMainThreadID; +extern HWND g_hwndViewModeFrame; +extern bool g_bTrimText; +extern char *g_szConnectingProto; +extern HICON g_hListeningToIcon; +extern HANDLE g_hAwayMsgThread, g_hGetTextAsyncThread, g_hSmoothAnimationThread; extern ROWCELL *gl_RowTabAccess[]; extern ROWCELL *gl_RowRoot; +extern FRAMEWND *g_pfwFrames; +extern HINSTANCE g_hMirApp; extern HIMAGELIST hAvatarOverlays; -extern int g_nTitleBarHeight; -extern BOOL g_bTransparentFlag; extern HIMAGELIST g_himlCListClc; -extern BOOL g_mutex_bSizing; -extern BOOL g_flag_bOnModulesLoadedCalled; +extern STATUSBARDATA g_StatusBarData; extern SKINOBJECTSLIST g_SkinObjectList; extern CURRWNDIMAGEDATA *g_pCachedWindow; -extern BOOL g_mutex_bLockUpdating; -extern STATUSBARDATA g_StatusBarData; -extern char *g_szConnectingProto; -extern int g_mutex_bOnTrayRightClick; -extern BOOL g_flag_bPostWasCanceled; -extern BOOL g_flag_bFullRepaint; -extern BOOL g_bMultiConnectionMode; -extern BYTE g_bCalledFromShowHide; -extern HICON g_hListeningToIcon; -extern HWND g_hCLUIOptionsWnd; -extern HINSTANCE g_hMirApp; -extern BOOL g_mutex_bChangingMode; -extern UINT g_dwMainThreadID; -extern HANDLE g_hAwayMsgThread, g_hGetTextAsyncThread, g_hSmoothAnimationThread; -extern HWND g_hwndViewModeFrame; -extern BYTE gl_TrimText; /************************************************************************/ /* TYPE DEFS */ diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 8d98fe118d..c663e03164 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -61,9 +61,10 @@ struct tga_header_t SKINOBJECTSLIST g_SkinObjectList = { 0 }; CURRWNDIMAGEDATA *g_pCachedWindow = nullptr; -BOOL g_flag_bPostWasCanceled = FALSE; -BOOL g_flag_bFullRepaint = FALSE; -BOOL g_mutex_bLockUpdating = FALSE; +bool g_bPostWasCanceled = false; +bool g_bFullRepaint = false; + +int g_mutex_bLockUpdating = 0; SortedList *gl_plGlyphTexts = nullptr; SortedList *gl_plSkinFonts = nullptr; @@ -2763,7 +2764,7 @@ static INT_PTR ske_Service_UpdateFrameImage(WPARAM wParam, LPARAM) // if ((!NoCancelPost || !IsAnyQueued) && flag_bUpdateQueued) { // no any queued updating cancel post or need to cancel post flag_bUpdateQueued = 0; - g_flag_bPostWasCanceled = 1; + g_bPostWasCanceled = true; } return 1; } @@ -2812,10 +2813,10 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) } else Sync(QueueAllFramesUpdating, true); - if (!flag_bUpdateQueued || g_flag_bPostWasCanceled) + if (!flag_bUpdateQueued || g_bPostWasCanceled) if (PostMessage(g_clistApi.hwndContactList, UM_UPDATE, 0, 0)) { flag_bUpdateQueued = 1; - g_flag_bPostWasCanceled = 0; + g_bPostWasCanceled = false; } return 1; } @@ -3150,7 +3151,7 @@ int ske_ValidateFrameImageProc(RECT *r) //-- Clear queue Sync(QueueAllFramesUpdating, false); flag_bUpdateQueued = 0; - g_flag_bPostWasCanceled = 0; + g_bPostWasCanceled = false; return 1; } @@ -3178,8 +3179,8 @@ int ske_UpdateWindowImageRect(RECT *r) // Up if (!g_CluiData.fLayered) return ske_ReCreateBackImage(FALSE, nullptr); if (g_pCachedWindow == nullptr) return ske_ValidateFrameImageProc(&wnd); if (g_pCachedWindow->Width != wnd.right - wnd.left || g_pCachedWindow->Height != wnd.bottom - wnd.top) return ske_ValidateFrameImageProc(&wnd); - if (g_flag_bFullRepaint) { - g_flag_bFullRepaint = 0; + if (g_bFullRepaint) { + g_bFullRepaint = false; return ske_ValidateFrameImageProc(&wnd); } ske_JustUpdateWindowImageRect(&wnd); diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 81f41b2430..f0bdabe995 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -480,13 +480,13 @@ INT_PTR SvcApplySkin(WPARAM, LPARAM lParam) GetWindowRect(hwnd, &rc); Sync(CLUIFrames_OnMoving, hwnd, &rc); - g_mutex_bChangingMode = TRUE; + g_bChangingMode = TRUE; CLUI_UpdateLayeredMode(); CLUI_ChangeWindowMode(); SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged CLUI_ReloadCLUIOptions(); cliShowHide(true); - g_mutex_bChangingMode = FALSE; + g_bChangingMode = FALSE; if (g_hCLUIOptionsWnd) { SendDlgItemMessage(g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT)); diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index efbf5e77b3..493b5b6182 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -1,7 +1,5 @@ #include "stdafx.h" -BYTE gl_TrimText = 1; - char * __cdecl strstri(char *a, const char *b) { char * x, *y; -- cgit v1.2.3