summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clistsettings.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-10-30 16:41:09 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-10-30 16:41:09 +0000
commit211967c3ae7d510f2e63aac7fe912d040ad1ebc3 (patch)
treea65d43fbe91878ecc3008da5996e6e43faee257b /plugins/Clist_modern/src/modern_clistsettings.cpp
parente57ba22d8dd05efc14197c764daed53e61a59636 (diff)
old unused code that belongs to StdClist moved from the core to plugin
git-svn-id: http://svn.miranda-ng.org/main/trunk@15652 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clistsettings.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp33
1 files changed, 13 insertions, 20 deletions
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index dc047d848e..d17427c5ec 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -313,7 +313,7 @@ char *GetContactCachedProtocol(MCONTACT hContact)
int GetStatusForContact(MCONTACT hContact, char *szProto)
{
- return (szProto) ? (int)(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)) : ID_STATUS_OFFLINE;
+ return (szProto) ? db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) : ID_STATUS_OFFLINE;
}
void ClcCacheEntry::freeName()
@@ -366,10 +366,9 @@ int GetContactCachedStatus(MCONTACT hContact)
int ContactAdded(WPARAM hContact, LPARAM)
{
- if (!MirandaExiting()) {
+ if (!MirandaExiting())
cli_ChangeContactIcon(hContact, pcli->pfnIconFromStatusMode((char*)GetContactCachedProtocol(hContact), ID_STATUS_OFFLINE, hContact), 1); ///by FYR
- pcli->pfnSortContacts();
- }
+
return 0;
}
@@ -414,25 +413,19 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
}
- if (pdnce->bIsHidden != 1) {
- pdnce->m_cache_nStatus = cws->value.wVal;
- if (cws->value.wVal == ID_STATUS_OFFLINE)
- if (g_CluiData.bRemoveAwayMessageForOffline)
- db_set_s(hContact, "CList", "StatusMsg", "");
+ if (pdnce->bIsHidden)
+ return 0;
- if ((db_get_w(NULL, "CList", "SecondLineType", 0) == TEXT_STATUS_MESSAGE || db_get_w(NULL, "CList", "ThirdLineType", 0) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->m_cache_cszProto)
- amRequestAwayMsg(hContact);
+ pdnce->m_cache_nStatus = cws->value.wVal;
+ if (cws->value.wVal == ID_STATUS_OFFLINE)
+ if (g_CluiData.bRemoveAwayMessageForOffline)
+ db_set_s(hContact, "CList", "StatusMsg", "");
- pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0);
- cli_ChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0); //by FYR
- pcli->pfnSortContacts();
- }
- else {
- if (!(!strcmp(cws->szSetting, "LogonTS") || !strcmp(cws->szSetting, "TickTS") || !strcmp(cws->szSetting, "InfoTS")))
- pcli->pfnSortContacts();
+ if ((db_get_w(NULL, "CList", "SecondLineType", 0) == TEXT_STATUS_MESSAGE || db_get_w(NULL, "CList", "ThirdLineType", 0) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->m_cache_cszProto)
+ amRequestAwayMsg(hContact);
- return 0;
- }
+ pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0);
+ cli_ChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0); //by FYR
}
}