diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
commit | 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch) | |
tree | b1ee30b70c6e36d1a06aed6885cb80dc560a68ca /src/modules/clist | |
parent | f4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff) |
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/Docking.cpp | 6 | ||||
-rw-r--r-- | src/modules/clist/clc.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clcitems.cpp | 6 | ||||
-rw-r--r-- | src/modules/clist/clcutils.cpp | 6 | ||||
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clistsettings.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clisttray.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/clui.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/contact.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/contacts.cpp | 10 | ||||
-rw-r--r-- | src/modules/clist/genmenu.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 4 | ||||
-rw-r--r-- | src/modules/clist/groups.cpp | 56 | ||||
-rw-r--r-- | src/modules/clist/keyboard.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/movetogroup.cpp | 2 |
15 files changed, 56 insertions, 56 deletions
diff --git a/src/modules/clist/Docking.cpp b/src/modules/clist/Docking.cpp index 40e147ee1a..323ca4829d 100644 --- a/src/modules/clist/Docking.cpp +++ b/src/modules/clist/Docking.cpp @@ -156,9 +156,9 @@ int fnDocking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam) }
else
{
- DBDeleteContactSetting(NULL, "CList", "Docked");
- DBDeleteContactSetting(NULL, "CList", "DockX");
- DBDeleteContactSetting(NULL, "CList", "DockY");
+ db_unset(NULL, "CList", "Docked");
+ db_unset(NULL, "CList", "DockX");
+ db_unset(NULL, "CList", "DockY");
}
}
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp index b81523c3af..33e0c49989 100644 --- a/src/modules/clist/clc.cpp +++ b/src/modules/clist/clc.cpp @@ -188,7 +188,7 @@ static int ClcIconsChanged(WPARAM, LPARAM) static INT_PTR SetInfoTipHoverTime(WPARAM wParam, LPARAM)
{
- DBWriteContactSettingWord(NULL, "CLC", "InfoTipHoverTime", (WORD) wParam);
+ db_set_w(NULL, "CLC", "InfoTipHoverTime", (WORD) wParam);
cli.pfnClcBroadcast(INTM_SETINFOTIPHOVERTIME, wParam, 0);
return 0;
}
diff --git a/src/modules/clist/clcitems.cpp b/src/modules/clist/clcitems.cpp index d4b8e83a4e..f2e6dac894 100644 --- a/src/modules/clist/clcitems.cpp +++ b/src/modules/clist/clcitems.cpp @@ -228,7 +228,7 @@ void fnAddContactToTree(HWND hwnd, struct ClcData *dat, HANDLE hContact, int upd if (szProto != NULL)
status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
- if (DBGetContactSettingTString(hContact, "CList", "Group", &dbv))
+ if (db_get_ts(hContact, "CList", "Group", &dbv))
group = &dat->list;
else {
group = cli.pfnAddGroup(hwnd, dat, dbv.ptszVal, (DWORD) - 1, 0, 0);
@@ -322,7 +322,7 @@ void fnDeleteItemFromTree(HWND hwnd, HANDLE hItem) int i, nameOffset;
if ( !IsHContactContact(hItem))
return;
- if (DBGetContactSettingTString(hItem, "CList", "Group", &dbv))
+ if (db_get_ts(hItem, "CList", "Group", &dbv))
return;
//decrease member counts of all parent groups too
@@ -374,7 +374,7 @@ void fnRebuildEntireList(HWND hwnd, struct ClcData *dat) hContact = db_find_first();
while (hContact) {
if (style & CLS_SHOWHIDDEN || !db_get_b(hContact, "CList", "Hidden", 0)) {
- if (DBGetContactSettingTString(hContact, "CList", "Group", &dbv))
+ if (db_get_ts(hContact, "CList", "Group", &dbv))
group = &dat->list;
else {
group = cli.pfnAddGroup(hwnd, dat, dbv.ptszVal, (DWORD) - 1, 0, 0);
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp index b4873b9d03..4de2705787 100644 --- a/src/modules/clist/clcutils.cpp +++ b/src/modules/clist/clcutils.cpp @@ -428,7 +428,7 @@ void fnEndRename(HWND, struct ClcData *dat, int save) cli.pfnInvalidateDisplayNameCacheEntry(contact->hContact);
TCHAR* otherName = cli.pfnGetContactDisplayName(contact->hContact, GCDNF_NOMYHANDLE);
if ( !text[0] || !lstrcmp(otherName, text))
- DBDeleteContactSetting(contact->hContact, "CList", "MyHandle");
+ db_unset(contact->hContact, "CList", "MyHandle");
else
db_set_ts(contact->hContact, "CList", "MyHandle", text);
mir_free(otherName);
@@ -697,7 +697,7 @@ void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour) cli.pfnGetDefaultFontSetting(i, lf, colour);
mir_snprintf(idstr, SIZEOF(idstr), "Font%dName", i);
- if ( !DBGetContactSettingTString(NULL, "CLC", idstr, &dbv)) {
+ if ( !db_get_ts(NULL, "CLC", idstr, &dbv)) {
lstrcpy(lf->lfFaceName, dbv.ptszVal);
mir_free(dbv.pszVal);
}
@@ -763,7 +763,7 @@ void fnLoadClcOptions(HWND hwnd, struct ClcData *dat) dat->hBmpBackground = NULL;
}
if (db_get_b(NULL, "CLC", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- if ( !DBGetContactSettingString(NULL, "CLC", "BkBitmap", &dbv)) {
+ if ( !db_get_s(NULL, "CLC", "BkBitmap", &dbv)) {
dat->hBmpBackground = (HBITMAP) CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM) dbv.pszVal);
mir_free(dbv.pszVal);
}
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 2039e7ca7f..edabd41796 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -633,7 +633,7 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) Proto_SetStatus(pa->szModuleName, cli.currentDesiredStatusMode);
}
NotifyEventHooks(hStatusModeChangeEvent, cli.currentDesiredStatusMode, 0);
- DBWriteContactSettingWord(NULL, "CList", "Status", (WORD)cli.currentDesiredStatusMode);
+ db_set_w(NULL, "CList", "Status", (WORD)cli.currentDesiredStatusMode);
return 1;
}
}
@@ -830,7 +830,7 @@ int fnGetProtoIndexByPos(PROTOCOLDESCRIPTOR **proto, int protoCnt, int Pos) _itoa(Pos, buf, 10);
DBVARIANT dbv;
- if ( !DBGetContactSettingString(NULL, "Protocols", buf, &dbv)) {
+ if ( !db_get_s(NULL, "Protocols", buf, &dbv)) {
for (int p=0; p < protoCnt; p++) {
if (lstrcmpA(proto[p]->szName, dbv.pszVal) == 0) {
db_free(&dbv);
diff --git a/src/modules/clist/clistsettings.cpp b/src/modules/clist/clistsettings.cpp index 8a2188ce69..606d8e6864 100644 --- a/src/modules/clist/clistsettings.cpp +++ b/src/modules/clist/clistsettings.cpp @@ -68,7 +68,7 @@ void fnCheckCacheItem(ClcCacheEntry *p) {
DBVARIANT dbv;
if (p->tszGroup == NULL) {
- if ( !DBGetContactSettingTString(p->hContact, "CList", "Group", &dbv)) {
+ if ( !db_get_ts(p->hContact, "CList", "Group", &dbv)) {
p->tszGroup = mir_tstrdup(dbv.ptszVal);
mir_free(dbv.ptszVal);
}
@@ -237,7 +237,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) return 0;
dbv.pszVal = NULL;
- if ( !DBGetContactSetting(hContact, "Protocol", "p", &dbv)) {
+ if ( !db_get(hContact, "Protocol", "p", &dbv)) {
if ( !strcmp(cws->szModule, dbv.pszVal)) {
cli.pfnInvalidateDisplayNameCacheEntry(hContact);
if ( !strcmp(cws->szSetting, "UIN") || !strcmp(cws->szSetting, "Nick") || !strcmp(cws->szSetting, "FirstName")
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 6373b1a193..2bb5356a60 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -271,7 +271,7 @@ int fnTrayIconInit(HWND hwnd) if (trayIconSetting == SETTING_TRAYICON_SINGLE) {
DBVARIANT dbv = { DBVT_DELETED };
char *szProto;
- if ( !DBGetContactSettingString(NULL, "CList", "PrimaryStatus", &dbv)
+ if ( !db_get_s(NULL, "CList", "PrimaryStatus", &dbv)
&& (averageMode < 0 || db_get_b(NULL, "CList", "AlwaysPrimary", 0)))
szProto = dbv.pszVal;
else
@@ -535,7 +535,7 @@ void fnTrayIconUpdateBase(const char *szChangedProto) {
DBVARIANT dbv = { DBVT_DELETED };
char *szProto;
- if (DBGetContactSettingString(NULL, "CList", "PrimaryStatus", &dbv))
+ if (db_get_s(NULL, "CList", "PrimaryStatus", &dbv))
szProto = NULL;
else
szProto = dbv.pszVal;
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index ab38b19c07..f99841a069 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -301,7 +301,7 @@ int LoadCLUIModule(void) wndclass.hIconSm = LoadSkinIcon(SKINICON_OTHER_MIRANDA);
RegisterClassEx(&wndclass);
- if (DBGetContactSettingTString(NULL, "CList", "TitleText", &dbv))
+ if (db_get_ts(NULL, "CList", "TitleText", &dbv))
lstrcpyn(titleText, _T(MIRANDANAME), SIZEOF(titleText));
else {
lstrcpyn(titleText, dbv.ptszVal, SIZEOF(titleText));
diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp index 01e60c94fc..209f8fc052 100644 --- a/src/modules/clist/contact.cpp +++ b/src/modules/clist/contact.cpp @@ -163,7 +163,7 @@ INT_PTR ContactChangeGroup(WPARAM wParam, LPARAM lParam) CallService(MS_CLUI_CONTACTDELETED, wParam, 0);
if ((HANDLE) lParam == NULL)
- DBDeleteContactSetting((HANDLE)wParam, "CList", "Group");
+ db_unset((HANDLE)wParam, "CList", "Group");
else {
grpChg.pszNewName = cli.pfnGetGroupName(lParam, NULL);
db_set_ts((HANDLE)wParam, "CList", "Group", grpChg.pszNewName);
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp index bcc2b6091a..d15bbd5e6c 100644 --- a/src/modules/clist/contacts.cpp +++ b/src/modules/clist/contacts.cpp @@ -49,9 +49,9 @@ static int GetDatabaseString(CONTACTINFO *ci, const char* setting, DBVARIANT* db }
if (ci->dwFlag & CNF_UNICODE)
- return DBGetContactSettingWString(ci->hContact, ci->szProto, setting, dbv);
+ return db_get_ws(ci->hContact, ci->szProto, setting, dbv);
- return DBGetContactSettingString(ci->hContact, ci->szProto, setting, dbv);
+ return db_get_s(ci->hContact, ci->szProto, setting, dbv);
}
static int ProcessDatabaseValueDefault(CONTACTINFO *ci, const char* setting)
@@ -70,7 +70,7 @@ static int ProcessDatabaseValueDefault(CONTACTINFO *ci, const char* setting) db_free(&dbv);
}
- if (DBGetContactSetting(ci->hContact, ci->szProto, setting, &dbv))
+ if (db_get(ci->hContact, ci->szProto, setting, &dbv))
return 1;
switch (dbv.type) {
@@ -146,7 +146,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) { if ( !GetDatabaseString(ci, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "CountryName" : "CompanyCountryName", &dbv))
return 0;
- if ( !DBGetContactSetting(ci->hContact, ci->szProto, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "Country" : "CompanyCountry", &dbv)) {
+ if ( !db_get(ci->hContact, ci->szProto, (ci->dwFlag & 0x7F) == CNF_COUNTRY ? "Country" : "CompanyCountry", &dbv)) {
if (dbv.type == DBVT_WORD) {
int i, countryCount;
struct CountryListEntry *countries;
@@ -513,7 +513,7 @@ int LoadContactsModule(void) nameOrder[i] = i;
DBVARIANT dbv;
- if ( !DBGetContactSetting(NULL, "Contact", "NameOrder", &dbv)) {
+ if ( !db_get(NULL, "Contact", "NameOrder", &dbv)) {
CopyMemory(nameOrder, dbv.pbVal, dbv.cpbVal);
db_free(&dbv);
}
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index 1ccb2da031..b7df40afcb 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -930,7 +930,7 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para // mi.pszName
mir_snprintf(DBString, SIZEOF(DBString), "%s_name", menuItemName);
- if ( !DBGetContactSettingTString(NULL, MenuNameItems, DBString, &dbv)) {
+ if ( !db_get_ts(NULL, MenuNameItems, DBString, &dbv)) {
if (_tcslen(dbv.ptszVal) > 0)
replaceStrT(pmi->CustomName, dbv.ptszVal);
db_free(&dbv);
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 3922e42533..7aea8fe0c6 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -114,7 +114,7 @@ static int SaveTree(HWND hwndDlg) if (lstrcmp(iod->name, iod->defname) != 0)
db_set_ts(NULL, MenuNameItems, DBString, iod->name);
else
- DBDeleteContactSetting(NULL, MenuNameItems, DBString);
+ db_unset(NULL, MenuNameItems, DBString);
runtimepos += 100;
}
@@ -264,7 +264,7 @@ static int BuildTree(HWND hwndDlg, int MenuObjectId, BOOL bReread) DBVARIANT dbv;
mir_snprintf(buf, SIZEOF(buf), "%s_name", menuItemName);
- if ( !DBGetContactSettingTString(NULL, MenuNameItems, buf, &dbv)) {
+ if ( !db_get_ts(NULL, MenuNameItems, buf, &dbv)) {
PD->name = mir_tstrdup(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp index 7a289603c2..eb221ae5c7 100644 --- a/src/modules/clist/groups.cpp +++ b/src/modules/clist/groups.cpp @@ -37,7 +37,7 @@ static int CountGroups(void) for (i=0;; i++) {
_itoa(i, str, 10);
- if (DBGetContactSetting(NULL, "CListGroups", str, &dbv))
+ if (db_get(NULL, "CListGroups", str, &dbv))
break;
db_free(&dbv);
}
@@ -54,7 +54,7 @@ static int GroupNameExists(const TCHAR *name, int skipGroup) if (i == skipGroup)
continue;
_itoa(i, idstr, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_ts(NULL, "CListGroups", idstr, &dbv))
break;
if ( !_tcscmp(dbv.ptszVal + 1, name)) {
db_free(&dbv);
@@ -76,7 +76,7 @@ static INT_PTR CreateGroup(WPARAM wParam, LPARAM lParam) const TCHAR* grpName = lParam ? (TCHAR*)lParam : TranslateT("New Group");
if (wParam) {
_itoa(wParam - 1, str, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", str, &dbv))
+ if (db_get_ts(NULL, "CListGroups", str, &dbv))
return 0;
mir_sntprintf(newBaseName, SIZEOF(newBaseName), _T("%s\\%s"), dbv.ptszVal + 1, grpName);
@@ -116,7 +116,7 @@ static INT_PTR GetGroupName2(WPARAM wParam, LPARAM lParam) static char name[128];
_itoa(wParam - 1, idstr, 10);
- if (DBGetContactSettingString(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_s(NULL, "CListGroups", idstr, &dbv))
return (INT_PTR) (char *) NULL;
lstrcpynA(name, dbv.pszVal + 1, SIZEOF(name));
if ((DWORD *) lParam != NULL)
@@ -132,7 +132,7 @@ TCHAR* fnGetGroupName(int idx, DWORD* pdwFlags) static TCHAR name[128];
_itoa(idx-1, idstr, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_ts(NULL, "CListGroups", idstr, &dbv))
return NULL;
lstrcpyn(name, dbv.ptszVal + 1, SIZEOF(name));
@@ -161,7 +161,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) //get the name
_itoa(wParam - 1, str, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", str, &dbv))
+ if (db_get_ts(NULL, "CListGroups", str, &dbv))
return 1;
lstrcpyn(name, dbv.ptszVal + 1, SIZEOF(name));
db_free(&dbv);
@@ -188,7 +188,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) hContact;
hContact = db_find_next(hContact))
{
- if (DBGetContactSettingTString(hContact, "CList", "Group", &dbv))
+ if (db_get_ts(hContact, "CList", "Group", &dbv))
continue;
if (_tcscmp(dbv.ptszVal, name))
@@ -205,7 +205,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) }
else
{
- DBDeleteContactSetting(hContact, "CList", "Group");
+ db_unset(hContact, "CList", "Group");
grpChg.pszNewName = NULL;
}
NotifyEventHooks(hGroupChangeEvent, (WPARAM)hContact, (LPARAM)&grpChg);
@@ -213,14 +213,14 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) //shuffle list of groups up to fill gap
for (i = wParam - 1;; i++) {
_itoa(i + 1, str, 10);
- if (DBGetContactSettingStringUtf(NULL, "CListGroups", str, &dbv))
+ if (db_get_utf(NULL, "CListGroups", str, &dbv))
break;
_itoa(i, str, 10);
- DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
+ db_set_utf(NULL, "CListGroups", str, dbv.pszVal);
db_free(&dbv);
}
_itoa(i, str, 10);
- DBDeleteContactSetting(NULL, "CListGroups", str);
+ db_unset(NULL, "CListGroups", str);
//rename subgroups
{
TCHAR szNewName[256];
@@ -229,7 +229,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) len = lstrlen(name);
for (i=0;; i++) {
_itoa(i, str, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", str, &dbv))
+ if (db_get_ts(NULL, "CListGroups", str, &dbv))
break;
if ( !_tcsncmp(dbv.ptszVal + 1, name, len) && dbv.pszVal[len + 1] == '\\' && _tcschr(dbv.ptszVal + len + 2, '\\') == NULL) {
if (szNewParent[0])
@@ -265,7 +265,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) //do the change
_itoa(groupId, idstr, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_ts(NULL, "CListGroups", idstr, &dbv))
return 1;
str[0] = dbv.pszVal[0] & 0x7F;
lstrcpyn(oldName, dbv.ptszVal + 1, SIZEOF(oldName));
@@ -295,7 +295,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) if (i == groupId)
continue;
_itoa(i, idstr, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_ts(NULL, "CListGroups", idstr, &dbv))
break;
if ( !_tcsncmp(dbv.ptszVal + 1, oldName, len) && dbv.ptszVal[len + 1] == '\\' && _tcschr(dbv.ptszVal + len + 2, '\\') == NULL) {
mir_sntprintf(szNewName, SIZEOF(szNewName), _T("%s\\%s"), szName, dbv.ptszVal + len + 2);
@@ -316,7 +316,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) *pszLastBackslash = '\0';
for (i=0;; i++) {
_itoa(i, idstr, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_ts(NULL, "CListGroups", idstr, &dbv))
break;
if ( !lstrcmp(dbv.ptszVal + 1, str)) {
if (i < groupId)
@@ -354,13 +354,13 @@ static INT_PTR SetGroupExpandedState(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
_itoa(wParam - 1, idstr, 10);
- if (DBGetContactSettingStringUtf(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_utf(NULL, "CListGroups", idstr, &dbv))
return 1;
if (lParam)
dbv.pszVal[0] |= GROUPF_EXPANDED;
else
dbv.pszVal[0] = dbv.pszVal[0] & ~GROUPF_EXPANDED;
- DBWriteContactSettingStringUtf(NULL, "CListGroups", idstr, dbv.pszVal);
+ db_set_utf(NULL, "CListGroups", idstr, dbv.pszVal);
db_free(&dbv);
return 0;
}
@@ -372,12 +372,12 @@ static INT_PTR SetGroupFlags(WPARAM wParam, LPARAM lParam) int flags, oldval, newval;
_itoa(wParam - 1, idstr, 10);
- if (DBGetContactSettingStringUtf(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_utf(NULL, "CListGroups", idstr, &dbv))
return 1;
flags = LOWORD(lParam) & HIWORD(lParam);
oldval = dbv.pszVal[0];
newval = dbv.pszVal[0] = ((oldval & ~HIWORD(lParam)) | flags) & 0x7f;
- DBWriteContactSettingStringUtf(NULL, "CListGroups", idstr, dbv.pszVal);
+ db_set_utf(NULL, "CListGroups", idstr, dbv.pszVal);
db_free(&dbv);
if ((oldval & GROUPF_HIDEOFFLINE) != (newval & GROUPF_HIDEOFFLINE))
cli.pfnLoadContactTree();
@@ -394,7 +394,7 @@ static INT_PTR MoveGroupBefore(WPARAM wParam, LPARAM lParam) if (wParam == 0 || (LPARAM) wParam == lParam)
return 0;
_itoa(wParam - 1, str, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", str, &dbv))
+ if (db_get_ts(NULL, "CListGroups", str, &dbv))
return 0;
szMoveName = dbv.ptszVal;
//shuffle list of groups up to fill gap
@@ -418,24 +418,24 @@ static INT_PTR MoveGroupBefore(WPARAM wParam, LPARAM lParam) if (shuffleDir == -1) {
for (i = shuffleFrom; i != shuffleTo; i++) {
_itoa(i + 1, str, 10);
- if (DBGetContactSettingStringUtf(NULL, "CListGroups", str, &dbv)) {
+ if (db_get_utf(NULL, "CListGroups", str, &dbv)) {
shuffleTo = i;
break;
}
_itoa(i, str, 10);
- DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
+ db_set_utf(NULL, "CListGroups", str, dbv.pszVal);
db_free(&dbv);
}
}
else {
for (i = shuffleFrom; i != shuffleTo; i--) {
_itoa(i - 1, str, 10);
- if (DBGetContactSettingStringUtf(NULL, "CListGroups", str, &dbv)) {
+ if (db_get_utf(NULL, "CListGroups", str, &dbv)) {
mir_free(szMoveName);
return 1;
} //never happens
_itoa(i, str, 10);
- DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
+ db_set_utf(NULL, "CListGroups", str, dbv.pszVal);
db_free(&dbv);
}
}
@@ -456,13 +456,13 @@ static INT_PTR BuildGroupMenu(WPARAM, LPARAM) int menuId, compareResult, menuItemCount;
MENUITEMINFO mii = { 0 };
- if (DBGetContactSettingStringUtf(NULL, "CListGroups", "0", &dbv))
+ if (db_get_utf(NULL, "CListGroups", "0", &dbv))
return (INT_PTR) (HMENU) NULL;
db_free(&dbv);
hRootMenu = CreateMenu();
for (groupId = 0;; groupId++) {
_itoa(groupId, idstr, 10);
- if (DBGetContactSettingTString(NULL, "CListGroups", idstr, &dbv))
+ if (db_get_ts(NULL, "CListGroups", idstr, &dbv))
break;
pNextField = dbv.ptszVal + 1;
@@ -547,12 +547,12 @@ int InitGroupServices(void) _itoa(i, str, 10);
DBVARIANT dbv;
- if (DBGetContactSettingStringUtf(NULL, "CListGroups", str, &dbv))
+ if (db_get_utf(NULL, "CListGroups", str, &dbv))
break;
if (dbv.pszVal[0] & 0x80)
{
dbv.pszVal[0] &= 0x7f;
- DBWriteContactSettingStringUtf(NULL, "CListGroups", str, dbv.pszVal);
+ db_set_utf(NULL, "CListGroups", str, dbv.pszVal);
}
db_free(&dbv);
}
diff --git a/src/modules/clist/keyboard.cpp b/src/modules/clist/keyboard.cpp index 2ac34532c1..93b9c1226e 100644 --- a/src/modules/clist/keyboard.cpp +++ b/src/modules/clist/keyboard.cpp @@ -34,7 +34,7 @@ static INT_PTR hkHideShow(WPARAM, LPARAM) INT_PTR hkSearch(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv = {0};
- if ( !DBGetContactSettingString(NULL, "CList", "SearchUrl", &dbv)) {
+ if ( !db_get_s(NULL, "CList", "SearchUrl", &dbv)) {
CallService(MS_UTILS_OPENURL, db_get_b(NULL, "CList", "HKSearchNewWnd", 0), (LPARAM)dbv.pszVal);
db_free(&dbv);
}
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp index fe5b43e933..b661c90c55 100644 --- a/src/modules/clist/movetogroup.cpp +++ b/src/modules/clist/movetogroup.cpp @@ -114,7 +114,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) _itoa(i, intname, 10);
DBVARIANT dbv;
- if (DBGetContactSettingTString(NULL, "CListGroups", intname, &dbv))
+ if (db_get_ts(NULL, "CListGroups", intname, &dbv))
break;
if (dbv.ptszVal[0])
|