diff options
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/stdafx.cxx | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 12 |
4 files changed, 9 insertions, 8 deletions
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 14845f77c9..3c1e0b864e 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -2000,7 +2000,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, TranslateDialogDefault(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
diff --git a/plugins/TipperYM/src/stdafx.cxx b/plugins/TipperYM/src/stdafx.cxx index 13f28e1314..f111565f38 100644 --- a/plugins/TipperYM/src/stdafx.cxx +++ b/plugins/TipperYM/src/stdafx.cxx @@ -1,5 +1,5 @@ /*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/plugins/TipperYM/src/stdafx.h b/plugins/TipperYM/src/stdafx.h index 9e0a280fa9..83205f53fe 100644 --- a/plugins/TipperYM/src/stdafx.h +++ b/plugins/TipperYM/src/stdafx.h @@ -54,6 +54,7 @@ Boston, MA 02111-1307, USA. #include <m_variables.h>
#include <m_smileyadd.h>
#include <m_imgsrvc.h>
+#include <m_tipper.h>
#include "resource.h"
#include "version.h"
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index bdc900221e..7bdbcbe36f 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -124,8 +124,8 @@ uint32_t LastMessageTimestamp(MCONTACT hContact, bool received) for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) { DBEVENTINFO dbei = {}; db_event_get(hDbEvent, &dbei); - if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT) == received) - return dbei.timestamp; + if (dbei.eventType == EVENTTYPE_MESSAGE && dbei.bSent != received) + return dbei.getUnixtime(); } return 0; @@ -166,7 +166,7 @@ wchar_t* GetLastMessageText(MCONTACT hContact, bool received) { for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) { DB::EventInfo dbei(hDbEvent); - if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT) == received) { + if (dbei.eventType == EVENTTYPE_MESSAGE && dbei.bSent != received) { wchar_t *swzMsg = dbei.getText(); StripBBCodesInPlace(swzMsg); return swzMsg; @@ -367,9 +367,9 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int DBEVENTINFO dbei = {}; if (!db_event_get(dbe, &dbei)) { if (dbei.eventType == EVENTTYPE_MESSAGE) { - dwNewTs = max(dwNewTs, dbei.timestamp); - if (dbei.timestamp > dwLastTs) { - if (dbei.flags & DBEF_SENT) dwCountOut++; + dwNewTs = max(dwNewTs, dbei.getUnixtime()); + if (dbei.getUnixtime() > dwLastTs) { + if (dbei.bSent) dwCountOut++; else dwCountIn++; } else break; |