From 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 22:27:16 +0000 Subject: - 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 --- plugins/Scriver/src/chat/clist.cpp | 12 ++++---- plugins/Scriver/src/chat/log.cpp | 2 +- plugins/Scriver/src/chat/manager.cpp | 8 +++--- plugins/Scriver/src/chat/options.cpp | 54 +++++++++++++++++------------------ plugins/Scriver/src/chat/services.cpp | 8 +++--- plugins/Scriver/src/chat/tools.cpp | 2 +- plugins/Scriver/src/chat/window.cpp | 10 +++---- 7 files changed, 48 insertions(+), 48 deletions(-) (limited to 'plugins/Scriver/src/chat') diff --git a/plugins/Scriver/src/chat/clist.cpp b/plugins/Scriver/src/chat/clist.cpp index 697d46c94d..9cb2f09b09 100644 --- a/plugins/Scriver/src/chat/clist.cpp +++ b/plugins/Scriver/src/chat/clist.cpp @@ -30,7 +30,7 @@ HANDLE CList_AddRoom(const char* pszModule, const TCHAR* pszRoom, const TCHAR* p TCHAR pszGroup[50]; *pszGroup = '\0'; - if ( !DBGetContactSettingTString(NULL, "Chat", "AddToGroup", &dbv)) { + if ( !db_get_ts(NULL, "Chat", "AddToGroup", &dbv)) { if ( lstrlen(dbv.ptszVal) > 0 ) lstrcpyn( pszGroup, dbv.ptszVal, 50); db_free(&dbv); @@ -47,12 +47,12 @@ HANDLE CList_AddRoom(const char* pszModule, const TCHAR* pszRoom, const TCHAR* p _itoa(i, str, 10); DBVARIANT dbv, dbv2; - if (DBGetContactSettingTString( NULL, "CListGroups", str, &dbv)) { + if (db_get_ts( NULL, "CListGroups", str, &dbv)) { db_set_ts(hContact, "CList", "Group", pszGroup); goto END_GROUPLOOP; } - if ( !DBGetContactSettingTString( hContact, "CList", "Group", &dbv2 )) { + if ( !db_get_ts( hContact, "CList", "Group", &dbv2 )) { if ( dbv.ptszVal[0] != '\0' && dbv2.ptszVal[0] != '\0' && !lstrcmpi( dbv.ptszVal + 1, dbv2.ptszVal )) { db_free(&dbv); db_free(&dbv2); @@ -129,7 +129,7 @@ int CList_RoomDoubleclicked(WPARAM wParam,LPARAM lParam) if (db_get_b(hContact, szProto, "ChatRoom", 0) == 0) return 0; - if ( !DBGetContactSettingTString( hContact, szProto, "ChatRoomID", &dbv )) { + if ( !db_get_ts( hContact, szProto, "ChatRoomID", &dbv )) { SESSION_INFO* si = SM_FindSession( dbv.ptszVal, szProto ); if ( si ) { // is the "toggle visibility option set, so we need to close the window? @@ -233,7 +233,7 @@ void CList_CreateGroup(TCHAR* group) for (i = 0;; i++) { _itoa(i, str, 10); - if ( DBGetContactSettingTString( NULL, "CListGroups", str, &dbv )) + if ( db_get_ts( NULL, "CListGroups", str, &dbv )) break; if ( dbv.pszVal[0] != '\0' && !lstrcmpi(dbv.ptszVal + 1, group)) { @@ -289,7 +289,7 @@ HANDLE CList_FindRoom ( const char* pszModule, const TCHAR* pszRoom) if (szProto && !lstrcmpiA(szProto, pszModule)) { if ( db_get_b( hContact, szProto, "ChatRoom", 0) != 0) { DBVARIANT dbv; - if ( !DBGetContactSettingTString( hContact, szProto, "ChatRoomID", &dbv)) { + if ( !db_get_ts( hContact, szProto, "ChatRoomID", &dbv)) { if ( !lstrcmpi(dbv.ptszVal, pszRoom)) { db_free(&dbv); return hContact; diff --git a/plugins/Scriver/src/chat/log.cpp b/plugins/Scriver/src/chat/log.cpp index ac05d01576..07ad481eea 100644 --- a/plugins/Scriver/src/chat/log.cpp +++ b/plugins/Scriver/src/chat/log.cpp @@ -928,7 +928,7 @@ void LoadMsgLogBitmaps(void) int rtfHeaderSize; PBYTE pBmpBits; - hBkgBrush = CreateSolidBrush(DBGetContactSettingDword(NULL, "Chat", "ColorLogBG", GetSysColor(COLOR_WINDOW))); + hBkgBrush = CreateSolidBrush(db_get_dw(NULL, "Chat", "ColorLogBG", GetSysColor(COLOR_WINDOW))); bih.biSize = sizeof(bih); bih.biBitCount = 24; bih.biCompression = BI_RGB; diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp index 5d1ef90de1..50bb2287fe 100644 --- a/plugins/Scriver/src/chat/manager.cpp +++ b/plugins/Scriver/src/chat/manager.cpp @@ -119,8 +119,8 @@ int SM_RemoveSession(const TCHAR* pszID, const char* pszModule, BOOL removeConta /* if (pTemp->iType != GCW_SERVER) db_set_b(pTemp->windowData.hContact, "CList", "Hidden", 1);*/ } - DBWriteContactSettingString(pTemp->windowData.hContact, pTemp->pszModule , "Topic", ""); - DBWriteContactSettingString(pTemp->windowData.hContact, pTemp->pszModule, "StatusBar", ""); + db_set_s(pTemp->windowData.hContact, pTemp->pszModule , "Topic", ""); + db_set_s(pTemp->windowData.hContact, pTemp->pszModule, "StatusBar", ""); db_unset(pTemp->windowData.hContact, "CList", "StatusMsg"); if (removeContact) @@ -681,9 +681,9 @@ BOOL SM_RemoveAll (void) DoEventHook(m_WndList->ptszID, m_WndList->pszModule, GC_SESSION_TERMINATE, NULL, NULL, (DWORD)m_WndList->dwItemData); if (m_WndList->windowData.hContact) CList_SetOffline(m_WndList->windowData.hContact, m_WndList->iType == GCW_CHATROOM?TRUE:FALSE); - DBWriteContactSettingString(m_WndList->windowData.hContact, m_WndList->pszModule , "Topic", ""); + db_set_s(m_WndList->windowData.hContact, m_WndList->pszModule , "Topic", ""); db_unset(m_WndList->windowData.hContact, "CList", "StatusMsg"); - DBWriteContactSettingString(m_WndList->windowData.hContact, m_WndList->pszModule, "StatusBar", ""); + db_set_s(m_WndList->windowData.hContact, m_WndList->pszModule, "StatusBar", ""); UM_RemoveAll(&m_WndList->pUsers); TM_RemoveAll(&m_WndList->pStatuses); diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index e2826f56f1..f465caeea7 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -131,7 +131,7 @@ static void FillBranch(HWND hwndTree, HTREEITEM hParent, struct branch_t *branch tvis.item.pszText = TranslateTS(branch[i].szDescr); tvis.item.stateMask = TVIS_STATEIMAGEMASK; if (branch[i].iMode) - iState = ((DBGetContactSettingDword(NULL, "Chat", branch[i].szDBName, defaultval)&branch[i].iMode)&branch[i].iMode)!=0?2:1; + iState = ((db_get_dw(NULL, "Chat", branch[i].szDBName, defaultval)&branch[i].iMode)&branch[i].iMode)!=0?2:1; else iState = db_get_b(NULL, "Chat", branch[i].szDBName, branch[i].bDefault)!=0?2:1; tvis.item.state=INDEXTOSTATEIMAGEMASK(iState); @@ -156,7 +156,7 @@ static void SaveBranch(HWND hwndTree, struct branch_t *branch, int nValues) iState |= branch[i].iMode; if (iState&GC_EVENT_ADDSTATUS) iState |= GC_EVENT_REMOVESTATUS; - DBWriteContactSettingDword(NULL, "Chat", branch[i].szDBName, (DWORD)iState); + db_set_dw(NULL, "Chat", branch[i].szDBName, (DWORD)iState); } else db_set_b(NULL, "Chat", branch[i].szDBName, bChecked); } } @@ -234,7 +234,7 @@ void LoadLogFonts(void) static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault) { DBVARIANT dbv; - if ( !DBGetContactSettingTString(NULL, "Chat", pszSetting, &dbv )) { + if ( !db_get_ts(NULL, "Chat", pszSetting, &dbv )) { replaceStr( ppPointer, dbv.ptszVal ); db_free(&dbv); } @@ -329,9 +329,9 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa { pszText = (char *)mir_realloc(pszText, iLen+1); GetDlgItemTextA(hwndDlg, IDC_CHAT_GROUP, pszText,iLen+1); - DBWriteContactSettingString(NULL, "Chat", "AddToGroup", pszText); + db_set_s(NULL, "Chat", "AddToGroup", pszText); } - else DBWriteContactSettingString(NULL, "Chat", "AddToGroup", ""); + else db_set_s(NULL, "Chat", "AddToGroup", ""); mir_free(pszText); iLen = SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN2,UDM_GETPOS,0,0); @@ -569,7 +569,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa if ( iLen > 0 ) { pszText = (char *)mir_realloc(pszText, iLen+1); GetDlgItemTextA(hwndDlg, IDC_CHAT_LOGTIMESTAMP, pszText,iLen+1); - DBWriteContactSettingString(NULL, "Chat", "LogTimestamp", pszText); + db_set_s(NULL, "Chat", "LogTimestamp", pszText); } else db_unset(NULL, "Chat", "LogTimestamp"); @@ -577,7 +577,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa if ( iLen > 0 ) { pszText = (char *)mir_realloc(pszText, iLen+1); GetDlgItemTextA(hwndDlg, IDC_CHAT_TIMESTAMP, pszText,iLen+1); - DBWriteContactSettingString(NULL, "Chat", "HeaderTime", pszText); + db_set_s(NULL, "Chat", "HeaderTime", pszText); } else db_unset(NULL, "Chat", "HeaderTime"); @@ -585,7 +585,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa if ( iLen > 0 ) { pszText = (char *)mir_realloc(pszText, iLen+1); GetDlgItemTextA(hwndDlg, IDC_CHAT_INSTAMP, pszText,iLen+1); - DBWriteContactSettingString(NULL, "Chat", "HeaderIncoming", pszText); + db_set_s(NULL, "Chat", "HeaderIncoming", pszText); } else db_unset(NULL, "Chat", "HeaderIncoming"); @@ -593,7 +593,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa if ( iLen > 0 ) { pszText = (char *)mir_realloc(pszText, iLen+1); GetDlgItemTextA(hwndDlg, IDC_CHAT_OUTSTAMP, pszText,iLen+1); - DBWriteContactSettingString(NULL, "Chat", "HeaderOutgoing", pszText); + db_set_s(NULL, "Chat", "HeaderOutgoing", pszText); } else db_unset(NULL, "Chat", "HeaderOutgoing"); @@ -613,9 +613,9 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa mir_free(pszText); - g_Settings.dwIconFlags = DBGetContactSettingDword(NULL, "Chat", "IconFlags", 0x0000); - g_Settings.dwTrayIconFlags = DBGetContactSettingDword(NULL, "Chat", "TrayIconFlags", 0x1000); - g_Settings.dwPopupFlags = DBGetContactSettingDword(NULL, "Chat", "PopupFlags", 0x0000); + g_Settings.dwIconFlags = db_get_dw(NULL, "Chat", "IconFlags", 0x0000); + g_Settings.dwTrayIconFlags = db_get_dw(NULL, "Chat", "TrayIconFlags", 0x1000); + g_Settings.dwPopupFlags = db_get_dw(NULL, "Chat", "PopupFlags", 0x0000); g_Settings.StripFormat = (BOOL)db_get_b(NULL, "Chat", "TrimFormatting", 0); g_Settings.TrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "TrayIconInactiveOnly", 1); g_Settings.PopUpInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "PopUpInactiveOnly", 1); @@ -732,9 +732,9 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg,UINT uMsg,WPARAM wParam db_set_w(NULL, "Chat", "PopupTimeout", (WORD)iLen); g_Settings.crPUBkgColour = SendDlgItemMessage(hwndDlg,IDC_CHAT_BKG,CPM_GETCOLOUR,0,0); - DBWriteContactSettingDword(NULL, "Chat", "PopupColorBG", (DWORD)SendDlgItemMessage(hwndDlg,IDC_CHAT_BKG,CPM_GETCOLOUR,0,0)); + db_set_dw(NULL, "Chat", "PopupColorBG", (DWORD)SendDlgItemMessage(hwndDlg,IDC_CHAT_BKG,CPM_GETCOLOUR,0,0)); g_Settings.crPUTextColour = SendDlgItemMessage(hwndDlg,IDC_CHAT_TEXT,CPM_GETCOLOUR,0,0); - DBWriteContactSettingDword(NULL, "Chat", "PopupColorText", (DWORD)SendDlgItemMessage(hwndDlg,IDC_CHAT_TEXT,CPM_GETCOLOUR,0,0)); + db_set_dw(NULL, "Chat", "PopupColorText", (DWORD)SendDlgItemMessage(hwndDlg,IDC_CHAT_TEXT,CPM_GETCOLOUR,0,0)); SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch6, SIZEOF(branch6)); } return TRUE; @@ -779,26 +779,26 @@ void LoadGlobalSettings(void) g_Settings.ShowTimeIfChanged = (BOOL)db_get_b(NULL, "Chat", "ShowTimeStampIfChanged", 0); g_Settings.TimeStampEventColour = (BOOL)db_get_b(NULL, "Chat", "TimeStampEventColour", 0); g_Settings.iEventLimit = db_get_w(NULL, "Chat", "LogLimit", 100); - g_Settings.dwIconFlags = DBGetContactSettingDword(NULL, "Chat", "IconFlags", 0x0000); - g_Settings.dwTrayIconFlags = DBGetContactSettingDword(NULL, "Chat", "TrayIconFlags", 0x1000); - g_Settings.dwPopupFlags = DBGetContactSettingDword(NULL, "Chat", "PopupFlags", 0x0000); + g_Settings.dwIconFlags = db_get_dw(NULL, "Chat", "IconFlags", 0x0000); + g_Settings.dwTrayIconFlags = db_get_dw(NULL, "Chat", "TrayIconFlags", 0x1000); + g_Settings.dwPopupFlags = db_get_dw(NULL, "Chat", "PopupFlags", 0x0000); g_Settings.LoggingLimit = db_get_w(NULL, "Chat", "LoggingLimit", 100); g_Settings.LoggingEnabled = (BOOL)db_get_b(NULL, "Chat", "LoggingEnabled", 0); g_Settings.FlashWindow = (BOOL)db_get_b(NULL, "Chat", "FlashWindow", 0); g_Settings.HighlightEnabled = (BOOL)db_get_b(NULL, "Chat", "HighlightEnabled", 1); - g_Settings.crUserListColor = DBGetContactSettingDword(NULL, "ChatFonts", "Font18Col", RGB(0,0,0)); - g_Settings.crUserListBGColor = DBGetContactSettingDword(NULL, "Chat", "ColorNicklistBG", GetSysColor(COLOR_WINDOW)); - g_Settings.crUserListSelectedBGColor = DBGetContactSettingDword(NULL, "Chat", "ColorNicklistSelectedBG", GetSysColor(COLOR_HIGHLIGHT)); - g_Settings.crUserListHeadingsColor = DBGetContactSettingDword(NULL, "ChatFonts", "Font19Col", RGB(170,170,170)); - g_Settings.crLogBackground = DBGetContactSettingDword(NULL, "Chat", "ColorLogBG", GetSysColor(COLOR_WINDOW)); + g_Settings.crUserListColor = db_get_dw(NULL, "ChatFonts", "Font18Col", RGB(0,0,0)); + g_Settings.crUserListBGColor = db_get_dw(NULL, "Chat", "ColorNicklistBG", GetSysColor(COLOR_WINDOW)); + g_Settings.crUserListSelectedBGColor = db_get_dw(NULL, "Chat", "ColorNicklistSelectedBG", GetSysColor(COLOR_HIGHLIGHT)); + g_Settings.crUserListHeadingsColor = db_get_dw(NULL, "ChatFonts", "Font19Col", RGB(170,170,170)); + g_Settings.crLogBackground = db_get_dw(NULL, "Chat", "ColorLogBG", GetSysColor(COLOR_WINDOW)); g_Settings.StripFormat = (BOOL)db_get_b(NULL, "Chat", "StripFormatting", 0); g_Settings.TrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "TrayIconInactiveOnly", 1); g_Settings.PopUpInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "PopUpInactiveOnly", 1); g_Settings.AddColonToAutoComplete = (BOOL)db_get_b(NULL, "Chat", "AddColonToAutoComplete", 1); g_Settings.iPopupStyle = db_get_b(NULL, "Chat", "PopupStyle", 1); g_Settings.iPopupTimeout = db_get_w(NULL, "Chat", "PopupTimeout", 3); - g_Settings.crPUBkgColour = DBGetContactSettingDword(NULL, "Chat", "PopupColorBG", GetSysColor(COLOR_WINDOW)); - g_Settings.crPUTextColour = DBGetContactSettingDword(NULL, "Chat", "PopupColorText", 0); + g_Settings.crPUBkgColour = db_get_dw(NULL, "Chat", "PopupColorBG", GetSysColor(COLOR_WINDOW)); + g_Settings.crPUTextColour = db_get_dw(NULL, "Chat", "PopupColorText", 0); g_Settings.ShowContactStatus = db_get_b(NULL, "Chat", "ShowContactStatus", 0); g_Settings.ContactStatusFirst = db_get_b(NULL, "Chat", "ContactStatusFirst", 0); @@ -810,7 +810,7 @@ void LoadGlobalSettings(void) DBVARIANT dbv; g_Settings.pszLogDir = (TCHAR *)mir_realloc(g_Settings.pszLogDir, MAX_PATH*sizeof(TCHAR)); - if ( !DBGetContactSettingTString(NULL, "Chat", "LogDirectory", &dbv)) { + if ( !db_get_ts(NULL, "Chat", "LogDirectory", &dbv)) { lstrcpyn(g_Settings.pszLogDir, dbv.ptszVal, MAX_PATH); db_free(&dbv); } @@ -835,11 +835,11 @@ void LoadGlobalSettings(void) if (hListBkgBrush != NULL) DeleteObject(hListBkgBrush); - hListBkgBrush = CreateSolidBrush(DBGetContactSettingDword(NULL, "Chat", "ColorNicklistBG", GetSysColor(COLOR_WINDOW))); + hListBkgBrush = CreateSolidBrush(db_get_dw(NULL, "Chat", "ColorNicklistBG", GetSysColor(COLOR_WINDOW))); if (hListSelectedBkgBrush != NULL) DeleteObject(hListSelectedBkgBrush); - hListSelectedBkgBrush = CreateSolidBrush(DBGetContactSettingDword(NULL, "Chat", "ColorNicklistSelectedBG", GetSysColor(COLOR_HIGHLIGHT))); + hListSelectedBkgBrush = CreateSolidBrush(db_get_dw(NULL, "Chat", "ColorNicklistSelectedBG", GetSysColor(COLOR_HIGHLIGHT))); } static void FreeGlobalSettings(void) diff --git a/plugins/Scriver/src/chat/services.cpp b/plugins/Scriver/src/chat/services.cpp index c9a578e76d..9c2bbbe244 100644 --- a/plugins/Scriver/src/chat/services.cpp +++ b/plugins/Scriver/src/chat/services.cpp @@ -221,7 +221,7 @@ static INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) si->ptszStatusbarText = a2tf( gcw->ptszStatusbarText, gcw->dwFlags ); si->iSplitterX = g_Settings.iSplitterX; si->iSplitterY = g_Settings.iSplitterY; - si->iLogFilterFlags = (int)DBGetContactSettingDword(NULL, "Chat", "FilterFlags", 0x03E0); + si->iLogFilterFlags = (int)db_get_dw(NULL, "Chat", "FilterFlags", 0x03E0); si->bFilterEnabled = db_get_b(NULL, "Chat", "FilterEnabled", 0); si->bNicklistEnabled = db_get_b(NULL, "Chat", "ShowNicklist", 1); @@ -246,12 +246,12 @@ static INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam) si->windowData.hContact = CList_AddRoom( gcw->pszModule, ptszID, szTemp, si->iType); si->windowData.codePage = db_get_w(si->windowData.hContact, si->pszModule, "CodePage", (WORD) CP_ACP); si->pszHeader = Log_CreateRtfHeader(mi, si); - DBWriteContactSettingString(si->windowData.hContact, si->pszModule , "Topic", ""); + db_set_s(si->windowData.hContact, si->pszModule , "Topic", ""); db_unset(si->windowData.hContact, "CList", "StatusMsg"); if (si->ptszStatusbarText) db_set_ts(si->windowData.hContact, si->pszModule, "StatusBar", si->ptszStatusbarText); else - DBWriteContactSettingString(si->windowData.hContact, si->pszModule, "StatusBar", ""); + db_set_s(si->windowData.hContact, si->pszModule, "StatusBar", ""); } else { SESSION_INFO* si2 = SM_FindSession( ptszID, gcw->pszModule ); @@ -370,7 +370,7 @@ static INT_PTR DoControl(GCEVENT * gce, WPARAM wp) if ( si->ptszStatusbarText ) db_set_ts(si->windowData.hContact, si->pszModule, "StatusBar", si->ptszStatusbarText); else - DBWriteContactSettingString(si->windowData.hContact, si->pszModule, "StatusBar", ""); + db_set_s(si->windowData.hContact, si->pszModule, "StatusBar", ""); if (si->hWnd) { SendMessage(si->hWnd, DM_UPDATESTATUSBAR, 0, 0); diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp index f30fefb135..a09a1d290a 100644 --- a/plugins/Scriver/src/chat/tools.cpp +++ b/plugins/Scriver/src/chat/tools.cpp @@ -385,7 +385,7 @@ void CheckColorsInModule(const char* pszModule) MODULEINFO * pMod = MM_FindModule( pszModule ); int i = 0; COLORREF crFG; - COLORREF crBG = (COLORREF)DBGetContactSettingDword(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); + COLORREF crBG = (COLORREF)db_get_dw(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, NULL, &crFG, FALSE); diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index fa803330ce..a384eeb7e4 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -494,7 +494,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, if (MM_FindModule(Parentsi->pszModule) && MM_FindModule(Parentsi->pszModule)->bBkgColor) { int index = GetColorIndex(Parentsi->pszModule, cf.crBackColor); - COLORREF crB = DBGetContactSettingDword(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); + COLORREF crB = db_get_dw(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); u = IsDlgButtonChecked(GetParent(hwnd), IDC_CHAT_BKGCOLOR); if (index >= 0) { @@ -1178,8 +1178,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) cf.dwMask = CFM_COLOR|CFM_BOLD|CFM_UNDERLINE|CFM_BACKCOLOR; cf.dwEffects = 0; cf.crTextColor = crFore; - cf.crBackColor = DBGetContactSettingDword(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); - SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_SETBKGNDCOLOR , 0, DBGetContactSettingDword(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR)); + cf.crBackColor = db_get_dw(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); + SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_SETBKGNDCOLOR , 0, db_get_dw(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR)); SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, WM_SETFONT, (WPARAM) g_Settings.MessageBoxFont, MAKELPARAM(TRUE, 0)); SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETCHARFORMAT, (WPARAM)SCF_ALL , (LPARAM)&cf); } @@ -1933,7 +1933,7 @@ LABEL_SHOWWINDOW: } } else { cf.dwMask = CFM_BACKCOLOR; - cf.crBackColor = (COLORREF)DBGetContactSettingDword(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); + cf.crBackColor = (COLORREF)db_get_dw(NULL, SRMMMOD, SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR); if (pInfo->bSingleFormat) { SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf); } else { @@ -2066,7 +2066,7 @@ LABEL_SHOWWINDOW: i = TrackPopupMenu(hToolbarMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL); if (i > 0) { g_dat.chatBbuttonVisibility ^= (1 << (i - 1)); - DBWriteContactSettingDword(NULL, SRMMMOD, SRMSGSET_CHATBUTTONVISIBILITY, g_dat.chatBbuttonVisibility); + db_set_dw(NULL, SRMMMOD, SRMSGSET_CHATBUTTONVISIBILITY, g_dat.chatBbuttonVisibility); SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE); } DestroyMenu(hToolbarMenu); -- cgit v1.2.3