diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-27 08:05:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-27 08:05:12 +0000 |
commit | 248b320bc7e6ce0cfd6621d47a95b55e2264dd23 (patch) | |
tree | 5735f77b447dc0c1f41b9f1960dd4751cc6a0f83 /plugins/TabSRMM | |
parent | 939b54967dcda681318271d203eedd1dcf5ce934 (diff) |
sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@646 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/chat/chatprototypes.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/chat/manager.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/chat/services.cpp | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/plugins/TabSRMM/chat/chatprototypes.h b/plugins/TabSRMM/chat/chatprototypes.h index 066a25e919..06efc299d3 100644 --- a/plugins/TabSRMM/chat/chatprototypes.h +++ b/plugins/TabSRMM/chat/chatprototypes.h @@ -76,7 +76,7 @@ void SetActiveSession(const TCHAR* pszID, const char* pszModule); void SetActiveSessionEx(SESSION_INFO* si);
SESSION_INFO* GetActiveSession(void);
SESSION_INFO* SM_AddSession(const TCHAR* pszID, const char* pszModule);
-int SM_RemoveSession(const TCHAR* pszID, const char* pszModule);
+int SM_RemoveSession(const TCHAR* pszID, const char* pszModule, bool removeContact);
SESSION_INFO* SM_FindSession(const TCHAR* pszID, const char* pszModule);
USERINFO* SM_AddUser(const TCHAR* pszID, const char* pszModule, const TCHAR* pszUID, const TCHAR* pszNick, WORD wStatus);
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* currSession, SESSION_INFO* prevSession, const TCHAR* pszOriginal, const TCHAR* pszCurrent);
diff --git a/plugins/TabSRMM/chat/manager.cpp b/plugins/TabSRMM/chat/manager.cpp index 8a1e404ea5..d1c2a27aa3 100644 --- a/plugins/TabSRMM/chat/manager.cpp +++ b/plugins/TabSRMM/chat/manager.cpp @@ -98,7 +98,7 @@ SESSION_INFO* SM_AddSession(const TCHAR* pszID, const char* pszModule) return NULL;
}
-int SM_RemoveSession(const TCHAR* pszID, const char* pszModule)
+int SM_RemoveSession(const TCHAR* pszID, const char* pszModule, bool removeContact)
{
SESSION_INFO* pTemp = m_WndList, *pLast = NULL;
@@ -135,6 +135,9 @@ int SM_RemoveSession(const TCHAR* pszID, const char* pszModule) DBWriteContactSettingString(pTemp->hContact, pTemp->pszModule, "StatusBar", "");
DBDeleteContactSetting(pTemp->hContact, "CList", "StatusMsg");
+ if (removeContact)
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)pTemp->hContact, 0);
+
mir_free(pTemp->pszModule);
mir_free(pTemp->ptszID);
mir_free(pTemp->ptszName);
diff --git a/plugins/TabSRMM/chat/services.cpp b/plugins/TabSRMM/chat/services.cpp index a8f40a4dec..7f256f3d30 100644 --- a/plugins/TabSRMM/chat/services.cpp +++ b/plugins/TabSRMM/chat/services.cpp @@ -349,7 +349,7 @@ static int DoControl(GCEVENT * gce, WPARAM wp) break;
}
case SESSION_TERMINATE:
- return SM_RemoveSession(gce->pDest->ptszID, gce->pDest->pszModule);
+ return SM_RemoveSession(gce->pDest->ptszID, gce->pDest->pszModule, (gce->dwFlags & GCEF_REMOVECONTACT) != 0);
}
SM_SendMessage(gce->pDest->ptszID, gce->pDest->pszModule, GC_EVENT_CONTROL + WM_USER + 500, wp, 0);
}
|