diff options
author | George Hazan <george.hazan@gmail.com> | 2024-08-21 18:39:35 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-08-21 18:39:35 +0300 |
commit | 561c12a5194c286a4c4cfad8f5c182e7e67ed939 (patch) | |
tree | abb73bb947fa4e924250455ddc2b5ea0d45e7356 /plugins/UserInfoEx | |
parent | a5b3d209fb582ee36fb592062d2fd8f1c064ab07 (diff) |
fixes #4585 (UInfoEx: remove ICQ/MRA support)
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r-- | plugins/UserInfoEx/res/resource.rc | 7 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_propsheet.cpp | 156 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_propsheet.h | 1 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/psp_general.cpp | 5 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/resource.h | 3 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_constants.cpp | 89 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_constants.h | 1 |
7 files changed, 4 insertions, 258 deletions
diff --git a/plugins/UserInfoEx/res/resource.rc b/plugins/UserInfoEx/res/resource.rc index e9632b8504..19d6d3700c 100644 --- a/plugins/UserInfoEx/res/resource.rc +++ b/plugins/UserInfoEx/res/resource.rc @@ -73,13 +73,6 @@ BEGIN COMBOBOX EDIT_MARITAL,193,49,101,76,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Partner:",IDC_STATIC,"Static",SS_SIMPLE,196,65,34,8
EDITTEXT EDIT_PARTNER,193,75,101,13,ES_AUTOHSCROLL
- CONTROL "Language skills",IDC_STATIC,"Static",SS_SIMPLE,196,100,97,8
- CONTROL "1.:",IDC_STATIC,"Static",SS_SIMPLE,159,115,31,8,WS_EX_RIGHT
- COMBOBOX EDIT_LANG1,193,113,101,89,CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- CONTROL "2.:",IDC_STATIC,"Static",SS_SIMPLE,159,133,31,8,WS_EX_RIGHT
- COMBOBOX EDIT_LANG2,193,131,101,73,CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- CONTROL "3.:",IDC_STATIC,"Static",SS_SIMPLE,159,151,31,8,WS_EX_RIGHT
- COMBOBOX EDIT_LANG3,193,149,101,58,CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END
IDD_CONTACT_ORIGIN DIALOGEX 0, 0, 300, 169
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 344b401f34..b76b6e435c 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -83,102 +83,6 @@ void CPsHdr::Free_pPages() }
/////////////////////////////////////////////////////////////////////////////////////////
-// class CPsUpload
-
-class CPsUpload
-{
-public:
- enum EPsUpReturn
- {
- UPLOAD_CONTINUE = 0,
- UPLOAD_FINISH = 1,
- UPLOAD_FINISH_CLOSE = 2
- };
-
-private:
- PROTOACCOUNT **_pPd;
- int _numProto;
- uint8_t _bExitAfterUploading;
- HANDLE _hUploading;
- LPPS _pPs;
-
- ////////////////////////////////////////////////////////////////////////////////////////
- // @name Upload
- // @class CPsUpload
- // @desc start upload process for the current protocol
- // @return 0 on success or 1 otherwise
-
- int Upload()
- {
- // check if icq is online
- if (!IsProtoOnline((*_pPd)->szModuleName))
- MsgBox(_pPs->hDlg, MB_ICON_WARNING, TranslateT("Upload details"),
- CMStringW(FORMAT, TranslateT("Protocol '%s' is offline"), _A2T((*_pPd)->szModuleName).get()),
- TranslateT("You are not currently connected to the MRA network.\nYou must be online in order to update your information on the server.\n\nYour changes will be saved to database only."));
-
- // start uploading process
- else _hUploading = 0;
-
- return 1;
- }
-
-public:
- ////////////////////////////////////////////////////////////////////////////////////////
- // @name CPsUpload
- // @class CPsUpload
- // @desc retrieves the list of installed protocols and initializes the class
- // @param pPs - the owning propertysheet
- // @param bExitAfter - whether the dialog is to close after upload or not
-
- CPsUpload(LPPS pPs, uint8_t bExitAfter)
- {
- _pPs = pPs;
- _pPd = nullptr;
- _numProto = 0;
- _hUploading = nullptr;
- _bExitAfterUploading = bExitAfter;
- }
-
- int UploadFirst()
- {
- // create a list of all protocols which support uploading contact information
- Proto_EnumAccounts(&_numProto, &_pPd);
- return UploadNext();
- }
-
- ////////////////////////////////////////////////////////////////////////////////////////
- // @name ~CPsUpload
- // @class CPsUpload
-
- ~CPsUpload()
- {
- _pPs->pUpload = nullptr;
- }
-
- ////////////////////////////////////////////////////////////////////////////////////////
- // @name Handle
- // @class CPsUpload
- // @desc returns the handle of the current upload process
- // @return handle of the current upload process
-
- __inline HANDLE Handle() const
- {
- return _hUploading;
- };
-
- ////////////////////////////////////////////////////////////////////////////////////////
- // @name UploadNext
- // @class CPsUpload
- // @desc Search the next protocol which supports uploading contact information
- // and start uploading. Delete the object if ready
-
- int UploadNext()
- {
- return _bExitAfterUploading ? UPLOAD_FINISH_CLOSE : UPLOAD_FINISH;
- }
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////
// propertysheet
// @name SortProc()
@@ -893,62 +797,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (!ack->hContact && ack->type == ACKTYPE_STATUS)
return DlgProc(hDlg, M_CHECKONLINE, NULL, NULL);
- switch (ack->type) {
- case ACKTYPE_SETINFO:
- if (ack->hContact != pPs->hContact || !pPs->pUpload || pPs->pUpload->Handle() != ack->hProcess)
- break;
- if (ack->result == ACKRESULT_SUCCESS) {
- ShowWindow(GetDlgItem(hDlg, TXT_UPDATING), SW_HIDE);
- KillTimer(hDlg, TIMERID_UPDATING);
- // upload next protocols contact information
- switch (pPs->pUpload->UploadNext()) {
- case CPsUpload::UPLOAD_FINISH_CLOSE:
- MIR_DELETE(pPs->pUpload);
- DestroyWindow(hDlg);
- case CPsUpload::UPLOAD_CONTINUE:
- return FALSE;
- case CPsUpload::UPLOAD_FINISH:
- MIR_DELETE(pPs->pUpload);
- break;
- }
- DlgProc(hDlg, M_CHECKONLINE, NULL, NULL);
- EnableWindow(pPs->pTree->Window(), TRUE);
- if (CPsTreeItem *pti = pPs->pTree->CurrentItem())
- EnableWindow(pti->Wnd(), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDOK), TRUE);
- pPs->dwFlags &= ~PSF_LOCKED;
- }
- else if (ack->result == ACKRESULT_FAILED) {
- MsgBox(hDlg, MB_ICON_WARNING,
- LPGENW("Upload MRA details"),
- LPGENW("Upload failed"),
- LPGENW("Your details were not uploaded successfully.\nThey were written to database only."));
- KillTimer(hDlg, TIMERID_UPDATING);
- ShowWindow(GetDlgItem(hDlg, TXT_UPDATING), SW_HIDE);
- DlgProc(hDlg, M_CHECKONLINE, NULL, NULL);
-
- // upload next protocols contact information
- switch (pPs->pUpload->UploadNext()) {
- case CPsUpload::UPLOAD_FINISH_CLOSE:
- MIR_DELETE(pPs->pUpload);
- DestroyWindow(hDlg);
- case CPsUpload::UPLOAD_CONTINUE:
- return 0;
- case CPsUpload::UPLOAD_FINISH:
- MIR_DELETE(pPs->pUpload);
- break;
- }
- if (CPsTreeItem *pti = pPs->pTree->CurrentItem())
- EnableWindow(pti->Wnd(), TRUE);
-
- // activate all controls again
- EnableWindow(pPs->pTree->Window(), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDOK), TRUE);
- pPs->dwFlags &= ~PSF_LOCKED;
- }
- break;
-
- case ACKTYPE_GETINFO:
+ if (ack->type == ACKTYPE_GETINFO) {
// is contact the owner of the dialog or any metasubcontact of the owner? skip handling otherwise!
if (ack->hContact != pPs->hContact) {
if (!g_plugin.bMetaScan)
@@ -963,8 +812,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (i == pPs->nSubContacts)
break;
}
- else
- iSubContact = 0;
+ else iSubContact = 0;
// if they're not gonna send any more ACK's don't let that mean we should crash
if (!pPs->infosUpdated || (!ack->hProcess && !ack->lParam)) {
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h index 824fa48868..0190b7988b 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.h +++ b/plugins/UserInfoEx/src/dlg_propsheet.h @@ -266,7 +266,6 @@ struct TPropSheet // controls
HWND hDlg;
CPsTree *pTree;
- CPsUpload *pUpload;
};
void DlgContactInfoInitTreeIcons();
diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp index e399575b98..333b82bd53 100644 --- a/plugins/UserInfoEx/src/psp_general.cpp +++ b/plugins/UserInfoEx/src/psp_general.cpp @@ -48,11 +48,6 @@ struct PSPGeneralDlg : public PSPBaseDlg // marital groupbox
GetMaritalList(&nList, &pList);
m_ctrlList->insert(CCombo::CreateObj(m_hwnd, EDIT_MARITAL, SET_CONTACT_MARITAL, DBVT_BYTE, pList, nList));
-
- GetLanguageList(&nList, &pList);
- m_ctrlList->insert(CCombo::CreateObj(m_hwnd, EDIT_LANG1, SET_CONTACT_LANG1, DBVT_WCHAR, pList, nList));
- m_ctrlList->insert(CCombo::CreateObj(m_hwnd, EDIT_LANG2, SET_CONTACT_LANG2, DBVT_WCHAR, pList, nList));
- m_ctrlList->insert(CCombo::CreateObj(m_hwnd, EDIT_LANG3, SET_CONTACT_LANG3, DBVT_WCHAR, pList, nList));
return true;
}
diff --git a/plugins/UserInfoEx/src/resource.h b/plugins/UserInfoEx/src/resource.h index 99dc3da271..c778693981 100644 --- a/plugins/UserInfoEx/src/resource.h +++ b/plugins/UserInfoEx/src/resource.h @@ -110,10 +110,7 @@ #define EDIT_AGE 1220
#define EDIT_REMIND 1221
#define EDIT_REMIND2 1222
-#define EDIT_LANG1 1223
#define EDIT_REMIND_SOUNDOFFSET 1223
-#define EDIT_LANG2 1224
-#define EDIT_LANG3 1225
#define EDIT_MARITAL 1226
#define EDIT_PARTNER 1227
#define EDIT_TIMEZONE 1228
diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index c1483c1a3c..6606822491 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -21,82 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-static IDSTRLIST TmplLanguages[] = {
- { 0, LPGENW("Unspecified"), nullptr},
- {55, LPGENW("Afrikaans"), nullptr},
- {58, LPGENW("Albanian"), nullptr},
- { 1, LPGENW("Arabic"), nullptr},
- {59, LPGENW("Armenian"), nullptr},
- {68, LPGENW("Azerbaijani"), nullptr},
- {72, LPGENW("Belorussian"), nullptr},
- { 2, LPGENW("Bhojpuri"), nullptr},
- {56, LPGENW("Bosnian"), nullptr},
- { 3, LPGENW("Bulgarian"), nullptr},
- { 4, LPGENW("Burmese"), nullptr},
- { 5, LPGENW("Cantonese"), nullptr},
- { 6, LPGENW("Catalan"), nullptr},
- {61, LPGENW("Chamorro"), nullptr},
- { 7, LPGENW("Chinese"), nullptr},
- { 8, LPGENW("Croatian"), nullptr},
- { 9, LPGENW("Czech"), nullptr},
- {10, LPGENW("Danish"), nullptr},
- {11, LPGENW("Dutch"), nullptr},
- {12, LPGENW("English"), nullptr},
- {13, LPGENW("Esperanto"), nullptr},
- {14, LPGENW("Estonian"), nullptr},
- {15, LPGENW("Farsi"), nullptr},
- {16, LPGENW("Finnish"), nullptr},
- {17, LPGENW("French"), nullptr},
- {18, LPGENW("Gaelic"), nullptr},
- {19, LPGENW("German"), nullptr},
- {20, LPGENW("Greek"), nullptr},
- {70, LPGENW("Gujarati"), nullptr},
- {21, LPGENW("Hebrew"), nullptr},
- {22, LPGENW("Hindi"), nullptr},
- {23, LPGENW("Hungarian"), nullptr},
- {24, LPGENW("Icelandic"), nullptr},
- {25, LPGENW("Indonesian"), nullptr},
- {26, LPGENW("Italian"), nullptr},
- {27, LPGENW("Japanese"), nullptr},
- {28, LPGENW("Khmer"), nullptr},
- {29, LPGENW("Korean"), nullptr},
- {69, LPGENW("Kurdish"), nullptr},
- {30, LPGENW("Lao"), nullptr},
- {31, LPGENW("Latvian"), nullptr},
- {32, LPGENW("Lithuanian"), nullptr},
- {65, LPGENW("Macedonian"), nullptr},
- {33, LPGENW("Malay"), nullptr},
- {63, LPGENW("Mandarin"), nullptr},
- {62, LPGENW("Mongolian"), nullptr},
- {34, LPGENW("Norwegian"), nullptr},
- {57, LPGENW("Persian"), nullptr},
- {35, LPGENW("Polish"), nullptr},
- {36, LPGENW("Portuguese"), nullptr},
- {60, LPGENW("Punjabi"), nullptr},
- {37, LPGENW("Romanian"), nullptr},
- {38, LPGENW("Russian"), nullptr},
- {39, LPGENW("Serbo-Croatian"), nullptr},
- {66, LPGENW("Sindhi"), nullptr},
- {40, LPGENW("Slovak"), nullptr},
- {41, LPGENW("Slovenian"), nullptr},
- {42, LPGENW("Somali"), nullptr},
- {43, LPGENW("Spanish"), nullptr},
- {44, LPGENW("Swahili"), nullptr},
- {45, LPGENW("Swedish"), nullptr},
- {46, LPGENW("Tagalog"), nullptr},
- {64, LPGENW("Taiwanese"), nullptr},
- {71, LPGENW("Tamil"), nullptr},
- {47, LPGENW("Tatar"), nullptr},
- {48, LPGENW("Thai"), nullptr},
- {49, LPGENW("Turkish"), nullptr},
- {50, LPGENW("Ukrainian"), nullptr},
- {51, LPGENW("Urdu"), nullptr},
- {52, LPGENW("Vietnamese"), nullptr},
- {67, LPGENW("Welsh"), nullptr},
- {53, LPGENW("Yiddish"), nullptr},
- {54, LPGENW("Yoruba"), nullptr},
-};
-
static IDSTRLIST TmplOccupations[] = {
{ 0, LPGENW("Unspecified"), nullptr},
{ 1, LPGENW("Academic"), nullptr},
@@ -111,7 +35,7 @@ static IDSTRLIST TmplOccupations[] = { {10, LPGENW("Government"), nullptr},
{11, LPGENW("High School Student"), nullptr},
{12, LPGENW("Home"), nullptr},
- {13, LPGENW("MRA - Providing Help"), nullptr},
+ {13, LPGENW("Providing Help"), nullptr},
{14, LPGENW("Law"), nullptr},
{15, LPGENW("Managerial"), nullptr},
{16, LPGENW("Manufacturing"), nullptr},
@@ -140,7 +64,7 @@ static IDSTRLIST TmplInterests[] = { {106, LPGENW("Fitness"), nullptr},
{107, LPGENW("Games"), nullptr},
{108, LPGENW("Hobbies"), nullptr},
- {109, LPGENW("MRA - Providing Help"), nullptr},
+ {109, LPGENW("Providing Help"), nullptr},
{110, LPGENW("Internet"), nullptr},
{111, LPGENW("Lifestyle"), nullptr},
{112, LPGENW("Movies/TV"), nullptr},
@@ -334,14 +258,6 @@ INT_PTR GetMaritalList(LPUINT pnListSize, LPIDSTRLIST *pList) return MIR_OK;
}
-INT_PTR GetLanguageList(LPUINT pnListSize, LPIDSTRLIST *pList)
-{
- *pnListSize = _countof(TmplLanguages);
- *pList = TmplLanguages;
- SvcConstantsTranslateList(TmplLanguages, *pnListSize);
- return MIR_OK;
-}
-
INT_PTR GetOccupationList(LPUINT pnListSize, LPIDSTRLIST *pList)
{
*pnListSize = _countof(TmplOccupations);
@@ -389,7 +305,6 @@ void SvcConstantsLoadModule(void) // precache translation
GetMaritalList(&nListSize, &pList);
- GetLanguageList(&nListSize, &pList);
GetCountryList(&nListSize, &pList);
GetOccupationList(&nListSize, &pList);
GetInterestsList(&nListSize, &pList);
diff --git a/plugins/UserInfoEx/src/svc_constants.h b/plugins/UserInfoEx/src/svc_constants.h index 3edbed05d6..35fc29e981 100644 --- a/plugins/UserInfoEx/src/svc_constants.h +++ b/plugins/UserInfoEx/src/svc_constants.h @@ -156,7 +156,6 @@ typedef struct CIDList } IDSTRLIST, *LPIDSTRLIST;
INT_PTR GetMaritalList(LPUINT pListSize, LPIDSTRLIST *pList);
-INT_PTR GetLanguageList(LPUINT pListSize, LPIDSTRLIST *pList);
INT_PTR GetCountryList(LPUINT pListSize, LPIDSTRLIST *pList);
INT_PTR GetOccupationList(LPUINT pListSize, LPIDSTRLIST *pList);
INT_PTR GetInterestsList(LPUINT pListSize, LPIDSTRLIST *pList);
|