diff options
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/cmdlist.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/cmdlist.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/globals.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 49 | ||||
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 20 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 16 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgtimedout.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/srmm.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/statusicon.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.cxx | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/version.h | 2 |
17 files changed, 49 insertions, 70 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index c81f38912f..10b0754864 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -1,7 +1,7 @@ /*
Chat module plugin for Miranda IM
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 465fb649b2..87347d2a19 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -1,7 +1,7 @@ /*
Chat module plugin for Miranda IM
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index ab90a67a1f..a0226ee979 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -93,7 +93,7 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, LPARAM lParam) dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF | (p->flags & DBEF_RTL ? DBEF_RTL : 0);
dbei.szModule = Proto_GetBaseAccountName(hContact);
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
dbei.cbBlob = (uint32_t)(mir_strlen(p->szMsg) + 1);
dbei.pBlob = p->szMsg;
dbei.szId = (char *)lParam;
diff --git a/src/core/stdmsg/src/cmdlist.h b/src/core/stdmsg/src/cmdlist.h index a67bc73d56..c960f0df02 100644 --- a/src/core/stdmsg/src/cmdlist.h +++ b/src/core/stdmsg/src/cmdlist.h @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp index a9a54a44c7..bde5c66f6e 100644 --- a/src/core/stdmsg/src/globals.cpp +++ b/src/core/stdmsg/src/globals.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 4b481a6eba..e76bca86c1 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -47,7 +47,6 @@ CMsgDialog::CMsgDialog(CTabbedWindow *pOwner, MCONTACT hContact) : m_iSplitterX = g_Settings.iSplitterX;
m_splitterX.OnChange = Callback(this, &CMsgDialog::onSplitterX);
- m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_NickList);
}
@@ -141,8 +140,8 @@ bool CMsgDialog::OnInitDialog() while (MEVENT hdbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
db_event_get(hdbEvent, &dbei);
- if ((dbei.eventType == EVENTTYPE_MESSAGE) && !(dbei.flags & DBEF_SENT)) {
- m_lastMessage = dbei.timestamp;
+ if ((dbei.eventType == EVENTTYPE_MESSAGE) && !dbei.bSent) {
+ m_lastMessage = dbei.getUnixtime();
bUpdate = true;
break;
}
@@ -263,24 +262,6 @@ void CMsgDialog::OnActivate() SetFocus(m_message.GetHwnd());
}
-void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
-{
- if (!pButton->Enabled())
- return;
-
- m_bFilterEnabled = !m_bFilterEnabled;
- UpdateFilterButton();
-
- if (m_bFilterEnabled && !g_chatApi.bRightClickFilter)
- ShowFilterMenu();
- else {
- if (m_hwndFilter)
- SendMessage(m_hwndFilter, WM_CLOSE, 0, 0);
-
- RedrawLog();
- }
-}
-
void CMsgDialog::onClick_NickList(CCtrlButton *pButton)
{
if (!pButton->Enabled() || m_si->iType == GCW_SERVER)
@@ -766,11 +747,11 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) if (!m_message.SendMsg(EM_CANREDO, 0, 0))
EnableMenuItem(mwpd.hMenu, IDM_REDO, MF_BYCOMMAND | MF_GRAYED);
- if (!m_message.SendMsg(EM_CANPASTE, 0, 0)) {
- if (!IsClipboardFormatAvailable(CF_HDROP) && !IsClipboardFormatAvailable(CF_BITMAP))
+ if (!m_message.SendMsg(EM_CANPASTE, 0, 0))
+ if (!IsClipboardFormatAvailable(CF_HDROP) && !IsClipboardFormatAvailable(CF_BITMAP)) {
EnableMenuItem(mwpd.hMenu, IDM_PASTE, MF_BYCOMMAND | MF_GRAYED);
- EnableMenuItem(mwpd.hMenu, IDM_PASTESEND, MF_BYCOMMAND | MF_GRAYED);
- }
+ EnableMenuItem(mwpd.hMenu, IDM_PASTESEND, MF_BYCOMMAND | MF_GRAYED);
+ }
if (lParam == 0xFFFFFFFF) {
m_message.SendMsg(EM_POSFROMCHAR, (WPARAM)&mwpd.pt, sel.cpMax);
@@ -1208,18 +1189,18 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei) if (m_hDbEventFirst == 0)
m_hDbEventFirst = hDbEvent;
- bool isMessage = (dbei.eventType == EVENTTYPE_MESSAGE), isSent = ((dbei.flags & DBEF_SENT) != 0);
+ bool isMessage = (dbei.eventType == EVENTTYPE_MESSAGE);
bool isActive = IsActive();
if (DbEventIsShown(dbei)) {
// Sounds *only* for sent messages, not for custom events
- if (isMessage && !isSent) {
+ if (isMessage && !dbei.bSent) {
if (isActive)
Skin_PlaySound("RecvMsgActive");
else
Skin_PlaySound("RecvMsgInactive");
}
- if (isMessage && !isSent) {
- m_lastMessage = dbei.timestamp;
+ if (isMessage && !dbei.bSent) {
+ m_lastMessage = dbei.getUnixtime();
UpdateLastMessage();
}
@@ -1229,7 +1210,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei) RemakeLog();
// Flash window *only* for messages, not for custom events
- if (isMessage && !isSent)
+ if (isMessage && !dbei.bSent)
if (!isActive || !m_pLog->AtBottom())
StartFlash();
}
@@ -1260,15 +1241,15 @@ bool CMsgDialog::GetFirstEvent() case LOADHISTORY_TIME:
DBEVENTINFO dbei = {};
if (m_hDbEventFirst == 0)
- dbei.timestamp = (uint32_t)time(0);
+ dbei.iTimestamp = (uint32_t)time(0);
else
db_event_get(m_hDbEventFirst, &dbei);
- uint32_t firstTime = dbei.timestamp - 60 * g_plugin.nLoadTime;
+ uint32_t firstTime = dbei.getUnixtime() - 60 * g_plugin.nLoadTime;
while (MEVENT hPrevEvent = pCursor.FetchNext()) {
dbei.cbBlob = 0;
db_event_get(hPrevEvent, &dbei);
- if (dbei.timestamp < firstTime)
+ if (dbei.getUnixtime() < firstTime)
break;
m_hDbEventFirst = hPrevEvent;
}
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 57fabb7510..f120d26c27 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -300,7 +300,7 @@ public: }
if (g_plugin.bShowIcons) {
- int i = ((dbei.eventType == EVENTTYPE_MESSAGE) ? ((dbei.flags & DBEF_SENT) ? LOGICON_MSG_OUT : LOGICON_MSG_IN) : LOGICON_MSG_NOTICE);
+ int i = ((dbei.eventType == EVENTTYPE_MESSAGE) ? (dbei.bSent ? LOGICON_MSG_OUT : LOGICON_MSG_IN) : LOGICON_MSG_NOTICE);
buf.Append("\\f0\\fs14");
buf.Append(pLogIconBmpBits[i]);
@@ -321,9 +321,9 @@ public: else
szFormat = g_plugin.bShowDate ? L"d t" : L"t";
- TimeZone_PrintTimeStamp(nullptr, dbei.timestamp, szFormat, str, _countof(str), 0);
+ TimeZone_PrintTimeStamp(nullptr, dbei.getUnixtime(), szFormat, str, _countof(str), 0);
- SetToStyle((dbei.flags & DBEF_SENT) ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME, buf);
+ SetToStyle(dbei.bSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME, buf);
AppendToBufferWithRTF(buf, str);
showColon = 1;
}
@@ -331,7 +331,7 @@ public: if (g_plugin.bShowNames && dbei.eventType != EVENTTYPE_JABBER_CHATSTATES && dbei.eventType != EVENTTYPE_JABBER_PRESENCE) {
wchar_t *szName;
- if (dbei.flags & DBEF_SENT) {
+ if (dbei.bSent) {
if (wchar_t *p = Contact::GetInfo(CNF_DISPLAY, 0, dbei.szModule))
szName = NEWWSTR_ALLOCA(p);
else
@@ -339,19 +339,19 @@ public: }
else szName = Clist_GetContactDisplayName(dat->hContact);
- SetToStyle((dbei.flags & DBEF_SENT) ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME, buf);
+ SetToStyle(dbei.bSent ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME, buf);
AppendToBufferWithRTF(buf, szName);
showColon = 1;
}
if (showColon)
- SetToStyle((dbei.flags & DBEF_SENT) ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON, buf);
+ SetToStyle(dbei.bSent ? MSGFONTID_MYCOLON : MSGFONTID_YOURCOLON, buf);
wchar_t *msg, *szName;
switch (dbei.eventType) {
case EVENTTYPE_JABBER_CHATSTATES:
case EVENTTYPE_JABBER_PRESENCE:
- if (dbei.flags & DBEF_SENT) {
+ if (dbei.bSent) {
if (wchar_t *p = Contact::GetInfo(CNF_DISPLAY, 0, dbei.szModule)) {
szName = NEWWSTR_ALLOCA(p);
mir_free(p);
@@ -379,7 +379,7 @@ public: InsertFileLink(buf, dat->hDbEvent, blob);
}
else {
- AppendToBufferWithRTF(buf, (dbei.flags & DBEF_SENT) ? TranslateT("File sent") : TranslateT("File received"));
+ AppendToBufferWithRTF(buf, dbei.bSent ? TranslateT("File sent") : TranslateT("File received"));
buf.Append(": ");
AppendToBufferWithRTF(buf, blob.getName());
@@ -395,7 +395,7 @@ public: case EVENTTYPE_MESSAGE:
default:
msg = dbei.getText();
- SetToStyle((dbei.eventType == EVENTTYPE_MESSAGE) ? ((dbei.flags & DBEF_SENT) ? MSGFONTID_MYMSG : MSGFONTID_YOURMSG) : MSGFONTID_NOTICE, buf);
+ SetToStyle((dbei.eventType == EVENTTYPE_MESSAGE) ? (dbei.bSent ? MSGFONTID_MYMSG : MSGFONTID_YOURMSG) : MSGFONTID_NOTICE, buf);
AppendToBufferWithRTF(buf, msg);
mir_free(msg);
}
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 6020167100..f0a0266488 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -429,7 +429,7 @@ public: void ResetCList(CCtrlClc::TEventInfo* = nullptr)
{
- clist.SetUseGroups(Clist::UseGroups);
+ clist.SetUseGroups(Clist::bUseGroups);
clist.SetHideEmptyGroups(1);
}
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 9f3f58a893..57ed8bcc9b 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -134,7 +134,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) if (!dbei)
return 0;
- if (dbei.markedRead() || !DbEventIsShown(dbei))
+ if (dbei.bRead || !DbEventIsShown(dbei))
return 0;
Utils_InvokeAsync(new CAutoPopup(hContact, hDbEvent));
@@ -277,7 +277,7 @@ struct MSavedEvent static void RestoreUnreadMessageAlerts(void)
{
- OBJLIST<MSavedEvent> arEvents(10, NumericKeySortT);
+ OBJLIST<MSavedEvent> events(10, NumericKeySortT);
for (auto &hContact : Contacts()) {
if (Contact::IsGroupChat(hContact) || !Proto_GetBaseAccountName(hContact))
@@ -290,7 +290,7 @@ static void RestoreUnreadMessageAlerts(void) if (!dbei)
continue;
- if (!dbei.markedRead() && DbEventIsShown(dbei)) {
+ if (!dbei.bRead && DbEventIsShown(dbei)) {
int windowAlreadyExists = Srmm_FindWindow(hContact) != nullptr;
if (windowAlreadyExists)
continue;
@@ -305,12 +305,12 @@ static void RestoreUnreadMessageAlerts(void) if (autoPopup && !windowAlreadyExists)
GetContainer()->AddPage(hContact);
else
- arEvents.insert(new MSavedEvent(hContact, hDbEvent));
+ events.insert(new MSavedEvent(hContact, hDbEvent));
}
}
}
- for (auto &e : arEvents)
+ for (auto &e : events)
Srmm_AddEvent(e->hContact, e->hEvent);
}
@@ -388,14 +388,14 @@ int RegisterToolbarIcons(WPARAM, LPARAM) bbd.dwDefPos = 30;
bbd.hIcon = g_plugin.getIconHandle(IDI_COLOR);
bbd.pwszText = LPGENW("&Color");
- bbd.pwszTooltip = LPGENW("Select a foreground color for the text");
+ bbd.pwszTooltip = LPGENW("Select text color");
g_plugin.addButton(&bbd);
bbd.dwButtonID = IDC_SRMM_BKGCOLOR;
bbd.dwDefPos = 35;
bbd.hIcon = g_plugin.getIconHandle(IDI_BKGCOLOR);
bbd.pwszText = LPGENW("&Background color");
- bbd.pwszTooltip = LPGENW("Select a background color for the text");
+ bbd.pwszTooltip = LPGENW("Select background color");
g_plugin.addButton(&bbd);
// chat buttons
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 56ec7164ba..438d70b1ad 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -101,7 +101,6 @@ public: void onChange_Text(CCtrlEdit *);
void onClick_Ok(CCtrlButton *);
- void onClick_Filter(CCtrlButton *);
void onClick_NickList(CCtrlButton *);
void UpdateReadChars(void);
@@ -123,7 +122,6 @@ public: bool m_bIsAutoRTL = false;
HBITMAP m_avatarPic = 0;
wchar_t *m_wszInitialText = 0;
- MWindow m_hwndFilter;
int GetImageId() const;
diff --git a/src/core/stdmsg/src/msgtimedout.cpp b/src/core/stdmsg/src/msgtimedout.cpp index c0a50af3d1..e38440b4ca 100644 --- a/src/core/stdmsg/src/msgtimedout.cpp +++ b/src/core/stdmsg/src/msgtimedout.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp index af9f94f750..b8a74d2b22 100644 --- a/src/core/stdmsg/src/srmm.cpp +++ b/src/core/stdmsg/src/srmm.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/statusicon.cpp b/src/core/stdmsg/src/statusicon.cpp index 9c47d5f90a..b9655ac340 100644 --- a/src/core/stdmsg/src/statusicon.cpp +++ b/src/core/stdmsg/src/statusicon.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/stdafx.cxx b/src/core/stdmsg/src/stdafx.cxx index 07335ea48e..9baeae5952 100644 --- a/src/core/stdmsg/src/stdafx.cxx +++ b/src/core/stdmsg/src/stdafx.cxx @@ -1,6 +1,6 @@ /*
-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/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 9dc20f0b12..c64bddebea 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index b127e1104d..10497c8ba9 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -1,6 +1,6 @@ /*
-Copyright 2000-12 Miranda IM, 2012-24 Miranda NG team,
+Copyright 2000-12 Miranda IM, 2012-25 Miranda NG team,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdmsg/src/version.h b/src/core/stdmsg/src/version.h index 0287405d5c..fe16626c31 100644 --- a/src/core/stdmsg/src/version.h +++ b/src/core/stdmsg/src/version.h @@ -9,4 +9,4 @@ #define __DESCRIPTION "Core module for send/receive instant messages."
#define __AUTHOR "Miranda NG team"
#define __AUTHORWEB "https://miranda-ng.org/p/StdMsg"
-#define __COPYRIGHT "© 2012-24 Miranda NG team"
+#define __COPYRIGHT "© 2012-25 Miranda NG team"
|