summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history.cpp
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2020-05-01 12:29:52 +0300
committerMataes <mataes2007@gmail.com>2020-05-01 12:29:52 +0300
commit099f41b05c066c2c39d10b4b6b18280ef5f2254f (patch)
tree651a09bacf39fcc25e7474b2a2d01bd69ddd2747 /plugins/NewStory/src/history.cpp
parent99c07e02823f266fe0a29a846146f8b297a8d657 (diff)
newstory: save state of elements
Diffstat (limited to 'plugins/NewStory/src/history.cpp')
-rw-r--r--plugins/NewStory/src/history.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp
index f548c70b05..d00839b515 100644
--- a/plugins/NewStory/src/history.cpp
+++ b/plugins/NewStory/src/history.cpp
@@ -51,7 +51,6 @@ enum
HIST_SHOW_STATUS = 0x020,
HIST_SHOW_OTHER = 0x040,
HIST_AUTO_FILTER = 0x080,
- //HIST_TIMETREE = 0x100,
};
enum
@@ -382,7 +381,8 @@ public:
btnUserMenu.OnClick = Callback(this, &CHistoryDlg::onClick_UserMenu);
btnTimeTree.OnClick = Callback(this, &CHistoryDlg::onClick_TimeTree);
- showFlags = g_plugin.getDword(m_hContact, "showFlags", 0x7f);
+ showFlags = g_plugin.getWord(m_hContact, "showFlags", 0x7f);
+ m_dwOptions = g_plugin.getDword(0, "dwOptions");
m_hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_POPUPS));
HMENU hMenu = GetSubMenu(m_hMenu, 1);
@@ -402,10 +402,6 @@ public:
showFlags & HIST_SHOW_OTHER ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(hMenu, ID_FILTER_AUTO,
showFlags & HIST_AUTO_FILTER ? MF_CHECKED : MF_UNCHECKED);
-
- // CheckMenuItem(hMenu, ID_LOGOPTIONS_SHOWTIMETREE,
- // showFlags&HIST_TIMETREE ? MF_CHECKED : MF_UNCHECKED);
- // ShowWindow(GetDlgItem(m_hwnd, IDC_TIMETREE), showFlags & HIST_TIMETREE ? SW_SHOW : SW_HIDE);
}
bool OnInitDialog() override
@@ -527,7 +523,8 @@ public:
void OnDestroy() override
{
- g_plugin.setDword(m_hContact, "showFlags", showFlags);
+ g_plugin.setWord(m_hContact, "showFlags", showFlags);
+ g_plugin.setDword(0, "dwOptions", m_dwOptions);
Utils_SaveWindowPosition(m_hwnd, m_hContact, MODULENAME, "wnd_");
Window_FreeIcon_IcoLib(m_hwnd);
@@ -745,13 +742,6 @@ public:
GetWindowRect(pButton->GetHwnd(), &rc);
switch (TrackPopupMenu(GetSubMenu(m_hMenu, 2), TPM_RETURNCMD, rc.left, rc.bottom, 0, m_hwnd, NULL)) {
- // case ID_LOGOPTIONS_SHOWTIMETREE:
- // showFlags = toggleBit(showFlags, HIST_TIMETREE);
- // CheckMenuItem(GetSubMenu(hMenu, 1), ID_LOGOPTIONS_SHOWTIMETREE,
- // showFlags&HIST_TIMETREE ? MF_CHECKED : MF_UNCHECKED);
- // ShowWindow(GetDlgItem(m_hwnd, IDC_TIMETREE), showFlags&HIST_TIMETREE ? SW_SHOW : SW_HIDE);
- // break;
-
case ID_LOGOPTIONS_OPTIONS:
g_plugin.openOptions(L"History", L"Newstory" /*, L"General" */);
break;