From 57ff99c9525a7bc381392f28f2b54e3df3c45db1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 15 Nov 2023 13:32:32 +0300 Subject: for #3925: contact's bookmarks in NS --- plugins/NewStory/res/resource.rc | 2 + plugins/NewStory/src/history.h | 4 +- plugins/NewStory/src/history_dlg.cpp | 113 ++++++++++++++++++++++++++++----- plugins/NewStory/src/history_menus.cpp | 1 + plugins/NewStory/src/resource.h | 4 +- protocols/Telegram/src/proto.cpp | 2 +- 6 files changed, 107 insertions(+), 19 deletions(-) diff --git a/plugins/NewStory/res/resource.rc b/plugins/NewStory/res/resource.rc index 9e0f885c67..759e388f1d 100644 --- a/plugins/NewStory/res/resource.rc +++ b/plugins/NewStory/res/resource.rc @@ -88,6 +88,7 @@ BEGIN CONTROL "",IDC_EXPORT,"MButtonClass",0x0,90,99,16,14 CONTROL "",IDC_DELETE,"MButtonClass",0x0,104,99,16,14 CONTROL "",IDC_TIMETREE,"MButtonClass",0x0,118,99,16,14 + CONTROL "",IDC_BOOKMARKS,"MButtonClass",0x0,132,99,16,14 CONTROL "",IDC_FILTER,"MButtonClass",0x0,132,99,16,14 CONTROL "",IDC_FINDPREV,"MButtonClass",0x0,364,305,16,14 CONTROL "",IDOK,"MButtonClass",0x0,337,305,16,14 @@ -95,6 +96,7 @@ BEGIN ICON "",IDC_SEARCHICON,1,298,20,20,SS_CENTERIMAGE CONTROL "",IDC_LOGOPTIONS,"MButtonClass",0x0,116,99,16,14 CONTROL "",IDC_TIMETREEVIEW,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_FULLROWSELECT | TVS_SINGLEEXPAND | NOT WS_VISIBLE | WS_TABSTOP,0,134,84,160,WS_EX_STATICEDGE + CONTROL "",IDC_BOOKMARKSLIST,"SysListView32",LVS_REPORT | LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_TABSTOP,0,134,84,160,WS_EX_STATICEDGE CONTROL "",IDC_SPLITTERY,"Static",SS_ENHMETAFILE,0,132,251,6 CONTROL "",IDC_DATEPOPUP,"MButtonClass",0x0,148,99,16,14 CONTROL "",IDC_HISTORYCONTROL,"NewstoryList",WS_TABSTOP,90,132,290,166 diff --git a/plugins/NewStory/src/history.h b/plugins/NewStory/src/history.h index d93cd6dd3c..f71bab9fed 100644 --- a/plugins/NewStory/src/history.h +++ b/plugins/NewStory/src/history.h @@ -25,7 +25,9 @@ enum UM_GETEVENT, UM_GETEVENTTEXT, UM_GETEVENTCONTACT, - UM_GETEVENTHANDLE + UM_GETEVENTHANDLE, + + UM_BOOKMARKS = WM_USER + 0x601, }; extern MWindowList g_hNewstoryWindows, g_hNewstoryLogs; diff --git a/plugins/NewStory/src/history_dlg.cpp b/plugins/NewStory/src/history_dlg.cpp index 2271835929..f6e4026a79 100644 --- a/plugins/NewStory/src/history_dlg.cpp +++ b/plugins/NewStory/src/history_dlg.cpp @@ -37,9 +37,10 @@ enum enum { - WND_OPT_TIMETREE = 0x01, + WND_OPT_TIMETREE = 0x01, WND_OPT_SEARCHBAR = 0x02, - WND_OPT_FILTERBAR = 0x04 + WND_OPT_FILTERBAR = 0x04, + WND_OPT_BOOKMARKS = 0x08, }; enum @@ -117,16 +118,20 @@ class CHistoryDlg : public CDlgBase std::vector