diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-03 15:44:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-03 15:44:40 +0000 |
commit | 914e0b89c4aa13461d4f36fdfcb1b49bb3f00456 (patch) | |
tree | 82e26a44d5494700d4077295468051fb41dccd85 /plugins/Db3x_mmap/src/dbcontacts.cpp | |
parent | 2cbc7f36727cc86800c0866df859a0ab473b678e (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/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbcontacts.cpp | 9 |
1 files changed, 7 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))
|