diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-17 18:18:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-17 18:18:43 +0000 |
commit | 82cd0bd751e964a84746740abd03a419b8b80532 (patch) | |
tree | 428f54fcd54f752dc4ca2d5da7df61e3acc89af0 /src/core/stduserinfo | |
parent | a3c3a34d2bccc79dd1f6610af28e0a5c9ce48081 (diff) |
StdUserInfo not to crash when a UserInfo dialog remains opened on exit
git-svn-id: http://svn.miranda-ng.org/main/trunk@16842 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stduserinfo')
-rw-r--r-- | src/core/stduserinfo/src/contactinfo.cpp | 6 | ||||
-rw-r--r-- | src/core/stduserinfo/src/main.cpp | 4 | ||||
-rw-r--r-- | src/core/stduserinfo/src/stdinfo.cpp | 18 | ||||
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index 8b104b1a58..53d2fcfd67 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -445,14 +445,14 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
if (nm->iSubItem < 2)
break;
-
+
LVHITTESTINFO hti;
hti.pt.x = (short)LOWORD(GetMessagePos());
hti.pt.y = (short)HIWORD(GetMessagePos());
ScreenToClient(nm->hdr.hwndFrom, &hti.pt);
if (ListView_SubItemHitTest(nm->hdr.hwndFrom, &hti) == -1)
break;
-
+
LVITEM lvi;
lvi.mask = LVIF_PARAM;
lvi.iItem = hti.iItem;
@@ -460,7 +460,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ListView_GetItem(nm->hdr.hwndFrom, &lvi);
if (lvi.lParam == -1)
break;
-
+
if (lvi.lParam == -2) {
if (hti.iSubItem - 3 == (nm->hdr.idFrom == IDC_PHONES)) {
// add
diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp index 86c2b04f2d..1c3a0c8317 100644 --- a/src/core/stduserinfo/src/main.cpp +++ b/src/core/stduserinfo/src/main.cpp @@ -38,7 +38,7 @@ PLUGININFOEX pluginInfo = { __AUTHORWEB,
UNICODE_AWARE,
// {8198DC94-0BC4-448A-8495-8FE832C1D333}
- {0x8198dc94, 0xbc4, 0x448a, {0x84, 0x95, 0x8f, 0xe8, 0x32, 0xc1, 0xd3, 0x33 }}
+ { 0x8198dc94, 0xbc4, 0x448a, { 0x84, 0x95, 0x8f, 0xe8, 0x32, 0xc1, 0xd3, 0x33 } }
};
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
@@ -52,7 +52,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) return &pluginInfo;
}
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_UIUSERINFO, MIID_LAST};
+extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIUSERINFO, MIID_LAST };
extern "C" int __declspec(dllexport) Load(void)
{
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index 256bed8af2..558469bae1 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -99,28 +99,28 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule }
else if (special == SVS_MARITAL) {
switch (dbv.cVal) {
- case 0:
+ case 0:
ptstr = TranslateT("<not specified>");
break;
case 10:
ptstr = TranslateT("Single");
break;
- case 11:
+ case 11:
ptstr = TranslateT("Close relationships");
break;
- case 12:
+ case 12:
ptstr = TranslateT("Engaged");
break;
- case 20:
+ case 20:
ptstr = TranslateT("Married");
break;
- case 30:
+ case 30:
ptstr = TranslateT("Divorced");
break;
- case 31:
+ case 31:
ptstr = TranslateT("Separated");
break;
- case 40:
+ case 40:
ptstr = TranslateT("Widowed");
break;
case 50:
@@ -431,7 +431,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, char *szProto = GetContactProto(hContact);
if (szProto == NULL)
break;
-
+
bool proto_service = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC) == PF4_INFOSETTINGSVC;
SetValue(hwndDlg, IDC_WEBPAGE, hContact, szProto, "Homepage", SVS_ZEROISUNSPEC);
@@ -444,7 +444,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, mir_snprintf(idstr, "Past%d", i);
ptrT tszColText(Proto_GetContactInfoSettingStr(proto_service, hContact, szProto, idstr));
if (tszColText == NULL)
- break;
+ break;
mir_snprintf(idstr, "Past%dText", i);
ptrT tszText(db_get_tsa(hContact, szProto, idstr));
if (tszText == NULL)
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 99ee168917..947112d355 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -613,7 +613,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP static int ShutdownUserInfo(WPARAM, LPARAM)
{
- WindowList_BroadcastAsync(hWindowList, WM_DESTROY, 0, 0);
+ WindowList_Broadcast(hWindowList, WM_DESTROY, 0, 0);
WindowList_Destroy(hWindowList);
return 0;
}
|