summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat/services.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-27 15:34:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-27 15:34:33 +0000
commitb48741c8d0ed916d2cdd41956667ec4082ab245a (patch)
tree1d0e149514343e602495e85861649e173324fd01 /plugins/TabSRMM/src/chat/services.cpp
parentb1d29a5793fc80dd1c0d26e4ba900853fad41809 (diff)
obsolete helpers removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@5152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/chat/services.cpp')
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index 2c656a335b..7ffaa7da02 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -82,7 +82,7 @@ int Chat_ModulesLoaded(WPARAM wParam, LPARAM lParam)
CList_SetAllOffline(TRUE, NULL);
- g_Settings.MathMod = ServiceExists(MATH_RTF_REPLACE_FORMULAE) && M->GetByte("Chat", "MathModSupport", 0);
+ g_Settings.MathMod = ServiceExists(MATH_RTF_REPLACE_FORMULAE) && M.GetByte("Chat", "MathModSupport", 0);
return 0;
}
@@ -226,8 +226,8 @@ INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam)
si->ptszName = a2tf(gcw->ptszName, gcw->dwFlags);
si->ptszStatusbarText = a2tf(gcw->ptszStatusbarText, gcw->dwFlags);
si->iSplitterX = g_Settings.iSplitterX;
- si->bFilterEnabled = M->GetByte(si->hContact, "Chat", "FilterEnabled", M->GetByte("Chat", "FilterEnabled", 0));
- si->bNicklistEnabled = M->GetByte("Chat", "ShowNicklist", 1);
+ si->bFilterEnabled = db_get_b(si->hContact, "Chat", "FilterEnabled", M.GetByte("Chat", "FilterEnabled", 0));
+ si->bNicklistEnabled = M.GetByte("Chat", "ShowNicklist", 1);
if (!(gcw->dwFlags & GC_UNICODE)) {
si->pszID = mir_strdup(gcw->pszID);
si->pszName = mir_strdup(gcw->pszName);
@@ -249,7 +249,7 @@ INT_PTR Service_NewChat(WPARAM wParam, LPARAM lParam)
db_set_s(si->hContact, si->pszModule , "Topic", "");
db_unset(si->hContact, "CList", "StatusMsg");
if (si->ptszStatusbarText)
- M->WriteTString(si->hContact, si->pszModule, "StatusBar", si->ptszStatusbarText);
+ db_set_ts(si->hContact, si->pszModule, "StatusBar", si->ptszStatusbarText);
else
db_set_s(si->hContact, si->pszModule, "StatusBar", "");
if (si->hContact)
@@ -305,7 +305,7 @@ static int DoControl(GCEVENT * gce, WPARAM wp)
si = SM_FindSession(gce->pDest->ptszID, gce->pDest->pszModule);
if (si) {
si->bInitDone = TRUE;
- if (wp != SESSION_INITDONE || M->GetByte("Chat", "PopupOnJoin", 0) == 0)
+ if (wp != SESSION_INITDONE || M.GetByte("Chat", "PopupOnJoin", 0) == 0)
ShowRoom(si, wp, TRUE);
return 0;
}
@@ -369,7 +369,7 @@ static int DoControl(GCEVENT * gce, WPARAM wp)
if (si) {
replaceStr(&si->ptszStatusbarText, gce->ptszText);
if (si->ptszStatusbarText)
- M->WriteTString(si->hContact, si->pszModule, "StatusBar", si->ptszStatusbarText);
+ db_set_ts(si->hContact, si->pszModule, "StatusBar", si->ptszStatusbarText);
else
db_set_s(si->hContact, si->pszModule, "StatusBar", "");
if (si->hWnd)
@@ -423,10 +423,10 @@ static void AddUser(GCEVENT * gce)
HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup)
{
HANDLE hContact = si->hContact;
- if (M->FindWindow(hContact) != 0)
+ if (M.FindWindow(hContact) != 0)
return 0;
- if (hContact != 0 && M->GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
if ((pContainer = FindMatchingContainer(_T("default"), hContact)) == NULL) {
TCHAR szName[CONTAINER_NAMELEN + 1];
@@ -449,7 +449,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
TCHAR newcontactname[128];
if ( lstrlen(contactName) > 0) {
- if (M->GetByte("cuttitle", 0))
+ if (M.GetByte("cuttitle", 0))
CutContactName(contactName, newcontactname, SIZEOF(newcontactname));
else {
lstrcpyn(newcontactname, contactName, SIZEOF(newcontactname));
@@ -473,7 +473,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
ShowWindow(pContainer->hwndActive, SW_HIDE);
{
- int iTabIndex_wanted = M->GetDword(hContact, "tabindex", pContainer->iChilds * 100);
+ int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->iChilds * 100);
int iCount = TabCtrl_GetItemCount(hwndTab);
TCITEM item = {0};
HWND hwnd;
@@ -489,7 +489,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
hwnd = (HWND)item.lParam;
dat = (struct TWindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (dat) {
- relPos = M->GetDword(dat->hContact, "tabindex", i * 100);
+ relPos = M.GetDword(dat->hContact, "tabindex", i * 100);
if (iTabIndex_wanted <= relPos)
pContainer->iTabIndex = i;
}
@@ -555,7 +555,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
}
}
- if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled && !M->GetByte("forceAeroPeek", 0))
+ if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled && !M.GetByte("forceAeroPeek", 0))
CWarning::show(CWarning::WARN_AEROPEEK_SKIN, MB_ICONWARNING|MB_OK);
return hwndNew; // return handle of the new dialog
}
@@ -664,9 +664,9 @@ INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam)
if (si) {
if (gce->pszText) {
replaceStr(&si->ptszTopic, RemoveFormatting(gce->ptszText));
- M->WriteTString(si->hContact, si->pszModule , "Topic", /*RemoveFormatting*/(si->ptszTopic));
- if (M->GetByte("Chat", "TopicOnClist", 1))
- M->WriteTString(si->hContact, "CList" , "StatusMsg", /*RemoveFormatting*/(si->ptszTopic));
+ db_set_ts(si->hContact, si->pszModule , "Topic", /*RemoveFormatting*/(si->ptszTopic));
+ if (M.GetByte("Chat", "TopicOnClist", 1))
+ db_set_ts(si->hContact, "CList" , "StatusMsg", /*RemoveFormatting*/(si->ptszTopic));
if (si->hWnd)
SendMessage(si->hWnd, DM_INVALIDATEPANEL, 0, 0);
}
@@ -691,7 +691,7 @@ INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam)
if (!(gce->dwFlags & GC_UNICODE)) {
fFreeText = TRUE;
if (si)
- gce->ptszText = a2tf(gce->ptszText, gce->dwFlags, M->GetDword(si->hContact, "ANSIcodepage", 0));
+ gce->ptszText = a2tf(gce->ptszText, gce->dwFlags, M.GetDword(si->hContact, "ANSIcodepage", 0));
else
gce->ptszText = a2tf(gce->ptszText, gce->dwFlags);
}
@@ -830,7 +830,7 @@ int CreateServiceFunctions(void)
if (ServiceExists(MS_GC_REGISTER)) {
LRESULT result = CWarning::show(CWarning::WARN_CHAT_ENABLED, CWarning::CWF_NOALLOWHIDE | MB_YESNOCANCEL | MB_ICONQUESTION);
if (result == IDYES)
- M->WriteByte("PluginDisable", "chat.dll", 1);
+ db_set_b(0, "PluginDisable", "chat.dll", 1);
return 0;
}
PluginConfig.m_chat_enabled = true;