summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2020-05-09 16:17:33 +0300
committerMataes <mataes2007@gmail.com>2020-05-09 16:17:33 +0300
commit7383a0e57fc724da19d9a6e8b56e20012cc91dac (patch)
tree78531347c1b653756685788045a26aa91c66e539 /plugins/NewStory/src
parentc6ec90d3b8757041feacc5a02d46d7041fccd3cd (diff)
newstory: clear log
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r--plugins/NewStory/src/history_control.cpp7
-rw-r--r--plugins/NewStory/src/history_control.h3
-rw-r--r--plugins/NewStory/src/history_log.cpp1
3 files changed, 11 insertions, 0 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 690e83ce9e..c005d18728 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -414,6 +414,13 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
data->redrawTimer.Start(100);
break;
+ case NSM_CLEAR:
+ data->items.clear();
+
+ data->redrawTimer.Stop();
+ data->redrawTimer.Start(100);
+ break;
+
case NSM_GETARRAY:
return (LRESULT)&data->items;
diff --git a/plugins/NewStory/src/history_control.h b/plugins/NewStory/src/history_control.h
index 46b1bb045f..f8e09a7648 100644
--- a/plugins/NewStory/src/history_control.h
+++ b/plugins/NewStory/src/history_control.h
@@ -47,6 +47,9 @@ enum
NSM_ADDEVENTS,
NSM_ADDCHATEVENT,
+ // clear log
+ NSM_CLEAR,
+
// wParam = id
NSM_SETCARET,
diff --git a/plugins/NewStory/src/history_log.cpp b/plugins/NewStory/src/history_log.cpp
index 43d75a545a..831a8b4811 100644
--- a/plugins/NewStory/src/history_log.cpp
+++ b/plugins/NewStory/src/history_log.cpp
@@ -33,6 +33,7 @@ public:
void Clear() override
{
+ SendMessage(m_hwnd, NSM_CLEAR, 0, 0);
}
HWND GetHwnd() override