summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-27 21:51:46 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-27 21:51:46 +0000
commit1fb0cd07fba1e8d6f9ac2ebe3b4f2e1c60acb81b (patch)
tree904c95b33e03e806aea734552281257768273a14 /plugins/UserInfoEx
parenta8e8aebfd4f53977873c72c2d828c2c1f505f10d (diff)
- metacontacts are always present;
- added META_PROTO constant for mc module name; - MS_MC_GETPROTOCOLNAME removed, because it always returns META_PROTO git-svn-id: http://svn.miranda-ng.org/main/trunk@8319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/commonheaders.h2
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp5
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp6
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp7
-rw-r--r--plugins/UserInfoEx/src/init.cpp7
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp7
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp1
7 files changed, 7 insertions, 28 deletions
diff --git a/plugins/UserInfoEx/src/commonheaders.h b/plugins/UserInfoEx/src/commonheaders.h
index f789243f8c..c46db24952 100644
--- a/plugins/UserInfoEx/src/commonheaders.h
+++ b/plugins/UserInfoEx/src/commonheaders.h
@@ -180,8 +180,6 @@ typedef struct _MGLOBAL
BYTE ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value
BYTE WantAeroAdaption : 1; // reserved for later use
BYTE UseDbxTree : 1; // use dbx_tree ?
- LPCSTR szMetaProto;
-
} MGLOBAL, *LPMGLOBAL;
extern HINSTANCE ghInst;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index b46b9a635f..d9188ee74e 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -1275,9 +1275,6 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case ACKTYPE_GETINFO:
// is contact the owner of the dialog or any metasubcontact of the owner? skip handling otherwise!
if (ack->hContact != pPs->hContact) {
- if (!myGlobals.szMetaProto)
- break;
-
if (!db_get_b(NULL, MODNAME, SET_META_SCAN, TRUE))
break;
@@ -1348,8 +1345,6 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*)lParam;
if (hContact != pPs->hContact) {
- if (!myGlobals.szMetaProto)
- break;
if (pPs->hContact != db_mc_getMeta(hContact))
break;
if (!db_get_b(NULL, MODNAME, SET_META_SCAN, TRUE))
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index a71efbfa07..d253876279 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -484,8 +484,6 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
if (xContact == NULL)
return ERROR_INVALID_PARAMS;
- LPSTR pszMetaProto = myGlobals.szMetaProto ? myGlobals.szMetaProto : "MetaContacts";
-
// delete last contact
db_free(&_dbvUID);
_hContact = INVALID_CONTACT_ID;
@@ -500,9 +498,9 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
MIR_FREE(_pszUIDKey);
// is contact a metacontact
- if (_pszAMPro && !strcmp(_pszAMPro, pszMetaProto) /*_xmlNode->FirstChildElement(XKEY_CONTACT)*/) {
+ if (_pszAMPro && !strcmp(_pszAMPro, META_PROTO)) {
TiXmlElement *xSub;
- proto(pszMetaProto);
+ proto(META_PROTO);
// meta contact must be uniquelly identified by its subcontacts
// the metaID may change during an export or import call
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
index f6b36c931f..6a5b667b26 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
@@ -329,12 +329,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
// add optional module, which is valid for at least one contact
/*/Filter/*/
- if ( mir_stricmp(p, USERINFO) &&
- mir_stricmp(p, MOD_MBIRTHDAY) &&
- // Meta is only valid as base Proto at this point
- mir_stricmp(p, myGlobals.szMetaProto) /*&&
- mir_stricmp(p, "Protocol")*/
- )
+ if (mir_stricmp(p, USERINFO) && mir_stricmp(p, MOD_MBIRTHDAY) && mir_stricmp(p, META_PROTO))
{
ExportTree_AddItem(hTree, hItemOptional, p, bImagesLoaded, 1);
break;
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp
index b2bb2f2708..63231377a0 100644
--- a/plugins/UserInfoEx/src/init.cpp
+++ b/plugins/UserInfoEx/src/init.cpp
@@ -71,16 +71,15 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
myGlobals.PopupActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS);
- // init meta contacts
- INT_PTR ptr = CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
- myGlobals.szMetaProto = (ptr != CALLSERVICE_NOTFOUND) ? (LPCSTR)ptr : NULL;
-
// options
OptionsLoadModule();
+
// create services to receive string lists of languages and timezones
SvcConstantsLoadModule();
+
// load module to remind user about birthday and a anniversary
SvcReminderOnModulesLoaded();
+
// load extended intagration services
SvcHomepageLoadModule();
SvcFlagsOnModulesLoaded();
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index d759ebaf9b..17f77c8161 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -48,9 +48,6 @@ MCONTACT Sub(MCONTACT hMetaContact, int idx)
MCONTACT GetMeta(MCONTACT hContact)
{
- if (!myGlobals.szMetaProto)
- return NULL;
-
return db_mc_getMeta(hContact);
}
@@ -196,9 +193,7 @@ bool IsEmpty(MCONTACT hContact, LPCSTR pszModule)
bool IsMeta(LPCSTR pszModule)
{
- if (myGlobals.szMetaProto)
- return !mir_strcmp(pszModule, myGlobals.szMetaProto);
- return !mir_strcmp(pszModule, "MetaContacts");
+ return !mir_strcmp(pszModule, META_PROTO);
}
/**
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index aaafe6e38e..bfc97a7e93 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -431,7 +431,6 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam
switch (uMsg) {
case WM_INITDIALOG:
TranslateDialogDefault(hDlg);
- EnableDlgItem(hDlg, CHECK_OPT_METASCAN, myGlobals.szMetaProto != NULL);
SendNotify_InfoChanged(hDlg);
return TRUE;