From b48741c8d0ed916d2cdd41956667ec4082ab245a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Jun 2013 15:34:33 +0000 Subject: obsolete helpers removed git-svn-id: http://svn.miranda-ng.org/main/trunk@5152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/chat/muchighlight.cpp | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'plugins/TabSRMM/src/chat/muchighlight.cpp') diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp index 79752fa472..c860988b25 100644 --- a/plugins/TabSRMM/src/chat/muchighlight.cpp +++ b/plugins/TabSRMM/src/chat/muchighlight.cpp @@ -59,17 +59,17 @@ void CMUCHighlight::init() m_fInitialized = true; - if (0 == M->GetTString(0, "Chat", "HighlightWords", &dbv)) { + if (0 == db_get_ts(0, "Chat", "HighlightWords", &dbv)) { m_TextPatternString = dbv.ptszVal; _wsetlocale(LC_ALL, L""); wcslwr(m_TextPatternString); } - if (0 == M->GetTString(0, "Chat", "HighlightNames", &dbv)) + if (0 == db_get_ts(0, "Chat", "HighlightNames", &dbv)) m_NickPatternString = dbv.ptszVal; - m_dwFlags = M->GetByte("Chat", "HighlightEnabled", MATCH_TEXT); - m_fHighlightMe = (M->GetByte("Chat", "HighlightMe", 1) ? true : false); + m_dwFlags = M.GetByte("Chat", "HighlightEnabled", MATCH_TEXT); + m_fHighlightMe = (M.GetByte("Chat", "HighlightMe", 1) ? true : false); __try { tokenize(m_TextPatternString, m_TextPatterns, m_iTextPatterns); @@ -136,7 +136,7 @@ int CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwF if ((m_dwFlags & MATCH_TEXT) && (dwFlags & MATCH_TEXT) && (m_fHighlightMe || m_iTextPatterns > 0) && psi != 0) { #ifdef __HLT_PERFSTATS int words = 0; - M->startTimer(); + M.startTimer(); #endif TCHAR *tszCleaned = ::RemoveFormatting(pgce->ptszText, true, true); TCHAR *p = tszCleaned; @@ -187,9 +187,9 @@ int CMUCHighlight::match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwF skip_textpatterns: #ifdef __HLT_PERFSTATS - M->stopTimer(0); + M.stopTimer(0); if (psi && psi->dat) { - mir_sntprintf(psi->dat->szStatusBar, 100, _T("PERF text match: %d ticks = %f msec (%d words, %d patterns)"), (int)M->getTicks(), M->getMsec(), words, m_iTextPatterns); + mir_sntprintf(psi->dat->szStatusBar, 100, _T("PERF text match: %d ticks = %f msec (%d words, %d patterns)"), (int)M.getTicks(), M.getMsec(), words, m_iTextPatterns); if (psi->dat->pContainer->hwndStatus) ::SendMessage(psi->dat->pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)psi->dat->szStatusBar); } @@ -267,22 +267,22 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L TranslateDialogDefault(hwndDlg); { DBVARIANT dbv = {0}; - if ( !M->GetTString(0, "Chat", "HighlightWords", &dbv)) { + if ( !db_get_ts(0, "Chat", "HighlightWords", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN, dbv.ptszVal); ::db_free(&dbv); } - if ( !M->GetTString(0, "Chat", "HighlightNames", &dbv)) { + if ( !db_get_ts(0, "Chat", "HighlightNames", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_HIGHLIGHTNICKPATTERN, dbv.ptszVal); ::db_free(&dbv); } - DWORD dwFlags = M->GetByte("Chat", "HighlightEnabled", MATCH_TEXT); + DWORD dwFlags = M.GetByte("Chat", "HighlightEnabled", MATCH_TEXT); ::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTNICKENABLE, dwFlags & MATCH_NICKNAME ? BST_CHECKED : BST_UNCHECKED); ::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTNICKUID, dwFlags & MATCH_UIN ? BST_CHECKED : BST_UNCHECKED); ::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTTEXTENABLE, dwFlags & MATCH_TEXT ? BST_CHECKED : BST_UNCHECKED); - ::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTME, M->GetByte("Chat", "HighlightMe", 1) ? BST_CHECKED : BST_UNCHECKED); + ::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTME, M.GetByte("Chat", "HighlightMe", 1) ? BST_CHECKED : BST_UNCHECKED); ::SendMessage(hwndDlg, WM_USER + 100, 0, 0); } @@ -324,16 +324,16 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (iLen) { szBuf = reinterpret_cast(mir_alloc((iLen + 2) * sizeof(wchar_t))); ::GetDlgItemText(hwndDlg, IDC_HIGHLIGHTNICKPATTERN, szBuf, iLen + 1); - M->WriteTString(0, "Chat", "HighlightNames",szBuf); + db_set_ts(0, "Chat", "HighlightNames",szBuf); } iLen = ::GetWindowTextLength(::GetDlgItem(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN)); if (iLen) { szBuf = reinterpret_cast(mir_realloc(szBuf, sizeof(wchar_t) * (iLen + 2))); ::GetDlgItemText(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN, szBuf, iLen + 1); - M->WriteTString(0, "Chat", "HighlightWords", szBuf); + db_set_ts(0, "Chat", "HighlightWords", szBuf); } - else M->WriteTString(0, "Chat", "HighlightWords", L""); + else db_set_ts(0, "Chat", "HighlightWords", L""); mir_free(szBuf); BYTE dwFlags = (::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTNICKENABLE) ? MATCH_NICKNAME : 0) | @@ -342,8 +342,8 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (dwFlags & MATCH_NICKNAME) dwFlags |= (::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTNICKUID) ? MATCH_UIN : 0); - M->WriteByte("Chat", "HighlightEnabled", dwFlags); - M->WriteByte("Chat", "HighlightMe", ::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTME) ? 1 : 0); + db_set_b(0, "Chat", "HighlightEnabled", dwFlags); + db_set_b(0, "Chat", "HighlightMe", ::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTME) ? 1 : 0); g_Settings.Highlight->init(); } return TRUE; -- cgit v1.2.3