summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-03 15:44:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-03 15:44:40 +0000
commit914e0b89c4aa13461d4f36fdfcb1b49bb3f00456 (patch)
tree82e26a44d5494700d4077295468051fb41dccd85 /plugins/Db3x_mmap
parent2cbc7f36727cc86800c0866df859a0ab473b678e (diff)
- META_PROTO/Default went to cache;
- MIDatabase::MetaSetDefault method added to store the default sub in a database; - Meta_SettingChanged fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@8380 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap')
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp9
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp
index ebdc9c6cfd..d05dac5555 100644
--- a/plugins/Db3x_mmap/src/dbcontacts.cpp
+++ b/plugins/Db3x_mmap/src/dbcontacts.cpp
@@ -208,6 +208,11 @@ BOOL CDb3Mmap::MetaDetouchSub(DBCachedContact *cc, int nSub)
return 0;
}
+BOOL CDb3Mmap::MetaSetDefault(DBCachedContact *cc)
+{
+ return db_set_dw(cc->contactID, META_PROTO, "Default", cc->nDefault);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// contacts convertor
@@ -279,8 +284,8 @@ void CDb3Mmap::FillContacts()
cc->pSubs[i] = hSub;
}
}
- cc->activeID = (0 != GetContactSetting(dwContactID, META_PROTO, "Default", &dbv)) ? NULL : dbv.dVal;
- cc->parentID = (0 != GetContactSetting(dwContactID, META_PROTO, "Handle", &dbv)) ? NULL : dbv.dVal;
+ cc->nDefault = (0 != GetContactSetting(dwContactID, META_PROTO, "Default", &dbv)) ? -1 : dbv.dVal;
+ cc->parentID = (0 != GetContactSetting(dwContactID, META_PROTO, "ParentMeta", &dbv)) ? NULL : dbv.dVal;
// whether we need conversion or not
if (!GetContactSetting(dwContactID, META_PROTO, "MetaID", &dbv))
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h
index 986ac700d0..50821b6204 100644
--- a/plugins/Db3x_mmap/src/dbintf.h
+++ b/plugins/Db3x_mmap/src/dbintf.h
@@ -235,6 +235,7 @@ public:
STDMETHODIMP_(BOOL) IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting);
STDMETHODIMP_(BOOL) MetaDetouchSub(DBCachedContact *cc, int nSub);
+ STDMETHODIMP_(BOOL) MetaSetDefault(DBCachedContact *cc);
protected:
STDMETHODIMP_(BOOL) Start(DBCHeckCallback *callback);