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 /plugins/Clist_nicer/src | |
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 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/Include/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcopts.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistmenus.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistmod.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistopts.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clisttray.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiopts.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiservices.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/config.cpp | 40 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/contact.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/extBackg.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/viewmodes.cpp | 20 |
15 files changed, 61 insertions, 61 deletions
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index c63cd319d7..0eb0752233 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -2477,7 +2477,7 @@ int OnFrameTitleBarBackgroundChange() hBmpBackground = NULL;
}
if (cfg::getByte("FrameTitleBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
- if ( !DBGetContactSetting(NULL, "FrameTitleBar", "BkBitmap", &dbv)) {
+ if ( !db_get(NULL, "FrameTitleBar", "BkBitmap", &dbv)) {
hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)dbv.pszVal);
mir_free(dbv.pszVal);
}
diff --git a/plugins/Clist_nicer/src/Include/commonheaders.h b/plugins/Clist_nicer/src/Include/commonheaders.h index d92f07724b..a094b29235 100644 --- a/plugins/Clist_nicer/src/Include/commonheaders.h +++ b/plugins/Clist_nicer/src/Include/commonheaders.h @@ -183,7 +183,7 @@ extern ImageItem *g_glyphItem; all the bad free()'s to good ones, however it's still incorrect code. The reasons for not
changing them include:
- * DBFreeVariant has a CallService() lookup
+ * db_free has a CallService() lookup
* free() is executed in some large loops to do with clist creation of group data
* easy search and replace
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 757fa029f0..6f49e7c97c 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -248,7 +248,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) szProto = GetContactProto(hContact);
if (szProto) {
if ( !result )
- DBFreeVariant( &dbv );
+ db_free( &dbv );
if ( !( result = cfg::getTString(hContact, szProto, "YMsg", &dbv)) && lstrlen(dbv.ptszVal) > 1)
p->bStatusMsgValid = STATUSMSG_YIM;
else if ( !(result = cfg::getTString(hContact, szProto, "StatusDescr", &dbv)) && lstrlen(dbv.ptszVal) > 1)
@@ -260,7 +260,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) if (p->bStatusMsgValid == STATUSMSG_NOTFOUND) { // no status msg, consider xstatus name (if available)
if ( !result )
- DBFreeVariant( &dbv );
+ db_free( &dbv );
result = cfg::getTString(hContact, szProto, "XStatusName", &dbv);
if ( !result && lstrlen(dbv.ptszVal) > 1) {
int iLen = lstrlen(dbv.ptszVal);
@@ -306,7 +306,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) p->statusMsg[j] = (TCHAR)0;
}
if ( !result )
- DBFreeVariant( &dbv );
+ db_free( &dbv );
if (p->bStatusMsgValid != STATUSMSG_NOTFOUND) {
WORD infoTypeC2[12];
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index 49f569fd6c..5f249c17df 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -736,7 +736,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, if ( PathToAbsoluteT(dbv.ptszVal, szPath))
SetDlgItemText(hwndDlg, IDC_FILENAME, szPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
WORD bmpUse = cfg::getWord("CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
@@ -817,7 +817,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, COLORREF col;
col = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
if (col == CLCDEFAULT_BKCOLOUR)
- DBDeleteContactSetting(NULL, "CLC", "BkColour");
+ db_unset(NULL, "CLC", "BkColour");
else
cfg::writeDword("CLC", "BkColour", col);
cfg::writeByte("CLC", "UseWinColours", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_WINCOLOUR));
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index a9706be4c1..22f4e4ea75 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -251,12 +251,12 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA if ((iSel = SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_GETCURSEL, 0, 0)) != CB_ERR) {
if (iSel == 0) {
- DBDeleteContactSetting(hContact, "CList", "CLN_2ndline");
+ db_unset(hContact, "CList", "CLN_2ndline");
if (contact)
contact->bSecondLine = cfg::dat.dualRowMode;
}
else {
- DBWriteContactSettingByte(hContact, "CList", "CLN_2ndline", (BYTE)(iSel - 1));
+ db_set_b(hContact, "CList", "CLN_2ndline", (BYTE)(iSel - 1));
if (contact)
contact->bSecondLine = (BYTE)(iSel - 1);
}
@@ -332,7 +332,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA else if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSOFFLINE))
wApparentMode = ID_STATUS_OFFLINE;
- //DBWriteContactSettingWord(hContact, contact->proto, "ApparentMode", wApparentMode);
+ //db_set_w(hContact, contact->proto, "ApparentMode", wApparentMode);
//if (oldApparentMode != wApparentMode)
CallContactService(hContact, PSS_SETAPPARENTMODE, (WPARAM)wApparentMode, 0);
SendMessage(hWnd, WM_USER + 120, 0, 0);
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index e5e5ae8baf..ae022a4a7f 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -183,7 +183,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) clip = 5;
else
clip = 0;
- //clip = max(clip, DBGetContactSettingByte(NULL, "CLUI", "ignoreframepixels", 2));
+ //clip = max(clip, db_get_b(NULL, "CLUI", "ignoreframepixels", 2));
//rgn = CreateRoundRectRgn(rc.left + clip, rc.top + clip, rc.right - clip, rc.bottom - clip, 10 + clip, 10 + clip);
//rgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
//for (i = rc.top + 3 + clip; i < rc.bottom - 3 - clip; i += (height / iStepY)) {
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index a8210472bd..666b9b2ab8 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -106,7 +106,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP DBVARIANT dbv = {
DBVT_DELETED
};
- DBGetContactSetting(NULL, "CList", "PrimaryStatus", &dbv);
+ db_get(NULL, "CList", "PrimaryStatus", &dbv);
ProtoEnumAccounts( &count, &accs );
item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM) TranslateT("Global"));
SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM) 0);
@@ -191,7 +191,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP int cursel = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0);
if ( !pa )
- DBDeleteContactSetting(NULL, "CList", "PrimaryStatus");
+ db_unset(NULL, "CList", "PrimaryStatus");
else
cfg::writeString(NULL, "CList", "PrimaryStatus", pa->szModuleName );
}
diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp index 24edcfe047..9430ed1f56 100644 --- a/plugins/Clist_nicer/src/clisttray.cpp +++ b/plugins/Clist_nicer/src/clisttray.cpp @@ -108,7 +108,7 @@ void TrayIconUpdateBase(const char *szChangedProto) changed = pcli->pfnTrayIconSetBaseInfo(CopyIcon(hIcon), NULL);
else
changed = pcli->pfnTrayIconSetBaseInfo(ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL), NULL);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
break;
}
case SETTING_TRAYICON_CYCLE:
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index c4aa28a52e..843e27cccc 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -177,7 +177,7 @@ static HWND PreCreateCLC(HWND parent) WS_CHILD | CLS_CONTACTLIST
| (cfg::getByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0)
| CLS_HIDEOFFLINE
- //|(DBGetContactSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CLS_HIDEOFFLINE:0)
+ //|(db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CLS_HIDEOFFLINE:0)
| (cfg::getByte(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? CLS_HIDEEMPTYGROUPS : 0)
| CLS_MULTICOLUMN
, 0, 0, 0, 0, parent, NULL, g_hInst, (LPVOID)0xff00ff00);
@@ -451,7 +451,7 @@ void SetDBButtonStates(HANDLE hPassedContact) if ( !cfg::getString(hFinalContact, szModule, szSetting, &dbv)) {
result = !strcmp((char *)buttonItem->bValuePush, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
} else {
switch (buttonItem->type) {
@@ -884,12 +884,12 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l if (cfg::getByte("CList", "AutoApplyLastViewMode", 0)) {
DBVARIANT dbv = {0};
- if ( !DBGetContactSetting(NULL, "CList", "LastViewMode", &dbv)) {
+ if ( !db_get(NULL, "CList", "LastViewMode", &dbv)) {
if (lstrlenA(dbv.pszVal) > 2) {
if (cfg::getDword(NULL, CLVM_MODULE, dbv.pszVal, -1) != 0xffffffff)
ApplyViewMode((char *)dbv.pszVal);
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
if ( !cfg::dat.autosize)
@@ -1427,7 +1427,7 @@ skipbg: if (fDelete) {
//_DebugTraceA("delete value: %s, %s ON %d", szModule, szSetting, finalhContact);
- DBDeleteContactSetting(finalhContact, szModule, szSetting);
+ db_unset(finalhContact, szModule, szSetting);
} else {
switch (item->type) {
case DBVT_BYTE:
diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp index 15ad632d14..c2b5ced4d0 100644 --- a/plugins/Clist_nicer/src/cluiopts.cpp +++ b/plugins/Clist_nicer/src/cluiopts.cpp @@ -94,7 +94,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l DBVARIANT dbv;
if ( !cfg::getTString(NULL, "CList", "TitleText", &dbv)) {
SetDlgItemText(hwndDlg, IDC_TITLETEXT, dbv.ptszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
} else
SetDlgItemTextA(hwndDlg, IDC_TITLETEXT, MIRANDANAME);
}
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index b21bc4d392..8e373e9138 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -204,7 +204,7 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) }
// update the clui button
- if ( !DBGetContactSetting(NULL, "CList", "PrimaryStatus", &dbv)) {
+ if ( !db_get(NULL, "CList", "PrimaryStatus", &dbv)) {
if (dbv.type == DBVT_ASCIIZ && lstrlenA(dbv.pszVal) > 1) {
wStatus = (WORD) CallProtoService(dbv.pszVal, PS_GETSTATUS, 0, 0);
iIcon = IconFromStatusMode(dbv.pszVal, (int) wStatus, 0, &hIcon);
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp index e224682e70..c6b85f5468 100644 --- a/plugins/Clist_nicer/src/config.cpp +++ b/plugins/Clist_nicer/src/config.cpp @@ -84,7 +84,7 @@ void cfg::init() DWORD cfg::getDword(const HANDLE hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD uDefault = 0)
{
- return((DWORD)DBGetContactSettingDword(hContact, szModule, szSetting, uDefault));
+ return((DWORD)db_get_dw(hContact, szModule, szSetting, uDefault));
}
/*
@@ -93,7 +93,7 @@ DWORD cfg::getDword(const HANDLE hContact = 0, const char *szModule = 0, const c DWORD cfg::getDword(const char *szSetting = 0, DWORD uDefault = 0)
{
- return((DWORD)DBGetContactSettingDword(0, DEFAULT_MODULE, szSetting, uDefault));
+ return((DWORD)db_get_dw(0, DEFAULT_MODULE, szSetting, uDefault));
}
/*
@@ -102,13 +102,13 @@ DWORD cfg::getDword(const char *szSetting = 0, DWORD uDefault = 0) DWORD cfg::getDword(const char *szModule, const char *szSetting, DWORD uDefault)
{
- return((DWORD)DBGetContactSettingDword(0, szModule, szSetting, uDefault));
+ return((DWORD)db_get_dw(0, szModule, szSetting, uDefault));
}
WORD cfg::getWord(const HANDLE hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD uDefault = 0)
{
- return((WORD)DBGetContactSettingWord(hContact, szModule, szSetting, uDefault));
+ return((WORD)db_get_w(hContact, szModule, szSetting, uDefault));
}
/*
@@ -117,7 +117,7 @@ WORD cfg::getWord(const HANDLE hContact = 0, const char *szModule = 0, const cha WORD cfg::getWord(const char *szSetting = 0, WORD uDefault = 0)
{
- return((WORD)DBGetContactSettingWord(0, DEFAULT_MODULE, szSetting, uDefault));
+ return((WORD)db_get_w(0, DEFAULT_MODULE, szSetting, uDefault));
}
/*
@@ -126,7 +126,7 @@ WORD cfg::getWord(const char *szSetting = 0, WORD uDefault = 0) WORD cfg::getWord(const char *szModule, const char *szSetting, WORD uDefault)
{
- return((WORD)DBGetContactSettingWord(0, szModule, szSetting, uDefault));
+ return((WORD)db_get_w(0, szModule, szSetting, uDefault));
}
/*
@@ -134,27 +134,27 @@ WORD cfg::getWord(const char *szModule, const char *szSetting, WORD uDefault) */
int cfg::getByte(const HANDLE hContact = 0, const char *szModule = 0, const char *szSetting = 0, int uDefault = 0)
{
- return(DBGetContactSettingByte(hContact, szModule, szSetting, uDefault));
+ return(db_get_b(hContact, szModule, szSetting, uDefault));
}
int cfg::getByte(const char *szSetting = 0, int uDefault = 0)
{
- return(DBGetContactSettingByte(0, DEFAULT_MODULE, szSetting, uDefault));
+ return(db_get_b(0, DEFAULT_MODULE, szSetting, uDefault));
}
int cfg::getByte(const char *szModule, const char *szSetting, int uDefault)
{
- return(DBGetContactSettingByte(0, szModule, szSetting, uDefault));
+ return(db_get_b(0, szModule, szSetting, uDefault));
}
INT_PTR cfg::getTString(const HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
- return(DBGetContactSettingTString(hContact, szModule, szSetting, dbv));
+ return(db_get_ts(hContact, szModule, szSetting, dbv));
}
INT_PTR cfg::getString(const HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
- return(DBGetContactSettingString(hContact, szModule, szSetting, dbv));
+ return(db_get_s(hContact, szModule, szSetting, dbv));
}
/*
@@ -163,42 +163,42 @@ INT_PTR cfg::getString(const HANDLE hContact, const char *szModule, const char * INT_PTR cfg::writeDword(const HANDLE hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD value = 0)
{
- return(DBWriteContactSettingDword(hContact, szModule, szSetting, value));
+ return(db_set_dw(hContact, szModule, szSetting, value));
}
INT_PTR cfg::writeDword(const char *szModule = 0, const char *szSetting = 0, DWORD value = 0)
{
- return(DBWriteContactSettingDword(0, szModule, szSetting, value));
+ return(db_set_dw(0, szModule, szSetting, value));
}
INT_PTR cfg::writeWord(const HANDLE hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD value = 0)
{
- return(DBWriteContactSettingWord(hContact, szModule, szSetting, value));
+ return(db_set_w(hContact, szModule, szSetting, value));
}
INT_PTR cfg::writeWord(const char *szModule = 0, const char *szSetting = 0, WORD value = 0)
{
- return(DBWriteContactSettingWord(0, szModule, szSetting, value));
+ return(db_set_w(0, szModule, szSetting, value));
}
INT_PTR cfg::writeByte(const HANDLE hContact = 0, const char *szModule = 0, const char *szSetting = 0, BYTE value = 0)
{
- return(DBWriteContactSettingByte(hContact, szModule, szSetting, value));
+ return(db_set_b(hContact, szModule, szSetting, value));
}
INT_PTR cfg::writeByte(const char *szModule = 0, const char *szSetting = 0, BYTE value = 0)
{
- return(DBWriteContactSettingByte(0, szModule, szSetting, value));
+ return(db_set_b(0, szModule, szSetting, value));
}
INT_PTR cfg::writeTString(const HANDLE hContact, const char *szModule = 0, const char *szSetting = 0, const TCHAR *str = 0)
{
- return(DBWriteContactSettingTString(hContact, szModule, szSetting, str));
+ return(db_set_ts(hContact, szModule, szSetting, str));
}
INT_PTR cfg::writeString(const HANDLE hContact, const char *szModule = 0, const char *szSetting = 0, const char *str = 0)
{
- return(DBWriteContactSettingString(hContact, szModule, szSetting, str));
+ return(db_set_s(hContact, szModule, szSetting, str));
}
TExtraCache* cfg::getCache(const HANDLE hContact, const char *szProto)
@@ -211,7 +211,7 @@ TExtraCache* cfg::getCache(const HANDLE hContact, const char *szProto) TExtraCache *p = (TExtraCache*)calloc(sizeof(TExtraCache), 1);
p->hContact = hContact;
LoadSkinItemToCache(p, szProto);
- p->dwDFlags = DBGetContactSettingDword(hContact, "CList", "CLN_Flags", 0);
+ p->dwDFlags = db_get_dw(hContact, "CList", "CLN_Flags", 0);
GetCachedStatusMsg(p, const_cast<char *>(szProto));
p->dwLastMsgTime = INTSORT_GetLastMsgTime(hContact);
cfg::arCache.insert(p);
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index b6f3de75a3..b96be53a52 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -158,9 +158,9 @@ void LoadContactTree(void) pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL), 1);
if (mc_disablehgh && !mc_hgh_removed) {
- if ( !DBGetContactSetting(hContact, "CList", "Group", &dbv)) {
+ if ( !db_get(hContact, "CList", "Group", &dbv)) {
if ( !strcmp(dbv.pszVal, "MetaContacts Hidden Group"))
- DBDeleteContactSetting(hContact, "CList", "Group");
+ db_unset(hContact, "CList", "Group");
mir_free(dbv.pszVal);
}
}
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 771e36bba0..a41f0f5ff6 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -522,7 +522,7 @@ void extbk_export(char *file) if ( !cfg::getString(NULL, "CLC", "BkBitmap", &dbv)) {
WritePrivateProfileStringA("Global", "BkBitmap", dbv.pszVal, file);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -1177,7 +1177,7 @@ void IMG_LoadItems() WideCharToMultiByte(CP_ACP, 0, tszFileName, MAX_PATH, szFileName, MAX_PATH, 0, 0);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
if ( !PathFileExists(tszFileName))
return;
@@ -1273,14 +1273,14 @@ void LoadPerContactSkins(TCHAR *tszFileName) if ((INT_PTR) uid != CALLSERVICE_NOTFOUND && uid != NULL) {
DBVARIANT dbv = {0};
- DBGetContactSetting(hContact, szProto, uid, &dbv);
+ db_get(hContact, szProto, uid, &dbv);
switch(dbv.type) {
case DBVT_DWORD:
mir_snprintf(UIN, 40, "%d", dbv.dVal);
break;
case DBVT_ASCIIZ:
mir_snprintf(UIN, 40, "%s", dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
break;
default:
UIN[0] = 0;
@@ -1451,7 +1451,7 @@ static void ApplyCLUISkin() SetWindowPos(pcli->hwndContactList, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
SendMessage(pcli->hwndContactList, WM_SIZE, 0, 0);
RedrawWindow(pcli->hwndContactList, NULL, NULL, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN | RDW_ERASE);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
@@ -1484,7 +1484,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L if ( !cfg::getString(NULL, "CLC", "ContactSkins", &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_SKINFILE, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
Utils::enableDlgControl(hwndDlg, IDC_RELOAD, TRUE);
}
else
@@ -1492,7 +1492,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L CheckDlgButton(hwndDlg, IDC_USESKIN, cfg::getByte("CLUI", "useskin", 0) ? BST_CHECKED : BST_UNCHECKED);
if ( !cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
SetDlgItemText(hwndDlg, IDC_SKINFILENAME, dbv.ptszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
SetDlgItemText(hwndDlg, IDC_SKINFILENAME, _T(""));
@@ -1537,7 +1537,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L if ( !cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
if (_tcscmp(dbv.ptszVal, final_path))
skinChanged = TRUE;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
skinChanged = TRUE;
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 2e6809b847..d574c00e11 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -223,7 +223,7 @@ static int FillDialog(HWND hwnd) item.pszText = &dbv.ptszVal[1];
newItem = SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
ListView_SetColumnWidth(hwndList, 0, LVSCW_AUTOSIZE);
ListView_Arrange(hwndList, LVA_ALIGNLEFT | LVA_ALIGNTOP);
@@ -484,7 +484,7 @@ void UpdateFilters() mir_snprintf(szTemp, 100, Translate("Current view mode: %s"), g_szModename);
SetDlgItemTextA(clvmHwnd, IDC_CURVIEWMODE2, szTemp);
mir_snprintf(szSetting, 128, "%c%s_PF", 246, szBuf);
- if (DBGetContactSetting(NULL, CLVM_MODULE, szSetting, &dbv_pf))
+ if (db_get(NULL, CLVM_MODULE, szSetting, &dbv_pf))
goto cleanup;
mir_snprintf(szSetting, 128, "%c%s_GF", 246, szBuf);
if (cfg::getTString(NULL, CLVM_MODULE, szSetting, &dbv_gf))
@@ -580,8 +580,8 @@ void UpdateFilters() ShowPage(clvmHwnd, 0);
cleanup:
- DBFreeVariant(&dbv_pf);
- DBFreeVariant(&dbv_gf);
+ db_free(&dbv_pf);
+ db_free(&dbv_gf);
free(szBuf);
}
@@ -685,16 +685,16 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessageA(hwndDlg, IDC_VIEWMODES, LB_GETTEXT, SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETCURSEL, 0, 0), (LPARAM)szBuf);
mir_snprintf(szSetting, 256, "%c%s_PF", 246, szBuf);
- DBDeleteContactSetting(NULL, CLVM_MODULE, szSetting);
+ db_unset(NULL, CLVM_MODULE, szSetting);
mir_snprintf(szSetting, 256, "%c%s_GF", 246, szBuf);
- DBDeleteContactSetting(NULL, CLVM_MODULE, szSetting);
+ db_unset(NULL, CLVM_MODULE, szSetting);
mir_snprintf(szSetting, 256, "%c%s_SM", 246, szBuf);
- DBDeleteContactSetting(NULL, CLVM_MODULE, szSetting);
+ db_unset(NULL, CLVM_MODULE, szSetting);
mir_snprintf(szSetting, 256, "%c%s_VA", 246, szBuf);
- DBDeleteContactSetting(NULL, CLVM_MODULE, szSetting);
+ db_unset(NULL, CLVM_MODULE, szSetting);
mir_snprintf(szSetting, 256, "%c%s_SSM", 246, szBuf);
- DBDeleteContactSetting(NULL, CLVM_MODULE, szSetting);
- DBDeleteContactSetting(NULL, CLVM_MODULE, szBuf);
+ db_unset(NULL, CLVM_MODULE, szSetting);
+ db_unset(NULL, CLVM_MODULE, szBuf);
if ( !strcmp(cfg::dat.current_viewmode, szBuf) && lstrlenA(szBuf) == lstrlenA(cfg::dat.current_viewmode)) {
cfg::dat.bFilterEffective = 0;
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
|