summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clistsettings.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-28 11:27:27 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-28 11:27:27 +0000
commit7c2e75f14ad9dd186a85b17587c21c2561286581 (patch)
treefcd4db66a9b149cb7ee480a89d3f20582bea2823 /plugins/Clist_modern/src/modern_clistsettings.cpp
parent01433b81e943d57b1ec2ebb5758bd2a85d836753 (diff)
- 2nd & 3rd lines handling unification;
- no need to copy data to make async calls; - no need to launch a thread to save a couple of msecs on a very large roster; - unused code & params cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clistsettings.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp93
1 files changed, 0 insertions, 93 deletions
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index f244b0b54f..0c6ff8b492 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -26,16 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "modern_clist.h"
#include "modern_commonprototypes.h"
#include "modern_awaymsg.h"
-#include "modern_gettextasync.h"
void InsertContactIntoTree(MCONTACT hContact, int status);
-void CListSettings_FreeCacheItemDataOption(ClcCacheEntry *pDst, DWORD flag);
TCHAR* UnknownConctactTranslatedName = NULL;
void InitDisplayNameCache(void)
{
- InitCacheAsync();
InitAwayMsgModule();
}
@@ -44,96 +41,6 @@ void FreeDisplayNameCache()
UninitAwayMsgModule();
}
-void CListSettings_FreeCacheItemData(ClcCacheEntry *pDst)
-{
- CListSettings_FreeCacheItemDataOption(pDst, CCI_ALL);
-}
-
-void CListSettings_FreeCacheItemDataOption(ClcCacheEntry *pDst, DWORD flag)
-{
- if (!pDst)
- return;
-
- if (flag & CCI_NAME)
- mir_free_and_nil(pDst->tszName);
-
- if (flag & CCI_GROUP)
- mir_free_and_nil(pDst->tszGroup);
-
- if (flag & CCI_LINES) {
- mir_free_and_nil(pDst->szSecondLineText);
- mir_free_and_nil(pDst->szThirdLineText);
- pDst->ssSecondLine.DestroySmileyList();
- pDst->ssThirdLine.DestroySmileyList();
- }
-}
-
-int CListSettings_GetCopyFromCache(ClcCacheEntry *pDest, DWORD flag);
-int CListSettings_SetToCache(ClcCacheEntry *pSrc, DWORD flag);
-
-void CListSettings_CopyCacheItems(ClcCacheEntry *pDst, ClcCacheEntry *pSrc, DWORD flag)
-{
- if (!pDst || !pSrc) return;
- CListSettings_FreeCacheItemDataOption(pDst, flag);
-
- if (flag & CCI_NAME) pDst->tszName = mir_tstrdup(pSrc->tszName);
- if (flag & CCI_GROUP) pDst->tszGroup = mir_tstrdup(pSrc->tszGroup);
- if (flag & CCI_PROTO) pDst->m_pszProto = pSrc->m_pszProto;
- if (flag & CCI_STATUS) pDst->m_iStatus = pSrc->m_iStatus;
-
- if (flag & CCI_LINES) {
- mir_free(pDst->szThirdLineText);
- pDst->szThirdLineText = mir_tstrdup(pSrc->szThirdLineText);
-
- mir_free(pDst->szSecondLineText);
- pDst->szSecondLineText = mir_tstrdup(pSrc->szSecondLineText);
-
- pDst->ssThirdLine = pSrc->ssThirdLine;
- pDst->ssSecondLine = pSrc->ssSecondLine;
- }
-
- if (flag & CCI_TIME)
- pDst->hTimeZone = pSrc->hTimeZone;
-
- if (flag & CCI_OTHER) {
- pDst->bIsHidden = pSrc->bIsHidden;
- pDst->m_bNoHiddenOffline = pSrc->m_bNoHiddenOffline;
-
- pDst->m_bIsSub = pSrc->m_bIsSub;
- pDst->ApparentMode = pSrc->ApparentMode;
- pDst->NotOnList = pSrc->NotOnList;
- pDst->IdleTS = pSrc->IdleTS;
- pDst->ClcContact = pSrc->ClcContact;
- pDst->IsExpanded = pSrc->IsExpanded;
- }
-}
-
-int CListSettings_GetCopyFromCache(ClcCacheEntry *pDest, DWORD flag)
-{
- if (!pDest || !pDest->hContact)
- return -1;
-
- ClcCacheEntry *pSource = pcli->pfnGetCacheEntry(pDest->hContact);
- if (!pSource)
- return -1;
-
- CListSettings_CopyCacheItems(pDest, pSource, flag);
- return 0;
-}
-
-int CListSettings_SetToCache(ClcCacheEntry *pSrc, DWORD flag)
-{
- if (!pSrc || !pSrc->hContact)
- return -1;
-
- ClcCacheEntry *pDst = pcli->pfnGetCacheEntry(pSrc->hContact);
- if (!pDst)
- return -1;
-
- CListSettings_CopyCacheItems(pDst, pSrc, flag);
- return 0;
-}
-
void cliFreeCacheItem(ClcCacheEntry *p)
{
mir_free_and_nil(p->tszName);