diff options
Diffstat (limited to 'plugins/Clist_mw/src')
-rw-r--r-- | plugins/Clist_mw/src/BkgrCfg.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp | 36 | ||||
-rw-r--r-- | plugins/Clist_mw/src/CLUIFrames/statusbar.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clc.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clcitems.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clcopts.cpp | 52 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistmod.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistopts.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistsettings.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clui.cpp | 20 | ||||
-rw-r--r-- | plugins/Clist_mw/src/cluiopts.cpp | 18 | ||||
-rw-r--r-- | plugins/Clist_mw/src/cluiservices.cpp | 8 | ||||
-rw-r--r-- | plugins/Clist_mw/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/Clist_mw/src/contact.cpp | 2 |
14 files changed, 101 insertions, 101 deletions
diff --git a/plugins/Clist_mw/src/BkgrCfg.cpp b/plugins/Clist_mw/src/BkgrCfg.cpp index 5dced4e4db..237cd6317c 100644 --- a/plugins/Clist_mw/src/BkgrCfg.cpp +++ b/plugins/Clist_mw/src/BkgrCfg.cpp @@ -65,11 +65,11 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP dat->item[indx].changed = FALSE;
dat->item[indx].useBitmap = db_get_b(NULL,module, "UseBitmap", DEFAULT_USEBITMAP);
- dat->item[indx].bkColor = DBGetContactSettingDword(NULL,module, "BkColour", DEFAULT_BKCOLOUR);
- dat->item[indx].selColor = DBGetContactSettingDword(NULL,module, "SelBkColour", DEFAULT_SELBKCOLOUR);
+ dat->item[indx].bkColor = db_get_dw(NULL,module, "BkColour", DEFAULT_BKCOLOUR);
+ dat->item[indx].selColor = db_get_dw(NULL,module, "SelBkColour", DEFAULT_SELBKCOLOUR);
{
DBVARIANT dbv;
- if ( !DBGetContactSettingString(NULL,module,"BkBitmap",&dbv))
+ if ( !db_get_s(NULL,module,"BkBitmap",&dbv))
{
int retval = PathToAbsolute(dbv.pszVal, dat->item[indx].filename);
if ( !retval || retval == CALLSERVICE_NOTFOUND)
@@ -221,14 +221,14 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP COLORREF col;
if ((col = dat->item[indx].bkColor) == DEFAULT_BKCOLOUR)
- DBDeleteContactSetting(NULL, module, "BkColour");
+ db_unset(NULL, module, "BkColour");
else
- DBWriteContactSettingDword(NULL, module, "BkColour", col);
+ db_set_dw(NULL, module, "BkColour", col);
if ((col = dat->item[indx].selColor) == DEFAULT_SELBKCOLOUR)
- DBDeleteContactSetting(NULL, module, "SelBkColour");
+ db_unset(NULL, module, "SelBkColour");
else
- DBWriteContactSettingDword(NULL, module, "SelBkColour", col);
+ db_set_dw(NULL, module, "SelBkColour", col);
}
{
char str[MAX_PATH];
@@ -238,7 +238,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP else
db_set_s(NULL, module, "BkBitmap", str);
}
- DBWriteContactSettingWord(NULL, module, "BkBmpUse", dat->item[indx].flags);
+ db_set_w(NULL, module, "BkBmpUse", dat->item[indx].flags);
dat->item[indx].changed = FALSE;
NotifyEventHooks(hEventBkgrChanged, (WPARAM)module, 0);
}
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index b504a96f0e..498dc2e896 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -516,25 +516,25 @@ int DBStoreFrameSettingsAtPos(int pos,int Frameid) _itoa(pos,sadd,10);
- DBWriteContactSettingTString(0,CLUIFrameModule,AS(buf,"Name",sadd),Frames[Frameid].name);
+ db_set_ts(0,CLUIFrameModule,AS(buf,"Name",sadd),Frames[Frameid].name);
//boolean
db_set_b(0,CLUIFrameModule,AS(buf,"Collapse",sadd),(BYTE)btoint(Frames[Frameid].collapsed));
db_set_b(0,CLUIFrameModule,AS(buf,"Locked",sadd),(BYTE)btoint(Frames[Frameid].Locked));
db_set_b(0,CLUIFrameModule,AS(buf,"Visible",sadd),(BYTE)btoint(Frames[Frameid].visible));
db_set_b(0,CLUIFrameModule,AS(buf,"TBVisile",sadd),(BYTE)btoint(Frames[Frameid].TitleBar.ShowTitleBar));
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"Height",sadd),(WORD)Frames[Frameid].height);
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"HeightCollapsed",sadd),(WORD)Frames[Frameid].HeightWhenCollapsed);
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"Align",sadd),(WORD)Frames[Frameid].align);
+ db_set_w(0,CLUIFrameModule,AS(buf,"Height",sadd),(WORD)Frames[Frameid].height);
+ db_set_w(0,CLUIFrameModule,AS(buf,"HeightCollapsed",sadd),(WORD)Frames[Frameid].HeightWhenCollapsed);
+ db_set_w(0,CLUIFrameModule,AS(buf,"Align",sadd),(WORD)Frames[Frameid].align);
//FloatingPos
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"FloatX",sadd),(WORD)Frames[Frameid].FloatingPos.x);
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"FloatY",sadd),(WORD)Frames[Frameid].FloatingPos.y);
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"FloatW",sadd),(WORD)Frames[Frameid].FloatingSize.x);
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"FloatH",sadd),(WORD)Frames[Frameid].FloatingSize.y);
+ db_set_w(0,CLUIFrameModule,AS(buf,"FloatX",sadd),(WORD)Frames[Frameid].FloatingPos.x);
+ db_set_w(0,CLUIFrameModule,AS(buf,"FloatY",sadd),(WORD)Frames[Frameid].FloatingPos.y);
+ db_set_w(0,CLUIFrameModule,AS(buf,"FloatW",sadd),(WORD)Frames[Frameid].FloatingSize.x);
+ db_set_w(0,CLUIFrameModule,AS(buf,"FloatH",sadd),(WORD)Frames[Frameid].FloatingSize.y);
db_set_b(0,CLUIFrameModule,AS(buf,"Floating",sadd),(BYTE)btoint(Frames[Frameid].floating));
db_set_b(0,CLUIFrameModule,AS(buf,"UseBorder",sadd),(BYTE)btoint(Frames[Frameid].UseBorder));
- DBWriteContactSettingWord(0,CLUIFrameModule,AS(buf,"Order",sadd),(WORD)Frames[Frameid].order);
+ db_set_w(0,CLUIFrameModule,AS(buf,"Order",sadd),(WORD)Frames[Frameid].order);
//db_set_s(0,CLUIFrameModule,AS(buf,"TBName",sadd),Frames[Frameid].TitleBar.tbname);
return 0;
}
@@ -593,7 +593,7 @@ int CLUIFramesStoreFrameSettings(int Frameid) }
DBStoreFrameSettingsAtPos(storpos,Frameid);
- DBWriteContactSettingWord(0,CLUIFrameModule,"StoredFrames",(WORD)maxstored);
+ db_set_w(0,CLUIFrameModule,"StoredFrames",(WORD)maxstored);
//ulockfrm();
return 0;
}
@@ -1739,9 +1739,9 @@ int CLUIFramesResize(const RECT newsize) int sepw = GapBetweenFrames;
SortData *sdarray;
- GapBetweenTitlebar = (int)DBGetContactSettingDword(NULL,"CLUIFrames","GapBetweenTitleBar",1);
- GapBetweenFrames = DBGetContactSettingDword(NULL,"CLUIFrames","GapBetweenFrames",1);
- TitleBarH = DBGetContactSettingDword(NULL,"CLUIFrames","TitleBarH",DEFAULT_TITLEBAR_HEIGHT);
+ GapBetweenTitlebar = (int)db_get_dw(NULL,"CLUIFrames","GapBetweenTitleBar",1);
+ GapBetweenFrames = db_get_dw(NULL,"CLUIFrames","GapBetweenFrames",1);
+ TitleBarH = db_get_dw(NULL,"CLUIFrames","TitleBarH",DEFAULT_TITLEBAR_HEIGHT);
sepw = GapBetweenFrames;
if (nFramescount < 1)
@@ -1941,12 +1941,12 @@ int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam) AlignCOLLIconToLeft = db_get_b(NULL,"FrameTitleBar","AlignCOLLIconToLeft",0);
- bkColour = DBGetContactSettingDword(NULL,"FrameTitleBar","BkColour",CLCDEFAULT_BKCOLOUR);
- //SelBkColour = DBGetContactSettingDword(NULL,"FrameTitleBar","SelBkColour",0);
+ bkColour = db_get_dw(NULL,"FrameTitleBar","BkColour",CLCDEFAULT_BKCOLOUR);
+ //SelBkColour = db_get_dw(NULL,"FrameTitleBar","SelBkColour",0);
if (hBmpBackground) {DeleteObject(hBmpBackground); hBmpBackground = NULL;}
if ( db_get_b(NULL,"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);
}
@@ -2108,7 +2108,7 @@ static int DrawTitleBar(HDC dc,RECT rect,int Frameid) DrawBackGroundTTB(Frames[pos].TitleBar.hwnd,hdcMem);
//hFront = CreateSolidPe (SelBkColour);
//SelectObject(hdcMem,hFront);
- SelBkColour = DBGetContactSettingDword(NULL,"CLUIFrames","FramesTitleBarFontCol",0);
+ SelBkColour = db_get_dw(NULL,"CLUIFrames","FramesTitleBarFontCol",0);
if (SelBkColour) SetTextColor(hdcMem,SelBkColour);
if ( !AlignCOLLIconToLeft) {
@@ -2871,7 +2871,7 @@ int LoadCLUIFramesModule(void) RegisterClass(&cntclass);
//end container helper
- GapBetweenFrames = DBGetContactSettingDword(NULL,"CLUIFrames","GapBetweenFrames",1);
+ GapBetweenFrames = db_get_dw(NULL,"CLUIFrames","GapBetweenFrames",1);
nFramescount = 0;
InitializeCriticalSection(&csFrameHook);
diff --git a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp index f5d577d70c..10a0ad3b4b 100644 --- a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp @@ -30,20 +30,20 @@ int extraspace; int OnStatusBarBackgroundChange()
{
showOpts = db_get_b(NULL,"CLUI","SBarShow",1);
- bkColour = DBGetContactSettingDword(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR);
+ bkColour = db_get_dw(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR);
if (hBmpBackground)
DeleteObject(hBmpBackground), hBmpBackground = NULL;
if ( db_get_b(NULL,"StatusBar","UseBitmap",CLCDEFAULT_USEBITMAP)) {
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, "StatusBar", "BkBitmap", &dbv)) {
+ if ( !db_get_ts(NULL, "StatusBar", "BkBitmap", &dbv)) {
hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
}
backgroundBmpUse = db_get_w(NULL,"StatusBar","BkBmpUse",CLCDEFAULT_BKBMPUSE);
- extraspace = DBGetContactSettingDword(NULL,"StatusBar","BkExtraSpace",0);
+ extraspace = db_get_dw(NULL,"StatusBar","BkExtraSpace",0);
RecreateStatusBar(pcli->hwndContactList);
if (pcli->hwndStatus) InvalidateRect(pcli->hwndStatus,NULL,TRUE);
@@ -228,8 +228,8 @@ void DrawBackGround(HWND hwnd,HDC mhdc) ds.hwndItem = hwnd;
ds.hDC = hdcMem;
- int startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
- int extraspace = DBGetContactSettingDword(NULL,"StatusBar","BkExtraSpace",0);
+ int startoffset = db_get_dw(NULL,"StatusBar","FirstIconOffset",0);
+ int extraspace = db_get_dw(NULL,"StatusBar","BkExtraSpace",0);
int nParts = SendMessage(hwnd,SB_GETPARTS,0,0);
RECT rc = { 0 }, clrc;
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index dce9541b22..26924d1f8c 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -219,7 +219,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L ClcGroup *group;
if ( FindItem(hwnd,dat,(HANDLE)wParam,&contact,&group,NULL) && contact != NULL) {
contact->flags &= ~CONTACTF_STATUSMSG;
- if ( !DBGetContactSettingTString((HANDLE)wParam, "CList", "StatusMsg", &dbv)) {
+ if ( !db_get_ts((HANDLE)wParam, "CList", "StatusMsg", &dbv)) {
int j;
if (dbv.ptszVal == NULL||_tcslen(dbv.ptszVal) == 0) break;
lstrcpyn(contact->szStatusMsg, dbv.ptszVal, SIZEOF(contact->szStatusMsg));
@@ -228,7 +228,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L contact->szStatusMsg[j] = ' ';
}
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
if (_tcslen(contact->szStatusMsg)>0) {
contact->flags |= CONTACTF_STATUSMSG;
dat->needsResort = TRUE;
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index bea0430653..245afe3048 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -166,7 +166,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group group->cl.items[i]->proto = szProto;
if (dat->style & CLS_SHOWSTATUSMESSAGES) {
- if ( !DBGetContactSettingTString(hContact, "CList", "StatusMsg", &dbv)) {
+ if ( !db_get_ts(hContact, "CList", "StatusMsg", &dbv)) {
int j;
lstrcpyn(group->cl.items[i]->szStatusMsg, dbv.ptszVal, SIZEOF(group->cl.items[i]->szStatusMsg));
for (j = (int)_tcslen(group->cl.items[i]->szStatusMsg)-1;j>=0;j--) {
@@ -174,7 +174,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group group->cl.items[i]->szStatusMsg[j] = ' ';
}
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
if (_tcslen(group->cl.items[i]->szStatusMsg)>0) {
group->cl.items[i]->flags |= CONTACTF_STATUSMSG;
}
@@ -292,7 +292,7 @@ void DeleteItemFromTree(HWND hwnd,HANDLE hItem) if ( !IsHContactContact(hItem)) return;
ClearClcContactCache(dat,hItem);
- if (DBGetContactSettingTString(hItem,"CList","Group",&dbv)) return;
+ if (db_get_ts(hItem,"CList","Group",&dbv)) return;
//decrease member counts of all parent groups too
group = &dat->list;
@@ -423,7 +423,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) sprintf(buf,"RebuildEntireList %d \r\n",tick);
OutputDebugStringA(buf);
- DBWriteContactSettingDword((HANDLE)0,"CLUI","PF:Last RebuildEntireList Time:",tick);
+ db_set_dw((HANDLE)0,"CLUI","PF:Last RebuildEntireList Time:",tick);
}
}
@@ -512,7 +512,7 @@ void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort) if (tick > 5) {
sprintf(buf,"SortCLC %d \r\n",tick);
OutputDebugStringA(buf);
- DBWriteContactSettingDword((HANDLE)0,"CLUI","PF:Last SortCLC Time:",tick);
+ db_set_dw((HANDLE)0,"CLUI","PF:Last SortCLC Time:",tick);
}
}
#endif
diff --git a/plugins/Clist_mw/src/clcopts.cpp b/plugins/Clist_mw/src/clcopts.cpp index 63ee91a856..845e3d104d 100644 --- a/plugins/Clist_mw/src/clcopts.cpp +++ b/plugins/Clist_mw/src/clcopts.cpp @@ -216,7 +216,7 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
{
- DWORD exStyle = DBGetContactSettingDword(NULL,"CLC","ExStyle",pcli->pfnGetDefaultExStyle());
+ DWORD exStyle = db_get_dw(NULL,"CLC","ExStyle",pcli->pfnGetDefaultExStyle());
for (int i = 0;i < SIZEOF(checkBoxToStyleEx); i++)
CheckDlgButton(hwndDlg,checkBoxToStyleEx[i].id,(exStyle&checkBoxToStyleEx[i].flag)^(checkBoxToStyleEx[i].flag*checkBoxToStyleEx[i].not)?BST_CHECKED:BST_UNCHECKED);
@@ -231,13 +231,13 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_SETPOS,0,MAKELONG( db_get_b(NULL,"CLC","LeftMargin",CLCDEFAULT_LEFTMARGIN),0));
SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_SETRANGE,0,MAKELONG(50,0));
SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_SETPOS,0,MAKELONG( db_get_b(NULL,"CLC","GroupIndent",CLCDEFAULT_GROUPINDENT),0));
- CheckDlgButton(hwndDlg,IDC_GREYOUT,DBGetContactSettingDword(NULL,"CLC","GreyoutFlags",CLCDEFAULT_GREYOUTFLAGS)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg,IDC_GREYOUT,db_get_dw(NULL,"CLC","GreyoutFlags",CLCDEFAULT_GREYOUTFLAGS)?BST_CHECKED:BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg,IDC_SMOOTHTIME),IsDlgButtonChecked(hwndDlg,IDC_NOTNOSMOOTHSCROLLING));
EnableWindow(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),IsDlgButtonChecked(hwndDlg,IDC_GREYOUT));
- FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),greyoutValues,SIZEOF(greyoutValues),DBGetContactSettingDword(NULL,"CLC","FullGreyoutFlags",CLCDEFAULT_FULLGREYOUTFLAGS));
- FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),offlineValues,SIZEOF(offlineValues),DBGetContactSettingDword(NULL,"CLC","OfflineModes",CLCDEFAULT_OFFLINEMODES));
+ FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),greyoutValues,SIZEOF(greyoutValues),db_get_dw(NULL,"CLC","FullGreyoutFlags",CLCDEFAULT_FULLGREYOUTFLAGS));
+ FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS),offlineValues,SIZEOF(offlineValues),db_get_dw(NULL,"CLC","OfflineModes",CLCDEFAULT_OFFLINEMODES));
CheckDlgButton(hwndDlg,IDC_NOSCROLLBAR,db_get_b(NULL,"CLC","NoVScrollBar",0)?BST_CHECKED:BST_UNCHECKED);
return TRUE;
@@ -283,19 +283,19 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam for (i = 0;i < SIZEOF(checkBoxToStyleEx);i++)
if ((IsDlgButtonChecked(hwndDlg,checkBoxToStyleEx[i].id) == 0) == checkBoxToStyleEx[i].not)
exStyle |= checkBoxToStyleEx[i].flag;
- DBWriteContactSettingDword(NULL,"CLC","ExStyle",exStyle);
+ db_set_dw(NULL,"CLC","ExStyle",exStyle);
DWORD fullGreyoutFlags = MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS));
- DBWriteContactSettingDword(NULL,"CLC","FullGreyoutFlags",fullGreyoutFlags);
+ db_set_dw(NULL,"CLC","FullGreyoutFlags",fullGreyoutFlags);
if (IsDlgButtonChecked(hwndDlg,IDC_GREYOUT))
- DBWriteContactSettingDword(NULL,"CLC","GreyoutFlags",fullGreyoutFlags);
+ db_set_dw(NULL,"CLC","GreyoutFlags",fullGreyoutFlags);
else
- DBWriteContactSettingDword(NULL,"CLC","GreyoutFlags",0);
+ db_set_dw(NULL,"CLC","GreyoutFlags",0);
db_set_b(NULL,"CLC","ShowIdle",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_IDLE)?1:0));
- DBWriteContactSettingDword(NULL,"CLC","OfflineModes",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS)));
+ db_set_dw(NULL,"CLC","OfflineModes",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_HIDEOFFLINEOPTS)));
db_set_b(NULL,"CLC","LeftMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_LEFTMARGINSPIN,UDM_GETPOS,0,0));
- DBWriteContactSettingWord(NULL,"CLC","ScrollTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_GETPOS,0,0));
+ db_set_w(NULL,"CLC","ScrollTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_SMOOTHTIMESPIN,UDM_GETPOS,0,0));
db_set_b(NULL,"CLC","GroupIndent",(BYTE)SendDlgItemMessage(hwndDlg,IDC_GROUPINDENTSPIN,UDM_GETPOS,0,0));
db_set_b(NULL,"CLC","NoVScrollBar",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_NOSCROLLBAR)?1:0));
@@ -320,12 +320,12 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w CheckDlgButton(hwndDlg,IDC_BITMAP,db_get_b(NULL,"StatusBar","UseBitmap",CLCDEFAULT_USEBITMAP)?BST_CHECKED:BST_UNCHECKED);
SendMessage(hwndDlg,WM_USER+10,0,0);
SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_BKCOLOUR);
- SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR));
+ SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR));
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_SELBKCOLOUR);
- SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
+ SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
{
DBVARIANT dbv;
- if ( !DBGetContactSettingString(NULL,"StatusBar","BkBitmap",&dbv)) {
+ if ( !db_get_s(NULL,"StatusBar","BkBitmap",&dbv)) {
SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
char szPath[MAX_PATH];
@@ -398,11 +398,11 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w {
COLORREF col;
col = SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_GETCOLOUR,0,0);
- if (col == CLCDEFAULT_BKCOLOUR) DBDeleteContactSetting(NULL,"StatusBar","BkColour");
- else DBWriteContactSettingDword(NULL,"StatusBar","BkColour",col);
+ if (col == CLCDEFAULT_BKCOLOUR) db_unset(NULL,"StatusBar","BkColour");
+ else db_set_dw(NULL,"StatusBar","BkColour",col);
col = SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_GETCOLOUR,0,0);
- if (col == CLCDEFAULT_SELBKCOLOUR) DBDeleteContactSetting(NULL,"StatusBar","SelBkColour");
- else DBWriteContactSettingDword(NULL,"StatusBar","SelBkColour",col);
+ if (col == CLCDEFAULT_SELBKCOLOUR) db_unset(NULL,"StatusBar","SelBkColour");
+ else db_set_dw(NULL,"StatusBar","SelBkColour",col);
char str[MAX_PATH],strrel[MAX_PATH];
GetDlgItemTextA(hwndDlg,IDC_FILENAME,str,SIZEOF(str));
@@ -420,7 +420,7 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w if (IsDlgButtonChecked(hwndDlg,IDC_PROPORTIONAL)) flags |= CLBF_PROPORTIONAL;
if (IsDlgButtonChecked(hwndDlg,IDC_TILEVROWH)) flags |= CLBF_TILEVTOROWHEIGHT;
- DBWriteContactSettingWord(NULL,"StatusBar","BkBmpUse",flags);
+ db_set_w(NULL,"StatusBar","BkBmpUse",flags);
}
pcli->pfnClcOptionsChanged();
@@ -442,12 +442,12 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, CheckDlgButton(hwndDlg,IDC_BITMAP,db_get_b(NULL,"CLC","UseBitmap",CLCDEFAULT_USEBITMAP)?BST_CHECKED:BST_UNCHECKED);
SendMessage(hwndDlg,WM_USER+10,0,0);
SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_BKCOLOUR);
- SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"CLC","BkColour",CLCDEFAULT_BKCOLOUR));
+ SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"CLC","BkColour",CLCDEFAULT_BKCOLOUR));
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_SELBKCOLOUR);
- SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"CLC","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
+ SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"CLC","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
{
DBVARIANT dbv;
- if ( !DBGetContactSettingString(NULL,"CLC","BkBitmap",&dbv)) {
+ if ( !db_get_s(NULL,"CLC","BkBitmap",&dbv)) {
SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
char szPath[MAX_PATH];
@@ -517,11 +517,11 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, db_set_b(NULL,"CLC","UseBitmap",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
{ COLORREF col;
col = SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_GETCOLOUR,0,0);
- if (col == CLCDEFAULT_BKCOLOUR) DBDeleteContactSetting(NULL,"CLC","BkColour");
- else DBWriteContactSettingDword(NULL,"CLC","BkColour",col);
+ if (col == CLCDEFAULT_BKCOLOUR) db_unset(NULL,"CLC","BkColour");
+ else db_set_dw(NULL,"CLC","BkColour",col);
col = SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_GETCOLOUR,0,0);
- if (col == CLCDEFAULT_SELBKCOLOUR) DBDeleteContactSetting(NULL,"CLC","SelBkColour");
- else DBWriteContactSettingDword(NULL,"CLC","SelBkColour",col);
+ if (col == CLCDEFAULT_SELBKCOLOUR) db_unset(NULL,"CLC","SelBkColour");
+ else db_set_dw(NULL,"CLC","SelBkColour",col);
}
{
char str[MAX_PATH],strrel[MAX_PATH];
@@ -540,7 +540,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, if (IsDlgButtonChecked(hwndDlg,IDC_PROPORTIONAL)) flags |= CLBF_PROPORTIONAL;
if (IsDlgButtonChecked(hwndDlg,IDC_TILEVROWH)) flags |= CLBF_TILEVTOROWHEIGHT;
- DBWriteContactSettingWord(NULL,"CLC","BkBmpUse",flags);
+ db_set_w(NULL,"CLC","BkBmpUse",flags);
}
pcli->pfnClcOptionsChanged();
diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index dda20b767f..41a73e0041 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -101,15 +101,15 @@ static int ProtocolAck(WPARAM wParam,LPARAM lParam) ACKDATA *ack = (ACKDATA*)lParam;
if (ack->type == ACKTYPE_AWAYMSG && ack->lParam) {
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(ack->hContact, "CList", "StatusMsg", &dbv)) {
+ if ( !db_get_ts(ack->hContact, "CList", "StatusMsg", &dbv)) {
if ( !_tcscmp(dbv.ptszVal, (TCHAR *)ack->lParam)) {
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return 0;
}
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
if ( db_get_b(NULL,"CList","ShowStatusMsg",0) || db_get_b(ack->hContact,"CList","StatusMsgAuto",0))
- DBWriteContactSettingTString(ack->hContact, "CList", "StatusMsg", (TCHAR *)ack->lParam);
+ db_set_ts(ack->hContact, "CList", "StatusMsg", (TCHAR *)ack->lParam);
}
return 0;
@@ -136,7 +136,7 @@ int LoadContactListModule(void) }
hCListImages = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
- DefaultImageListColorDepth = DBGetContactSettingDword(NULL,"CList","DefaultImageListColorDepth",ILC_COLOR32);
+ DefaultImageListColorDepth = db_get_dw(NULL,"CList","DefaultImageListColorDepth",ILC_COLOR32);
hProtoAckHook = (HANDLE) HookEvent(ME_PROTO_ACK, ProtocolAck);
HookEvent(ME_OPT_INITIALISE,CListOptInit);
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index 2a927efc75..85a79385ae 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -137,7 +137,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP { int i,count,item;
PROTOACCOUNT **accs;
DBVARIANT dbv = {DBVT_DELETED};
- DBGetContactSettingString(NULL,"CList","PrimaryStatus",&dbv);
+ db_get_s(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,0);
@@ -201,7 +201,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
if ( !(caps & CLUIF_HASAUTOHIDEOPTION)) {
db_set_b(NULL,"CList","AutoHide",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- DBWriteContactSettingWord(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS,0,0));
+ db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS,0,0));
}
}
db_set_b(NULL,"CList","SortByStatus",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SORTBYSTATUS));
@@ -215,15 +215,15 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP db_set_b(NULL,"CList","AlwaysStatus",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ALWAYSSTATUS));
db_set_b(NULL,"CList","AlwaysMulti",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_ALWAYSMULTI));
db_set_b(NULL,"CList","TrayIcon",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_DONTCYCLE)?SETTING_TRAYICON_SINGLE:(IsDlgButtonChecked(hwndDlg,IDC_CYCLE)?SETTING_TRAYICON_CYCLE:SETTING_TRAYICON_MULTI)));
- DBWriteContactSettingWord(NULL,"CList","CycleTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_GETPOS,0,0));
- DBWriteContactSettingWord(NULL,"CList","IconFlashTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_GETPOS,0,0));
+ db_set_w(NULL,"CList","CycleTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_CYCLETIMESPIN,UDM_GETPOS,0,0));
+ db_set_w(NULL,"CList","IconFlashTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_GETPOS,0,0));
db_set_b(NULL,"CList","DisableTrayFlash",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_DISABLEBLINK));
db_set_b(NULL,"CList","NoIconBlink", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_ICONBLINK));
{
int cursel = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0);
PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETITEMDATA,cursel,0);
if ( pa == NULL )
- DBDeleteContactSetting(NULL, "CList","PrimaryStatus");
+ db_unset(NULL, "CList","PrimaryStatus");
else
db_set_s(NULL,"CList","PrimaryStatus", pa->szModuleName);
}
diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index c0dd11b077..28b69254ca 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -120,7 +120,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) {
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(pdnce->hContact,"CList","Group",&dbv))
+ if ( !db_get_ts(pdnce->hContact,"CList","Group",&dbv))
{
pdnce->tszGroup = mir_tstrdup(dbv.ptszVal);
mir_free(dbv.pszVal);
@@ -135,7 +135,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) pdnce->noHiddenOffline = db_get_b(pdnce->hContact,"CList","noOffline",0);
if ( pdnce->IdleTS == -1 )
- pdnce->IdleTS = DBGetContactSettingDword(pdnce->hContact,pdnce->szProto,"IdleTS",0);
+ pdnce->IdleTS = db_get_dw(pdnce->hContact,pdnce->szProto,"IdleTS",0);
if (pdnce->ApparentMode == -1)
pdnce->ApparentMode = db_get_w(pdnce->hContact,pdnce->szProto,"ApparentMode",0);
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index 3e63f9ceff..f96a3a0697 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -419,7 +419,7 @@ int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc) {
int nParts,nPanel;
ProtocolData *PD;
- int startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
+ int startoffset = db_get_dw(NULL,"StatusBar","FirstIconOffset",0);
if ( !UseOwnerDrawStatusBar) startoffset = 0;
@@ -514,11 +514,11 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l GetWindowRect(hwnd, &rc);
if ( !CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) {
//if docked, dont remember pos (except for width)
- DBWriteContactSettingDword(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top));
- DBWriteContactSettingDword(NULL,"CList","x",(DWORD)rc.left);
- DBWriteContactSettingDword(NULL,"CList","y",(DWORD)rc.top);
+ db_set_dw(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top));
+ db_set_dw(NULL,"CList","x",(DWORD)rc.left);
+ db_set_dw(NULL,"CList","y",(DWORD)rc.top);
}
- DBWriteContactSettingDword(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
+ db_set_dw(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
}
if ( wParam == SIZE_MINIMIZED ) {
if ( db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT )) {
@@ -648,8 +648,8 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l int totcount;
ProtocolData *PD;
int menuid;
- int startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
- int extraspace = DBGetContactSettingDword(NULL,"StatusBar","BkExtraSpace",0);
+ int startoffset = db_get_dw(NULL,"StatusBar","FirstIconOffset",0);
+ int extraspace = db_get_dw(NULL,"StatusBar","BkExtraSpace",0);
boolean UseOwnerDrawStatusBar = db_get_b(NULL,"CLUI","UseOwnerDrawStatusBar",0);
hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
@@ -686,7 +686,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l break;
} } }
- totcount = DBGetContactSettingDword(0,"Protocols","ProtoCount",0);
+ totcount = db_get_dw(0,"Protocols","ProtoCount",0);
PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD == NULL){return 0;}
menuid = nPanel;
@@ -756,11 +756,11 @@ int LoadCLUIModule(void) CreateServiceFunction("CLUI/GetConnectingIconForProtocol",GetConnectingIconService);
- 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));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
oldhideoffline = db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT);
diff --git a/plugins/Clist_mw/src/cluiopts.cpp b/plugins/Clist_mw/src/cluiopts.cpp index 5a70db69b1..3838380564 100644 --- a/plugins/Clist_mw/src/cluiopts.cpp +++ b/plugins/Clist_mw/src/cluiopts.cpp @@ -95,7 +95,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L char *s;
char szUin[20];
- if (DBGetContactSettingString(NULL,"CList","TitleText",&dbv) == 0&&(dbv.pszVal))
+ if (db_get_s(NULL,"CList","TitleText",&dbv) == 0&&(dbv.pszVal))
{
s = mir_strdup(dbv.pszVal);
mir_free(dbv.pszVal);
@@ -112,20 +112,20 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L }
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)MIRANDANAME);
- wsprintfA(szUin,"%u",DBGetContactSettingDword(NULL,"ICQ","UIN",0));
+ wsprintfA(szUin,"%u",db_get_dw(NULL,"ICQ","UIN",0));
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)szUin);
- if ( !DBGetContactSettingString(NULL,"ICQ","Nick",&dbv)) {
+ if ( !db_get_s(NULL,"ICQ","Nick",&dbv)) {
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal);
mir_free(dbv.pszVal);
dbv.pszVal = NULL;
}
- if ( !DBGetContactSettingString(NULL,"ICQ","FirstName",&dbv)) {
+ if ( !db_get_s(NULL,"ICQ","FirstName",&dbv)) {
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal);
mir_free(dbv.pszVal);
dbv.pszVal = NULL;
}
- if ( !DBGetContactSettingString(NULL,"ICQ","e-mail",&dbv)) {
+ if ( !db_get_s(NULL,"ICQ","e-mail",&dbv)) {
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal);
mir_free(dbv.pszVal);
dbv.pszVal = NULL;
@@ -249,7 +249,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L { TCHAR title[256];
GetDlgItemText(hwndDlg,IDC_TITLETEXT,title,SIZEOF(title));
- DBWriteContactSettingTString(NULL,"CList","TitleText",title);
+ db_set_ts(NULL,"CList","TitleText",title);
SetWindowText(pcli->hwndContactList,title);
}
db_set_b(NULL,"CLUI","FadeInOut",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT));
@@ -257,7 +257,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L db_set_b(NULL,"CLUI","MaxSizeHeight",(BYTE)GetDlgItemInt(hwndDlg,IDC_MAXSIZEHEIGHT,NULL,FALSE));
db_set_b(NULL,"CLUI","AutoSizeUpward",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZEUPWARD));
db_set_b(NULL,"CList","AutoHide",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- DBWriteContactSettingWord(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS,0,0));
+ db_set_w(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS,0,0));
db_set_b(NULL,"CList","Transparent",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT));
db_set_b(NULL,"CList","Alpha",(BYTE)SendDlgItemMessage(hwndDlg,IDC_TRANSACTIVE,TBM_GETPOS,0,0));
@@ -298,7 +298,7 @@ static INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L CheckDlgButton(hwndDlg, IDC_USEOWNERDRAW, db_get_b(NULL,"CLUI","UseOwnerDrawStatusBar",1) ? BST_CHECKED : BST_UNCHECKED);
- SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"CLUI","SBarBKColor",CLR_DEFAULT));
+ SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"CLUI","SBarBKColor",CLR_DEFAULT));
if ( !IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWICON),FALSE);
@@ -341,7 +341,7 @@ static INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L case PSN_APPLY:
{
COLORREF col = SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_GETCOLOUR,0,0);
- DBWriteContactSettingDword(NULL,"CLUI","SBarBKColor",col);
+ db_set_dw(NULL,"CLUI","SBarBKColor",col);
db_set_b(NULL,"CLUI","ShowSBar",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
db_set_b(NULL,"CLUI","SBarShow",(BYTE)((IsDlgButtonChecked(hwndDlg,IDC_SHOWICON)?1:0)|(IsDlgButtonChecked(hwndDlg,IDC_SHOWPROTO)?2:0)|(IsDlgButtonChecked(hwndDlg,IDC_SHOWSTATUS)?4:0)));
diff --git a/plugins/Clist_mw/src/cluiservices.cpp b/plugins/Clist_mw/src/cluiservices.cpp index d57ae77741..095576878c 100644 --- a/plugins/Clist_mw/src/cluiservices.cpp +++ b/plugins/Clist_mw/src/cluiservices.cpp @@ -53,7 +53,7 @@ void CluiProtocolStatusChanged(int parStatus, const char* szProto) if ( pcli->hwndStatus == 0 )
return;
- FirstIconOffset = DBGetContactSettingDword(NULL,"CLUI","FirstIconOffset",0);
+ FirstIconOffset = db_get_dw(NULL,"CLUI","FirstIconOffset",0);
ProtoEnumAccounts( &protoCount, &accs );
if ( protoCount == 0 )
@@ -65,7 +65,7 @@ void CluiProtocolStatusChanged(int parStatus, const char* szProto) SendMessage(pcli->hwndStatus,SB_GETBORDERS,0,(LPARAM)&borders);
- SendMessage(pcli->hwndStatus,SB_SETBKCOLOR,0,DBGetContactSettingDword(0,"CLUI","SBarBKColor",CLR_DEFAULT));
+ SendMessage(pcli->hwndStatus,SB_SETBKCOLOR,0,db_get_dw(0,"CLUI","SBarBKColor",CLR_DEFAULT));
partWidths = (int*)alloca((protoCount+1)*sizeof(int));
//partWidths[0] = FirstIconOffset;
if ( db_get_b(NULL,"CLUI","UseOwnerDrawStatusBar",0)||db_get_b(NULL,"CLUI","EqualSections",1))
@@ -105,8 +105,8 @@ void CluiProtocolStatusChanged(int parStatus, const char* szProto) HDC hdc;
SIZE textSize;
BYTE showOpts = db_get_b(NULL,"CLUI","SBarShow",5);
- DWORD extraspace = DBGetContactSettingDword(NULL,"StatusBar","BkExtraSpace",0);
- DWORD startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
+ DWORD extraspace = db_get_dw(NULL,"StatusBar","BkExtraSpace",0);
+ DWORD startoffset = db_get_dw(NULL,"StatusBar","FirstIconOffset",0);
int x;
hdc = GetDC(pcli->hwndStatus);
diff --git a/plugins/Clist_mw/src/commonheaders.h b/plugins/Clist_mw/src/commonheaders.h index 4faf052f07..8b4c9181de 100644 --- a/plugins/Clist_mw/src/commonheaders.h +++ b/plugins/Clist_mw/src/commonheaders.h @@ -63,7 +63,7 @@ extern HINSTANCE g_hInst; 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_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index e6c4f31805..bd2ad97052 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -178,7 +178,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
db_set_s((HANDLE)wParam,"CList","Group",(char*)CallService(MS_CLIST_GROUPGETNAME2,lParam,(LPARAM)(int*)NULL));
|