diff options
Diffstat (limited to 'plugins/Clist_modern/src/modern_clc.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 7c5a866e33..fdf0aead83 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -159,11 +159,11 @@ static int clcHookDbEventAdded(WPARAM hContact, LPARAM hDbEvent) if (hContact && hDbEvent) {
DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
- if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !(dbei.flags & DBEF_SENT)) {
- g_plugin.setDword(hContact, "mf_lastmsg", dbei.timestamp);
+ if ((dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE) && !dbei.bSent) {
+ g_plugin.setDword(hContact, "mf_lastmsg", dbei.getUnixtime());
ClcCacheEntry *pdnce = Clist_GetCacheEntry(hContact);
if (pdnce) {
- pdnce->dwLastMsgTime = dbei.timestamp;
+ pdnce->dwLastMsgTime = dbei.getUnixtime();
if (g_CluiData.hasSort(SORTBY_LASTMSG))
Clist_Broadcast(CLM_AUTOREBUILD, hContact, 0);
}
@@ -240,7 +240,7 @@ static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const wchar_ int foundindex;
for (; group; group = group->parent)
Clist_SetGroupExpand(hwnd, dat, group, 1);
- foundindex = g_clistApi.pfnGetRowsPriorTo(&dat->list, contactGroup, contactScanIndex);
+ foundindex = g_clistApi.pfnGetRowsPriorTo(dat, contactGroup, contactScanIndex);
if (fReturnAsFound)
return foundindex;
else if (nLastFound != -1 && fSearchUp && foundindex == index)
@@ -508,7 +508,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM }
else if (!contact->iSubNumber && contact->iSubAllocated > 0) {
if (changeGroupExpand == 1 && !contact->bSubExpanded) {
- dat->selection = cliGetRowsPriorTo(&dat->list, group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, group, -1);
selMoved = 1;
}
else if (changeGroupExpand == 1 && contact->bSubExpanded) {
@@ -540,7 +540,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM ClcContact *contact2;
ClcGroup *group2;
if (Clist_FindItem(hwnd, dat, contact->hContact, &contact2, &group2)) {
- int i = cliGetRowsPriorTo(&dat->list, group2, group2->cl.indexOf(contact2));
+ int i = cliGetRowsPriorTo(dat, group2, group2->cl.indexOf(contact2));
Clist_EnsureVisible(hwnd, dat, i + contact->iSubAllocated, 0);
}
}
@@ -551,7 +551,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM else {
if (changeGroupExpand == 1 && contact->type == CLCIT_CONTACT) {
if (group == &dat->list) { SetCapture(hwnd); return 0; }
- dat->selection = cliGetRowsPriorTo(&dat->list, group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, group, -1);
selMoved = 1;
}
else if (contact->type == CLCIT_GROUP) {
@@ -635,7 +635,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR ClcContact *contact;
ClcGroup *group;
if (Clist_FindItem(hwnd, dat, hitcontact->hContact, &contact, &group)) {
- int i = cliGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact));
+ int i = cliGetRowsPriorTo(dat, group, group->cl.indexOf(contact));
Clist_EnsureVisible(hwnd, dat, i + hitcontact->iSubAllocated, 0);
}
}
@@ -662,7 +662,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR static LRESULT clcOnActivate(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TRACE("clcOnActivate\n");
+ // TRACE("clcOnActivate\n");
if (dat->bCompactMode) {
cliRecalcScrollBar(hwnd, dat);
if (dat->hwndRenameEdit == nullptr)
@@ -757,9 +757,9 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP dat->selection = cliGetRowByIndex(dat, dat->selection, &selcontact, &selgroup);
Clist_SetGroupExpand(hwnd, dat, contact->group, -1);
if (dat->selection != -1) {
- dat->selection = cliGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = cliGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
if (dat->selection == -1)
- dat->selection = cliGetRowsPriorTo(&dat->list, contact->group, -1);
+ dat->selection = cliGetRowsPriorTo(dat, contact->group, -1);
}
if (dat->bCompactMode)
@@ -1401,7 +1401,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam if (hSelItem) {
ClcGroup *selgroup;
if (Clist_FindItem(hwnd, dat, hSelItem, &selcontact, &selgroup))
- dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
+ dat->selection = g_clistApi.pfnGetRowsPriorTo(dat, selgroup, selgroup->cl.indexOf(selcontact));
else
dat->selection = -1;
}
@@ -1645,11 +1645,11 @@ HRESULT ClcLoadModule() int ClcUnloadModule()
{
if (g_CluiData.bOldUseGroups != -1)
- Clist::UseGroups = g_CluiData.bOldUseGroups;
+ Clist::bUseGroups = g_CluiData.bOldUseGroups;
if (g_CluiData.bOldHideOffline != -1)
- Clist::HideOffline = g_CluiData.bOldHideOffline;
+ Clist::bHideOffline = g_CluiData.bOldHideOffline;
if (g_CluiData.bOldHideEmptyGroups != -1)
- Clist::HideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
+ Clist::bHideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
return 0;
}
|