summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-30 06:26:04 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-30 06:26:04 +0000
commit52aaeadfa39092aef26d5458904e430617d4a42a (patch)
treed3e2a3de99b4aa802386eed8503cd3cae201588b /plugins/SendScreenshotPlus
parent5023d486be9fc4f61473f899b48ae97b6126ce40 (diff)
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13275 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus')
-rw-r--r--plugins/SendScreenshotPlus/src/ctrl_button.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
index 6f83eb5180..5a6911d71b 100644
--- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp
+++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
@@ -45,7 +45,7 @@ typedef struct TMBCtrl{
} BTNCTRL, *LPBTNCTRL;
// External theme methods and properties
-static CRITICAL_SECTION csTips;
+static mir_cs csTips;
static HWND hwndToolTips = NULL;
/**
@@ -379,7 +379,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
}
case WM_DESTROY:
if (bct) {
- EnterCriticalSection(&csTips);
+ mir_cslock lck(csTips);
if (hwndToolTips) {
TOOLINFO ti;
@@ -396,7 +396,6 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
hwndToolTips = NULL;
}
}
- LeaveCriticalSection(&csTips);
DestroyTheme(bct);
mir_free(bct);
}
@@ -508,7 +507,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
break;
case BUTTONADDTOOLTIP:
if (wParam) {
- EnterCriticalSection(&csTips);
+ mir_cslock lck(csTips);
if (!hwndToolTips)
hwndToolTips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL);
@@ -544,7 +543,6 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
ti.lpszText=(LPSTR)wParam;
SendMessage(hwndToolTips, TTM_ADDTOOLA, 0, (LPARAM)&ti);
}
- LeaveCriticalSection(&csTips);
}
break;
case BUTTONTRANSLATE:
@@ -628,7 +626,6 @@ void CtrlButtonUnloadModule()
{
if(!g_init) return;
g_init=false;
- DeleteCriticalSection(&csTips);
UnregisterClass(UINFOBUTTONCLASS, g_hSendSS);
}
@@ -646,6 +643,5 @@ void CtrlButtonLoadModule()/// @fixme : compatibility with UInfoEx is everything
wc.cbWndExtra = sizeof(LPBTNCTRL);
wc.style = CS_GLOBALCLASS;
RegisterClassEx(&wc);
- InitializeCriticalSection(&csTips);
}