summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-01 18:23:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-01 18:23:27 +0300
commitc9027518b426a134006a7335184df8f9205b2938 (patch)
treed74c7ad6a446c462d559edc9ae2f584f955fb2fc /plugins
parent7ce5ce71c631671061ba13fd30b97075fa5f3e63 (diff)
fixes #2371 (NewStory: add grouping support)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/res/resource.rc86
-rw-r--r--plugins/NewStory/src/history_array.cpp22
-rw-r--r--plugins/NewStory/src/history_array.h15
-rw-r--r--plugins/NewStory/src/history_control.cpp24
-rw-r--r--plugins/NewStory/src/main.cpp5
-rw-r--r--plugins/NewStory/src/options.cpp45
-rw-r--r--plugins/NewStory/src/resource.h79
-rw-r--r--plugins/NewStory/src/stdafx.h3
-rw-r--r--plugins/NewStory/src/templates.cpp3
-rw-r--r--plugins/NewStory/src/templates.h1
10 files changed, 187 insertions, 96 deletions
diff --git a/plugins/NewStory/res/resource.rc b/plugins/NewStory/res/resource.rc
index 04e2d80019..e9f24e3fac 100644
--- a/plugins/NewStory/res/resource.rc
+++ b/plugins/NewStory/res/resource.rc
@@ -26,30 +26,51 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-ICO_NEWSTORY ICON "newstory.ico"
-ICO_USERINFO ICON "userinfo.ico"
-ICO_USERMENU ICON "usermenu.ico"
-ICO_SEARCH ICON "search.ico"
-ICO_OPTIONS ICON "options.ico"
-ICO_FILTER ICON "filter.ico"
-ICO_EXPORT ICON "export.ico"
-ICO_COPY ICON "copy.ico"
-ICO_SENDMSG ICON "sendmsg.ico"
-ICO_MSGIN ICON "msgin.ico"
-ICO_MSGOUT ICON "msgout.ico"
-ICO_SIGNIN ICON "signin.ico"
-ICO_FILE ICON "file.ico"
-ICO_URL ICON "url.ico"
-ICO_UNKNOWN ICON "unknown.ico"
-ICO_FINDPREV ICON "findprev.ico"
-ICO_FINDNEXT ICON "findnext.ico"
-ICO_CALENDAR ICON "calendar.ico"
-ICO_RESET ICON "reset.ico"
-ICO_PREVIEW ICON "reload.ico"
-ICO_VARHELP ICON "vars.ico"
-ICO_TPLGROUP ICON "folder.ico"
-ICO_TIMETREE ICON "timetree.ico"
-/////////////////////////////////////////////////////////////////////////////
+ICO_NEWSTORY ICON "newstory.ico"
+
+ICO_USERINFO ICON "userinfo.ico"
+
+ICO_USERMENU ICON "usermenu.ico"
+
+ICO_SEARCH ICON "search.ico"
+
+ICO_OPTIONS ICON "options.ico"
+
+ICO_FILTER ICON "filter.ico"
+
+ICO_EXPORT ICON "export.ico"
+
+ICO_COPY ICON "copy.ico"
+
+ICO_SENDMSG ICON "sendmsg.ico"
+
+ICO_MSGIN ICON "msgin.ico"
+
+ICO_MSGOUT ICON "msgout.ico"
+
+ICO_SIGNIN ICON "signin.ico"
+
+ICO_FILE ICON "file.ico"
+
+ICO_URL ICON "url.ico"
+
+ICO_UNKNOWN ICON "unknown.ico"
+
+ICO_FINDPREV ICON "findprev.ico"
+
+ICO_FINDNEXT ICON "findnext.ico"
+
+ICO_CALENDAR ICON "calendar.ico"
+
+ICO_RESET ICON "reset.ico"
+
+ICO_PREVIEW ICON "reload.ico"
+
+ICO_VARHELP ICON "vars.ico"
+
+ICO_TPLGROUP ICON "folder.ico"
+
+ICO_TIMETREE ICON "timetree.ico"
/////////////////////////////////////////////////////////////////////////////
@@ -147,6 +168,14 @@ BEGIN
CONTROL "",IDC_MONTHCALENDAR1,"SysMonthCal32",MCS_NOTODAYCIRCLE | WS_TABSTOP,0,0,98,85
END
+IDD_OPT_ADVANCED DIALOGEX 0, 0, 307, 223
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "Group messages",IDC_GROUPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,9,289,14
+ GROUPBOX "Log window",IDC_STATIC,0,0,307,29
+END
+
IDD_OPT_TEMPLATES DIALOGEX 0, 0, 307, 223
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -248,6 +277,10 @@ BEGIN
BEGIN
END
+ IDD_OPT_ADVANCED, DIALOG
+ BEGIN
+ END
+
IDD_OPT_TEMPLATES, DIALOG
BEGIN
LEFTMARGIN, 7
@@ -406,6 +439,11 @@ BEGIN
0
END
+IDD_OPT_ADVANCED AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp
index 2f9089c92b..0a021831d4 100644
--- a/plugins/NewStory/src/history_array.cpp
+++ b/plugins/NewStory/src/history_array.cpp
@@ -30,6 +30,7 @@ bool Filter::check(ItemData *item)
return false;
}
}
+
if (flags & (EVENTTEXT | EVENTONLY)) {
item->loadInline(ItemData::ELM_DATA);
return CheckFilter(item->getWBuf(), text);
@@ -100,6 +101,18 @@ bool ItemData::load(EventLoadMode mode)
return false;
}
+bool ItemData::isGrouped() const
+{
+ if (pPrev && g_plugin.bMsgGrouping) {
+ if (!pPrev->dbeOk)
+ pPrev->load(EventLoadMode::ELM_DATA);
+
+ if (pPrev->hContact == hContact && (pPrev->dbe.flags & DBEF_SENT) == (dbe.flags & DBEF_SENT))
+ return true;
+ }
+ return false;
+}
+
ItemData::~ItemData()
{
if (dbeOk && dbe.pBlob) {
@@ -164,19 +177,20 @@ void HistoryArray::addChatEvent(SESSION_INFO *si, LOGINFO *lin)
}
}
-bool HistoryArray::addEvent(MCONTACT hContact, MEVENT hEvent, int count, ItemData::EventLoadMode mode)
+bool HistoryArray::addEvent(MCONTACT hContact, MEVENT hEvent, int count)
{
if (count == -1)
count = MAXINT;
+ int numItems = getCount();
+ auto *pPrev = (numItems == 0) ? nullptr : get(numItems - 1);
+
for (int i = 0; hEvent && i < count; i++) {
auto &p = allocateItem();
p.hContact = hContact;
p.hEvent = hEvent;
+ p.pPrev = pPrev; pPrev = &p;
- if (mode != ItemData::ELM_NOTHING)
- p.load(mode);
-
hEvent = db_event_next(hContact, hEvent);
}
diff --git a/plugins/NewStory/src/history_array.h b/plugins/NewStory/src/history_array.h
index 8b670fce8f..02a2b7f471 100644
--- a/plugins/NewStory/src/history_array.h
+++ b/plugins/NewStory/src/history_array.h
@@ -10,25 +10,26 @@ struct ItemData
ELM_DATA
};
- BYTE flags = 0;
-
MCONTACT hContact = 0;
MEVENT hEvent = 0;
+ bool wtext_del = false;
+ bool bSelected = false;
bool dbeOk = false;
- DBEVENTINFO dbe;
- bool wtext_del = false;
+ DBEVENTINFO dbe;
wchar_t *wtext = 0;
-
wchar_t *wszNick = 0;
HANDLE data = 0;
+ ItemData *pPrev = 0;
ItemData() { memset(&dbe, 0, sizeof(dbe)); }
~ItemData();
bool load(EventLoadMode mode);
+ bool isGrouped() const;
+
inline bool loadInline(EventLoadMode mode)
{
if (((mode >= ItemData::ELM_INFO) && !dbeOk) || ((mode == ItemData::ELM_DATA) && !dbe.pBlob))
@@ -95,8 +96,6 @@ public:
enum
{
- HIF_SELECTED = 0x01,
-
FILTER_TIME = 0x01,
FILTER_TYPE = 0x02,
FILTER_DIRECTION = 0x04,
@@ -131,7 +130,7 @@ public:
HistoryArray();
~HistoryArray();
- bool addEvent(MCONTACT hContact, MEVENT hEvent, int count, ItemData::EventLoadMode mode = ItemData::ELM_NOTHING);
+ bool addEvent(MCONTACT hContact, MEVENT hEvent, int count);
void addChatEvent(SESSION_INFO *si, LOGINFO *pEvent);
void clear();
int getCount() const;
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 0cd1aa776e..2621bf6d43 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -200,7 +200,7 @@ struct NewstoryListData : public MZeroedObject
int fontid;
switch (item->dbe.eventType) {
case EVENTTYPE_MESSAGE:
- tpl = TPL_MESSAGE;
+ tpl = item->isGrouped() ? TPL_MSG_GRP : TPL_MESSAGE;
fontid = !(item->dbe.flags & DBEF_SENT) ? FONT_INMSG : FONT_OUTMSG;
break;
@@ -251,7 +251,7 @@ struct NewstoryListData : public MZeroedObject
int PaintItem(HDC hdc, int index, int top, int width)
{
- ItemData *item = items.get(index, ItemData::ELM_DATA);
+ auto *item = items.get(index, ItemData::ELM_DATA);
// LOGFONT lfText;
COLORREF clText, clBack, clLine;
@@ -260,7 +260,7 @@ struct NewstoryListData : public MZeroedObject
int colorid;
switch (item->dbe.eventType) {
case EVENTTYPE_MESSAGE:
- tpl = TPL_MESSAGE;
+ tpl = item->isGrouped() ? TPL_MSG_GRP : TPL_MESSAGE;
fontid = !(item->dbe.flags & DBEF_SENT) ? FONT_INMSG : FONT_OUTMSG;
colorid = !(item->dbe.flags & DBEF_SENT) ? COLOR_INMSG : COLOR_OUTMSG;
break;
@@ -302,7 +302,7 @@ struct NewstoryListData : public MZeroedObject
break;
}
clText = g_fontTable[fontid].cl;
- if (item->flags & HIF_SELECTED) {
+ if (item->bSelected) {
MTextSendMessage(0, item->data, EM_SETSEL, 0, -1);
clText = g_colorTable[COLOR_SELTEXT].cl;
clLine = GetSysColor(COLOR_HIGHLIGHTTEXT);
@@ -481,7 +481,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
for (int i = start; i <= end; ++i) {
auto *p = data->items.get(i, ItemData::ELM_NOTHING);
- p->flags |= HIF_SELECTED;
+ p->bSelected = true;
}
InvalidateRect(hwnd, 0, FALSE);
@@ -497,7 +497,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
for (int i = start; i <= end; ++i) {
auto *p = data->items.get(i, ItemData::ELM_NOTHING);
- p->flags ^= HIF_SELECTED;
+ p->bSelected = !p->bSelected;
}
InvalidateRect(hwnd, 0, FALSE);
@@ -515,9 +515,9 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
for (int i = 0; i < count; ++i) {
auto *p = data->items.get(i, ItemData::ELM_NOTHING);
if ((i >= start) && (i <= end))
- p->flags |= HIF_SELECTED;
+ p->bSelected = true;
else
- p->flags &= ~((DWORD)HIF_SELECTED);
+ p->bSelected = false;
}
InvalidateRect(hwnd, 0, FALSE);
@@ -535,7 +535,7 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
}
for (int i = start; i <= end; ++i) {
auto *p = data->items.get(i, ItemData::ELM_NOTHING);
- p->flags &= ~((DWORD)HIF_SELECTED);
+ p->bSelected = false;
}
InvalidateRect(hwnd, 0, FALSE);
@@ -643,9 +643,9 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
int eventCount = data->items.getCount();
for (int i = 0; i < eventCount; i++) {
- ItemData *item = data->items.get(i, ItemData::ELM_NOTHING);
- if (item->flags & HIF_SELECTED)
- res.Append(ptrW(TplFormatString(TPL_COPY_MESSAGE, item->hContact, item)));
+ ItemData *p = data->items.get(i, ItemData::ELM_NOTHING);
+ if (p->bSelected)
+ res.Append(ptrW(TplFormatString(TPL_COPY_MESSAGE, p->hContact, p)));
}
CopyText(hwnd, res);
diff --git a/plugins/NewStory/src/main.cpp b/plugins/NewStory/src/main.cpp
index 3b43192ad3..fc9d66a8e5 100644
--- a/plugins/NewStory/src/main.cpp
+++ b/plugins/NewStory/src/main.cpp
@@ -13,6 +13,8 @@
CMPlugin g_plugin;
+CMOption<bool> g_bOptGrouping(MODULENAME, "MessageGrouping", false);
+
/////////////////////////////////////////////////////////////////////////////////////////
PLUGININFOEX pluginInfoEx =
@@ -102,7 +104,8 @@ static int evtPreShutdown(WPARAM, LPARAM)
int CMPlugin::Load()
{
- g_plugin.registerIcon(MODULETITLE, icons);
+ registerIcon(MODULETITLE, icons);
+ bMsgGrouping = g_bOptGrouping;
m_log = RegisterSrmmLog(MODULETITLE, _T(MODULENAME), NewStory_Stub);
diff --git a/plugins/NewStory/src/options.cpp b/plugins/NewStory/src/options.cpp
index 62d99ce804..2bec24a2a8 100644
--- a/plugins/NewStory/src/options.cpp
+++ b/plugins/NewStory/src/options.cpp
@@ -1,8 +1,31 @@
#include "stdafx.h"
-// Option dialog
+/////////////////////////////////////////////////////////////////////////////////////////
+// General options dialog
-class COptionsDlg : public CDlgBase
+class CGeneralOptsDlg : public CDlgBase
+{
+ CCtrlCheck chkGrouping;
+
+public:
+ CGeneralOptsDlg() :
+ CDlgBase(g_plugin, IDD_OPT_ADVANCED),
+ chkGrouping(this, IDC_GROUPING)
+ {
+ CreateLink(chkGrouping, g_bOptGrouping);
+ }
+
+ bool OnApply() override
+ {
+ g_plugin.bMsgGrouping = g_bOptGrouping;
+ return true;
+ }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Template options dialog
+
+class CTemplateOptsDlg : public CDlgBase
{
TemplateInfo *m_curr = 0;
@@ -37,7 +60,7 @@ class COptionsDlg : public CDlgBase
CCtrlTreeView m_tree;
public:
- COptionsDlg() :
+ CTemplateOptsDlg() :
CDlgBase(g_plugin, IDD_OPT_TEMPLATES),
m_edit(this, IDC_EDITTEMPLATE),
m_tree(this, IDC_TEMPLATES),
@@ -48,12 +71,12 @@ public:
bthVarHelp(this, IDC_VARHELP, g_plugin.getIcon(ICO_VARHELP), LPGEN("Help on variables")),
btnPreview(this, IDC_UPDATEPREVIEW, g_plugin.getIcon(ICO_PREVIEW), LPGEN("Update preview"))
{
- btnReset.OnClick = Callback(this, &COptionsDlg::onClick_Reset);
- btnDiscard.OnClick = Callback(this, &COptionsDlg::onClick_Discard);
- btnPreview.OnClick = Callback(this, &COptionsDlg::UpdatePreview);
- bthVarHelp.OnClick = Callback(this, &COptionsDlg::onVarHelp);
+ btnReset.OnClick = Callback(this, &CTemplateOptsDlg::onClick_Reset);
+ btnDiscard.OnClick = Callback(this, &CTemplateOptsDlg::onClick_Discard);
+ btnPreview.OnClick = Callback(this, &CTemplateOptsDlg::UpdatePreview);
+ bthVarHelp.OnClick = Callback(this, &CTemplateOptsDlg::onVarHelp);
- m_tree.OnSelChanged = Callback(this, &COptionsDlg::onSelChanged);
+ m_tree.OnSelChanged = Callback(this, &CTemplateOptsDlg::onSelChanged);
}
bool OnInitDialog() override
@@ -230,7 +253,11 @@ int OptionsInitialize(WPARAM wParam, LPARAM)
odp.flags = ODPF_BOLDGROUPS;
odp.szTab.a = LPGEN("Templates");
- odp.pDialog = new COptionsDlg();
+ odp.pDialog = new CTemplateOptsDlg();
+ g_plugin.addOptions(wParam, &odp);
+
+ odp.szTab.a = LPGEN("Advanced");
+ odp.pDialog = new CGeneralOptsDlg();
g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/plugins/NewStory/src/resource.h b/plugins/NewStory/src/resource.h
index 9a9c62d80d..445e44c64f 100644
--- a/plugins/NewStory/src/resource.h
+++ b/plugins/NewStory/src/resource.h
@@ -1,15 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by D:\Miranda NG Git_orig_commit\miranda-ng\plugins\NewStory\res\resource.rc
+// Used by w:\miranda-ng\plugins\NewStory\res\resource.rc
//
#define IDD_HISTORY 101
+#define IDD_OPT_TEMPLATES 102
+#define IDD_OPT_ADVANCED 103
#define IDD_SEARCH 105
-#define IDD_MESSAGE 112 //!!!
+#define IDD_MESSAGE 112
#define IDR_POPUPS 113
-#define IDR_ACCEL 114 //!!!
+#define IDR_ACCEL 114
#define IDD_CALENDARTOOL 118
-#define IDD_OPT_TEMPLATES 121
-#define IDD_FILTERMODE 123 //!!!
+#define IDD_FILTERMODE 123
#define ICO_NEWSTORY 127
#define ICO_USERINFO 128
#define ICO_USERMENU 129
@@ -35,8 +36,8 @@
#define ICO_TIMETREE 152
#define IDC_GPREVIEW 1000
#define IDC_ITEMS2 1001
-#define IDC_PROGRESS 1002 //!!!
-#define IDC_EDIT1 1003 //!!!
+#define IDC_PROGRESS 1002
+#define IDC_EDIT1 1003
#define IDC_SEARCHTEXT 1004
#define IDC_RESET 1005
#define IDC_MESSAGE 1010
@@ -50,9 +51,9 @@
#define IDC_LOGOPTIONS 1018
#define IDC_FINDPREV 1019
#define IDC_SEARCHICON 1020
-#define IDC_TEXT 1021 //!!!
-#define IDC_USERNICK 1022 //!!!
-#define IDC_MSGICON 1023 //!!!
+#define IDC_TEXT 1021
+#define IDC_USERNICK 1022
+#define IDC_MSGICON 1023
#define IDC_DATEPOPUP 1024
#define IDC_ICO_MESSAGES_IN 1025
#define IDC_ICO_MESSAGES_OUT 1026
@@ -65,26 +66,26 @@
#define IDC_PREVIEW 1033
#define IDC_DELETE 1034
#define IDC_TIMETREEVIEW 1035
-#define IDC_PROGRESS1 1037 //!!!
-#define IDC_COMBO1 1038 //!!!
+#define IDC_PROGRESS1 1037
+#define IDC_COMBO1 1038
#define IDC_TIMETREE 1039
-#define IDC_CHECK2 1040 //!!!
-#define IDC_CHECK3 1041 //!!!
+#define IDC_CHECK2 1040
+#define IDC_CHECK3 1041
#define IDC_MONTHCALENDAR1 1044
#define IDC_TEMPLATES 1057
#define IDC_VARHELP 1058
#define IDC_DISCARD 1060
#define IDC_UPDATEPREVIEW 1061
-#define IDC_CHK_FILE 1062 //!!!
-#define IDC_CHK_URL 1063 //!!!
-#define IDC_CHK_STATUS 1064 //!!!
-#define IDC_CHK_OTHER 1065 //!!!
-#define IDC_CHK_AUTOFILTER 1066 //!!!
-#define IDC_DATETIMEPICKER1 1067 //!!!
-#define IDC_DATETIMEPICKER2 1068 //!!!
-#define IDC_CHK_IN 1069 //!!!
-#define IDC_CHK_OUT 1070 //!!!
-#define IDC_CHK_MESSAGES 1071 //!!!
+#define IDC_CHK_FILE 1062
+#define IDC_CHK_URL 1063
+#define IDC_CHK_STATUS 1064
+#define IDC_CHK_OTHER 1065
+#define IDC_CHK_AUTOFILTER 1066
+#define IDC_DATETIMEPICKER1 1067
+#define IDC_DATETIMEPICKER2 1068
+#define IDC_CHK_IN 1069
+#define IDC_CHK_OUT 1070
+#define IDC_CHK_MESSAGES 1071
#define IDC_EDITTEMPLATE 1072
#define IDC_ICO_MESSAGES 1078
#define IDC_ICO_FILES 1079
@@ -107,6 +108,8 @@
#define IDC_DATE_TO 1104
#define IDC_CHK_DATE_FROM 1105
#define IDC_CHK_DATE_TO 1106
+#define IDC_CHECK1 1107
+#define IDC_GROUPING 1107
#define ID_FILTER_INCOMING 40003
#define ID_FILTER_OUTGOING 40004
#define ID_FILTER_MESSAGES 40006
@@ -114,29 +117,29 @@
#define ID_FILTER_URLS 40009
#define ID_FILTER_STATUS 40010
#define ID_FILTER_OTHER 40011
-#define ID_CONTEXT_COPY 40012 //!!!
-#define IDA_COPY 40020 //!!!
-#define IDA_SEARCH 40021 //!!!
+#define ID_CONTEXT_COPY 40012
+#define IDA_COPY 40020
+#define IDA_SEARCH 40021
#define ID_FILTER_AUTO 40022
#define ID_LOGOPTIONS_TEMPLATES 40023
#define ID_LOGOPTIONS_OPTIONS 40024
-#define ID_CONTEXT_DELETE 40026 //!!!
-#define ID_CONTEXT_SELECTALL 40027 //!!!
-#define ID_CONTEXT_CANCEL 40028 //!!!
-#define ID_EXPORT_SAVEAS 40029 //!!!
-#define ID_EXPORT_SAVESELECTEDAS 40031 //!!!
-#define ID_FILTER_SHOWALLEVENTS 40036 //!!!
-#define ID_FILTER_SHOWINCOMINGEVENTSONLY 40037 //!!!
-#define ID_FILTER_SHOWOUTGOINGEVENTSONLY 40038 //!!!
-#define ID_FILTER_USECUSTOMFILTER 40039 //!!!
+#define ID_CONTEXT_DELETE 40026
+#define ID_CONTEXT_SELECTALL 40027
+#define ID_CONTEXT_CANCEL 40028
+#define ID_EXPORT_SAVEAS 40029
+#define ID_EXPORT_SAVESELECTEDAS 40031
+#define ID_FILTER_SHOWALLEVENTS 40036
+#define ID_FILTER_SHOWINCOMINGEVENTSONLY 40037
+#define ID_FILTER_SHOWOUTGOINGEVENTSONLY 40038
+#define ID_FILTER_USECUSTOMFILTER 40039
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 128
+#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 40041
-#define _APS_NEXT_CONTROL_VALUE 1107
+#define _APS_NEXT_CONTROL_VALUE 1108
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h
index 49924ade86..ad0a5d62fd 100644
--- a/plugins/NewStory/src/stdafx.h
+++ b/plugins/NewStory/src/stdafx.h
@@ -79,9 +79,12 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
HANDLE m_log;
+ bool bMsgGrouping;
+
CMPlugin();
int Load() override;
int Unload() override;
};
+extern CMOption<bool> g_bOptGrouping; \ No newline at end of file
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index bcd4f5f27d..02f2523201 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -310,6 +310,9 @@ TemplateInfo templates[TPL_COUNT] =
{ "tpl/msglog/msg", LPGENW("Message log"), ICO_SENDMSG, LPGENW("Messages"),
L"%I%i[b][color=red]%N[/color], %t:[/b]\x0d\x0a%M", 0, 0,
{ vfGlobal, vfContact, vfEvent, vfMessage, 0 } },
+ { "tpl/msglog/msg_grp", LPGENW("Message log"), ICO_SENDMSG, LPGENW("Grouped messages"),
+ L"%I%i[b]%t:[/b] %M", 0, 0,
+ { vfGlobal, vfContact, vfEvent, vfMessage, 0 } },
{ "tpl/msglog/file", LPGENW("Message log"), ICO_FILE, LPGENW("Files"),
L"%I%i[b]%N, %t:[/b]%n%M", 0, 0,
{ vfGlobal, vfContact, vfEvent, vfFile, 0 } },
diff --git a/plugins/NewStory/src/templates.h b/plugins/NewStory/src/templates.h
index 931773ce78..b1542bd607 100644
--- a/plugins/NewStory/src/templates.h
+++ b/plugins/NewStory/src/templates.h
@@ -45,6 +45,7 @@ enum
TPL_TITLE,
TPL_MESSAGE,
+ TPL_MSG_GRP,
TPL_FILE,
TPL_SIGN,
TPL_PRESENCE,