From 284358c4d7ec6c8ba67c26db905226a264cf788c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 7 Nov 2023 17:46:30 +0300 Subject: =?UTF-8?q?fixes=20#3873=20(UserInfoEx:=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=20=D0=BD=D0=B5=20=D0=BF=D0=BE=D0=BC=D0=B5?= =?UTF-8?q?=D1=89=D0=B0=D0=B5=D1=82=D1=81=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/UserInfoEx/src/classPsTree.cpp | 2 +- plugins/UserInfoEx/src/dlg_propsheet.cpp | 36 ++++++++++---------------------- plugins/UserInfoEx/src/init.cpp | 3 +-- plugins/UserInfoEx/src/psp_options.cpp | 10 +-------- plugins/UserInfoEx/src/resource.h | 1 - plugins/UserInfoEx/src/stdafx.h | 3 +-- 6 files changed, 15 insertions(+), 40 deletions(-) (limited to 'plugins/UserInfoEx/src') diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp index b31247fe1d..9dc874d8eb 100644 --- a/plugins/UserInfoEx/src/classPsTree.cpp +++ b/plugins/UserInfoEx/src/classPsTree.cpp @@ -165,7 +165,7 @@ uint8_t CPsTree::InitTreeItems(LPWORD needWidth) } // init the groups - if ((_dwFlags & PSTVF_GROUPS) || (!_pPs->hContact && myGlobals.CanChangeDetails)) { + if (_dwFlags & PSTVF_GROUPS) { // set treeview styles TreeView_SetIndent(_hWndTree, 3); SetWindowLongPtr(_hWndTree, GWL_STYLE, GetWindowLongPtr(_hWndTree, GWL_STYLE) | TVS_HASBUTTONS); diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index d541b37281..28fb93902e 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -382,26 +382,23 @@ static int InitDetails(WPARAM wParam, LPARAM lParam) { CPsHdr *pPsh = (CPsHdr *)wParam; if (!(pPsh->_dwFlags & PSF_PROTOPAGESONLY)) { - bool bChangeDetailsEnabled = myGlobals.CanChangeDetails && g_plugin.bChangeDetails; - if (lParam || bChangeDetailsEnabled) { + if (lParam) { USERINFOPAGE uip = {}; uip.flags = ODPF_ICON | ODPF_UNICODE; uip.szGroup.w = IcoLib_GetDefaultIconFileName(); uip.pPlugin = &g_plugin; - if (lParam) { - // ignore common pages for weather contacts - if (!pPsh->_pszProto || _stricmp(pPsh->_pszProto, "weather")) { - InitGeneralDlg(wParam, uip); - InitContactDlg(wParam, uip); - InitOriginDlg(wParam, uip); - InitAnniversaryDlg(wParam, uip); - InitCompanyDlg(wParam, uip); - InitOriginDlg(wParam, uip, false); - InitProfileDlg(wParam, uip); - } - else InitOriginDlg(wParam, uip, true); + // ignore common pages for weather contacts + if (!pPsh->_pszProto || _stricmp(pPsh->_pszProto, "weather")) { + InitGeneralDlg(wParam, uip); + InitContactDlg(wParam, uip); + InitOriginDlg(wParam, uip); + InitAnniversaryDlg(wParam, uip); + InitCompanyDlg(wParam, uip); + InitOriginDlg(wParam, uip, false); + InitProfileDlg(wParam, uip); } + else InitOriginDlg(wParam, uip, true); } } return 0; @@ -1214,14 +1211,6 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar EnableWindow(GetDlgItem(hDlg, IDAPPLY), FALSE); g_clistApi.pfnInvalidateDisplayNameCacheEntry(pPs->hContact); - // need to upload owners settings - if (!pPs->hContact && myGlobals.CanChangeDetails && g_plugin.bChangeDetails) { - if (pPs->pUpload = new CPsUpload(pPs, LOWORD(wParam) == IDOK)) { - if (pPs->pUpload->UploadFirst() == CPsUpload::UPLOAD_CONTINUE) - break; - MIR_DELETE(pPs->pUpload); - } - } pPs->dwFlags &= ~PSF_LOCKED; } if (LOWORD(wParam) == IDOK) @@ -1347,9 +1336,6 @@ void DlgContactInfoLoadModule() HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown); HookEvent(ME_USERINFO_INITIALISE, InitDetails); g_hWindowList = WindowList_Create(); - - // check whether changing my details via UserInfoEx is basically possible - myGlobals.CanChangeDetails = false; } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index 508b062184..46cf5dd029 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -62,8 +62,7 @@ CMPlugin::CMPlugin() : bSortTree(MODULENAME, "TreeSortItems", false), bTreeGroups(MODULENAME, "TreeGroups", true), bShowColours(MODULENAME, "ShowColours", true), - bChangeDetails(MODULENAME, "ChangeMyDetails", false), - + clrBoth(MODULENAME, "colourBoth", RGB(0, 160, 10)), clrMeta(MODULENAME, "colourMeta", RGB(120, 40, 130)), clrCustom(MODULENAME, "colourUser", RGB(0, 10, 130)), diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index c065e953d4..bb73b26171 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -244,7 +244,7 @@ public: class CDetailsOptsDlg : public CDlgBase { - CCtrlCheck chkClr, chkGroups, chkSortTree, chkAero, chkReadonly, chkChange; + CCtrlCheck chkClr, chkGroups, chkSortTree, chkAero, chkReadonly; CCtrlColor clrNormal, clrCustom, clrBoth, clrChanged, clrMeta; public: @@ -253,7 +253,6 @@ public: chkClr(this, CHECK_OPT_CLR), chkAero(this, CHECK_OPT_AEROADAPTION), chkGroups(this, CHECK_OPT_GROUPS), - chkChange(this, CHECK_OPT_CHANGEMYDETAILS), chkReadonly(this, CHECK_OPT_READONLY), chkSortTree(this, CHECK_OPT_SORTTREE), @@ -266,7 +265,6 @@ public: CreateLink(chkClr, g_plugin.bShowColours); CreateLink(chkAero, g_plugin.bAero); CreateLink(chkGroups, g_plugin.bTreeGroups); - CreateLink(chkChange, g_plugin.bChangeDetails); CreateLink(chkReadonly, g_plugin.bReadOnly); CreateLink(chkSortTree, g_plugin.bSortTree); @@ -279,12 +277,6 @@ public: chkClr.OnChange = Callback(this, &CDetailsOptsDlg::onChange_Clr); } - bool OnInitDialog() override - { - chkChange.Enable(myGlobals.CanChangeDetails); - return true; - } - void onChange_Clr(CCtrlCheck *pCheck) { const int idCtrl[] = { CLR_NORMAL, CLR_USER, CLR_BOTH, CLR_CHANGED, CLR_META, TXT_OPT_CLR_NORMAL, diff --git a/plugins/UserInfoEx/src/resource.h b/plugins/UserInfoEx/src/resource.h index 7303f1affc..99dc3da271 100644 --- a/plugins/UserInfoEx/src/resource.h +++ b/plugins/UserInfoEx/src/resource.h @@ -283,7 +283,6 @@ #define CHECK_OPT_GROUPS 40110 #define CHECK_OPT_SORTTREE 40111 #define CHECK_OPT_READONLY 40112 -#define CHECK_OPT_CHANGEMYDETAILS 40113 #define CHECK_OPT_METACPY 40114 #define CHECK_OPT_AEROADAPTION 40114 #define CHECK_OPT_METASCAN 40115 diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h index 8475aca800..72b5565432 100644 --- a/plugins/UserInfoEx/src/stdafx.h +++ b/plugins/UserInfoEx/src/stdafx.h @@ -114,7 +114,7 @@ struct CMPlugin : public PLUGIN CMOption bCheckVersion, bMetaScan, bButtonIcons, bEmailService; // Prop sheet options - CMOption bShowColours, bTreeGroups, bSortTree, bReadOnly, bChangeDetails, bAero; + CMOption bShowColours, bTreeGroups, bSortTree, bReadOnly, bAero; CMOption clrNormal, clrCustom, clrBoth, clrChanged, clrMeta; // Reminder options @@ -180,7 +180,6 @@ struct CMPlugin : public PLUGIN struct MGLOBAL { - uint8_t CanChangeDetails : 1; // is service to upload own contact information for icq present? uint8_t TzIndexExist : 1; // Win Reg has Timzone Index Info uint8_t ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value uint8_t WantAeroAdaption : 1; // reserved for later use -- cgit v1.2.3