diff options
Diffstat (limited to 'plugins/NewStory')
-rw-r--r-- | plugins/NewStory/src/calendartool.cpp | 6 | ||||
-rw-r--r-- | plugins/NewStory/src/history.cpp | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/plugins/NewStory/src/calendartool.cpp b/plugins/NewStory/src/calendartool.cpp index 49960debf6..8ce42ce529 100644 --- a/plugins/NewStory/src/calendartool.cpp +++ b/plugins/NewStory/src/calendartool.cpp @@ -37,7 +37,8 @@ INT_PTR CALLBACK CalendarToolDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM tm_sel.tm_mday = lpnmsc->stSelStart.wDay; tm_sel.tm_mon = lpnmsc->stSelStart.wMonth - 1; tm_sel.tm_year = lpnmsc->stSelStart.wYear - 1900; - EndDialog(hwnd, mktime(&tm_sel)); + //EndDialog(hwnd, mktime(&tm_sel)); + PostMessage(GetParent(hwnd), WM_USER + 0x600, mktime(&tm_sel), 0); } } return TRUE; @@ -51,5 +52,6 @@ INT_PTR CALLBACK CalendarToolDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM time_t CalendarTool_Show(HWND hwnd, int x, int y) { - return DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CALENDARTOOL), hwnd, CalendarToolDlgProc, MAKELONG(x, y)); + CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CALENDARTOOL), hwnd, CalendarToolDlgProc, MAKELONG(x, y)); + return 0; } diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp index b55c9318ce..b94fad88da 100644 --- a/plugins/NewStory/src/history.cpp +++ b/plugins/NewStory/src/history.cpp @@ -607,9 +607,7 @@ public: RECT rc; GetWindowRect(pButton->GetHwnd(), &rc); - time_t tm_jump = CalendarTool_Show(m_hwnd, rc.left, rc.bottom); - if (tm_jump) - m_histControl.SendMsg(NSM_SEEKTIME, tm_jump, 0); + CalendarTool_Show(m_hwnd, rc.left, rc.bottom); } void onClick_Copy(CCtrlButton *) @@ -831,6 +829,13 @@ public: // SendMessage(GetDlgItem(m_hwnd, IDC_ITEMS), LB_SELITEMRANGE, FALSE, MAKELPARAM(0,eventCount)); // SendMessage(GetDlgItem(m_hwnd, IDC_ITEMS), LB_SELITEMRANGE, TRUE, MAKELPARAM(id,id)); // break; + + case WM_USER + 0x600: + { + time_t tm_jump = (time_t)wParam; + if (tm_jump) + m_histControl.SendMsg(NSM_SEEKTIME, tm_jump, 0); + } } return CDlgBase::DlgProc(msg, wParam, lParam); |