diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-07 17:46:30 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-07 17:46:34 +0300 |
commit | 284358c4d7ec6c8ba67c26db905226a264cf788c (patch) | |
tree | 8a60d58fc83b7d545e5cf6ea36b00cb0293f5491 /plugins/UserInfoEx/src | |
parent | 5208a474e078e49d3583a4fe90e150e5a878d36f (diff) |
fixes #3873 (UserInfoEx: перевод не помещается)
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTree.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_propsheet.cpp | 36 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/init.cpp | 3 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/psp_options.cpp | 10 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/resource.h | 1 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/stdafx.h | 3 |
6 files changed, 15 insertions, 40 deletions
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<CMPlugin> CMOption<bool> bCheckVersion, bMetaScan, bButtonIcons, bEmailService;
// Prop sheet options
- CMOption<bool> bShowColours, bTreeGroups, bSortTree, bReadOnly, bChangeDetails, bAero;
+ CMOption<bool> bShowColours, bTreeGroups, bSortTree, bReadOnly, bAero;
CMOption<uint32_t> clrNormal, clrCustom, clrBoth, clrChanged, clrMeta;
// Reminder options
@@ -180,7 +180,6 @@ struct CMPlugin : public PLUGIN<CMPlugin> 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
|