diff options
author | George Hazan <george.hazan@gmail.com> | 2016-02-19 12:05:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-02-19 12:05:55 +0000 |
commit | 5b796cb19202cbd63634ff68bda89520a5efc0c3 (patch) | |
tree | d06195813c1c422bea0c673e6e58f098b2d739eb /plugins/YAMN/src/proto | |
parent | a886e1caf3d3d563b43aaa230144b3e8f40a3d4e (diff) |
YAMN:
- incorrect Unicode processing fixed;
- critical sections removed;
- translation fix;
- code cleaning;
git-svn-id: http://svn.miranda-ng.org/main/trunk@16308 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/proto')
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3opt.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index 14c24847ea..65730f6391 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -90,7 +90,8 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) if (CB_ERR == (index = SendMessage(hCombo, CB_GETCURSEL, 0, 0)))
break;
id = SendMessage(hCombo, CB_GETITEMDATA, (WPARAM)index, 0);
- EnterCriticalSection(&PluginRegCS);
+
+ mir_cslock lck(PluginRegCS);
for (PParser = FirstProtoPlugin; PParser != NULL; PParser = PParser->Next)
if (id == (INT_PTR)PParser->Plugin) {
SetDlgItemTextA(hDlg, IDC_STVER, PParser->Plugin->PluginInfo->Ver);
@@ -109,7 +110,6 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) SetDlgItemTextA(hDlg, IDC_STWWW, FParser->Plugin->PluginInfo->WWW == NULL ? "" : FParser->Plugin->PluginInfo->WWW);
break;
}
- LeaveCriticalSection(&PluginRegCS);
}
break;
case IDC_STWWW:
@@ -125,21 +125,18 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) }
case WM_SHOWWINDOW:
if (TRUE == (BOOL)wParam) {
- PYAMN_PROTOPLUGINQUEUE PParser;
- PYAMN_FILTERPLUGINQUEUE FParser;
- int index;
-
- EnterCriticalSection(&PluginRegCS);
- for (PParser = FirstProtoPlugin; PParser != NULL; PParser = PParser->Next) {
- index = SendDlgItemMessageA(hDlg, IDC_COMBOPLUGINS, CB_ADDSTRING, 0, (LPARAM)PParser->Plugin->PluginInfo->Name);
- index = SendDlgItemMessage(hDlg, IDC_COMBOPLUGINS, CB_SETITEMDATA, (WPARAM)index, (LPARAM)PParser->Plugin);
- }
- for (FParser = FirstFilterPlugin; FParser != NULL; FParser = FParser->Next) {
- index = SendDlgItemMessageA(hDlg, IDC_COMBOPLUGINS, CB_ADDSTRING, 0, (LPARAM)FParser->Plugin->PluginInfo->Name);
- index = SendDlgItemMessage(hDlg, IDC_COMBOPLUGINS, CB_SETITEMDATA, (WPARAM)index, (LPARAM)FParser->Plugin);
+ {
+ mir_cslock lck(PluginRegCS);
+ for (PYAMN_PROTOPLUGINQUEUE PParser = FirstProtoPlugin; PParser != NULL; PParser = PParser->Next) {
+ int index = SendDlgItemMessageA(hDlg, IDC_COMBOPLUGINS, CB_ADDSTRING, 0, (LPARAM)PParser->Plugin->PluginInfo->Name);
+ SendDlgItemMessage(hDlg, IDC_COMBOPLUGINS, CB_SETITEMDATA, (WPARAM)index, (LPARAM)PParser->Plugin);
+ }
+ for (PYAMN_FILTERPLUGINQUEUE FParser = FirstFilterPlugin; FParser != NULL; FParser = FParser->Next) {
+ int index = SendDlgItemMessageA(hDlg, IDC_COMBOPLUGINS, CB_ADDSTRING, 0, (LPARAM)FParser->Plugin->PluginInfo->Name);
+ SendDlgItemMessage(hDlg, IDC_COMBOPLUGINS, CB_SETITEMDATA, (WPARAM)index, (LPARAM)FParser->Plugin);
+ }
}
- LeaveCriticalSection(&PluginRegCS);
SendDlgItemMessage(hDlg, IDC_COMBOPLUGINS, CB_SETCURSEL, 0, 0);
SendMessage(hDlg, WM_COMMAND, MAKELONG(IDC_COMBOPLUGINS, CBN_SELCHANGE), 0);
break;
|