diff options
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r-- | plugins/UserInfoEx/src/Flags/svc_flags.cpp | 1 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_propsheet.cpp | 82 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/psp_options.cpp | 2 |
3 files changed, 37 insertions, 48 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index da66562cf0..48c0eb8936 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -476,7 +476,6 @@ static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L //hookProc ME_OPT_INITIALISE
static int ExtraImgOptInit(WPARAM wParam,LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp = { 0 };
return 0;
}
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 3582c99a10..79fb013ac6 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -460,59 +460,59 @@ static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProt odp.ptszTitle = szTitle;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_GENERAL);
- odp.position = 0x8000000;
- odp.pfnDlgProc = PSPProcGeneral;
- odp.hIcon = (HICON)ICONINDEX(IDI_TREE_GENERAL);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_GENERAL);
+ odp.position = 0x8000000;
+ odp.pfnDlgProc = PSPProcGeneral;
+ odp.hIcon = (HICON)ICONINDEX(IDI_TREE_GENERAL);
mir_tcsncpy(szTitle + ofs, LPGENT("General"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ADDRESS);
- odp.position = 0x8000001;
- odp.pfnDlgProc = PSPProcContactHome;
- odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ADDRESS);
+ odp.position = 0x8000001;
+ odp.pfnDlgProc = PSPProcContactHome;
+ odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
mir_tcsncpy(szTitle + ofs, LPGENT("General") _T("\\") LPGENT("Contact (private)"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ORIGIN);
- odp.position = 0x8000002;
- odp.pfnDlgProc = PSPProcOrigin;
- odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADVANCED);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ORIGIN);
+ odp.position = 0x8000002;
+ odp.pfnDlgProc = PSPProcOrigin;
+ odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADVANCED);
mir_tcsncpy(szTitle + ofs, LPGENT("General") _T("\\") LPGENT("Origin"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ANNIVERSARY);
- odp.position = 0x8000003;
- odp.pfnDlgProc = PSPProcAnniversary;
- odp.hIcon = (HICON)ICONINDEX(IDI_BIRTHDAY);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ANNIVERSARY);
+ odp.position = 0x8000003;
+ odp.pfnDlgProc = PSPProcAnniversary;
+ odp.hIcon = (HICON)ICONINDEX(IDI_BIRTHDAY);
mir_tcsncpy(szTitle + ofs, LPGENT("General") _T("\\") LPGENT("Anniversaries"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_COMPANY);
- odp.position = 0x8000004;
- odp.pfnDlgProc = PSPProcCompany;
- odp.hIcon = (HICON)ICONINDEX(IDI_TREE_COMPANY);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_COMPANY);
+ odp.position = 0x8000004;
+ odp.pfnDlgProc = PSPProcCompany;
+ odp.hIcon = (HICON)ICONINDEX(IDI_TREE_COMPANY);
mir_tcsncpy(szTitle + ofs, LPGENT("Work"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ADDRESS);
- odp.position = 0x8000005;
- odp.pfnDlgProc = PSPProcContactWork;
- odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ADDRESS);
+ odp.position = 0x8000005;
+ odp.pfnDlgProc = PSPProcContactWork;
+ odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
mir_tcsncpy(szTitle + ofs, LPGENT("Work") _T("\\") LPGENT("Contact (Work)"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ABOUT);
- odp.position = 0x8000006;
- odp.pfnDlgProc = PSPProcAbout;
- odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ABOUT);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ABOUT);
+ odp.position = 0x8000006;
+ odp.pfnDlgProc = PSPProcAbout;
+ odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ABOUT);
mir_tcsncpy(szTitle + ofs, LPGENT("About"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_PROFILE);
- odp.position = 0x8000007;
- odp.pfnDlgProc = PSPProcContactProfile;
- odp.hIcon = (HICON)ICONINDEX(IDI_TREE_PROFILE);
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_PROFILE);
+ odp.position = 0x8000007;
+ odp.pfnDlgProc = PSPProcContactProfile;
+ odp.hIcon = (HICON)ICONINDEX(IDI_TREE_PROFILE);
mir_tcsncpy(szTitle + ofs, LPGENT("About") _T("\\") LPGENT("Profile"), SIZEOF(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
return 0;
@@ -529,32 +529,22 @@ static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProt static int InitDetails(WPARAM wParam, LPARAM lParam)
{
CPsHdr* pPsh = (CPsHdr*)wParam;
-
if (!(pPsh->_dwFlags & PSF_PROTOPAGESONLY)) {
-
- OPTIONSDIALOGPAGE odp;
BYTE bChangeDetailsEnabled = myGlobals.CanChangeDetails && db_get_b(NULL, MODNAME, SET_PROPSHEET_CHANGEMYDETAILS, FALSE);
-
- // important to avoid craches!!
- ZeroMemory(&odp, sizeof(odp));
-
if (lParam || bChangeDetailsEnabled) {
- odp.cbSize = sizeof(odp);
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = ghInst;
odp.flags = ODPF_ICON | ODPF_TCHAR;
odp.ptszGroup = IcoLib_GetDefaultIconFileName();
if (lParam) {
-
// ignore common pages for weather contacts
- if (!pPsh->_pszProto || _stricmp(pPsh->_pszProto, "weather"))
- {
+ if (!pPsh->_pszProto || _stricmp(pPsh->_pszProto, "weather")) {
AddProtocolPages(odp, wParam);
odp.ptszTitle = LPGENT("About") _T("\\") LPGENT("Notes");
}
- else {
- odp.ptszTitle = LPGENT("Notes");
- }
+ else odp.ptszTitle = LPGENT("Notes");
+
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ABOUT);
odp.position = 0x8000008;
odp.pfnDlgProc = PSPProcMyNotes;
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index 76356d6316..2477eb66fc 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -1225,7 +1225,7 @@ static int OnInitOptions(WPARAM wParam, LPARAM lParam) {
DlgContactInfoInitTreeIcons();
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 95400;
odp.hInstance = ghInst;
odp.pszTitle = MODNAME;
|