From 85cf754ff86c053c4f7a34b57b1528c0cf655b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 2 Mar 2022 21:48:41 +0100 Subject: Open episode on Enter. This case cannot be handled by NM_RETURN, as the Return key is handled by IsDialogMessage (in the message loop in main), which sends a WM_GETDLGCODE message to the active control. --- c/episodelistview.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'c/episodelistview.c') diff --git a/c/episodelistview.c b/c/episodelistview.c index 8ca64d5..cf6f392 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -36,6 +36,18 @@ ElvCreate() return HElv; } +void +ElvEnter(LPLVITEM lpLvi) +{ + fid_t f; + term_t t; + F(f); + t = T(1); + PI(t+0, lpLvi->lParam) goto b; + P("local_episodes","open_episode",1,t); +b: Fd(f); +} + LRESULT ElvHandleNotify(LPARAM lParam) { @@ -70,16 +82,8 @@ ElvHandleNotify(LPARAM lParam) break; } case NM_DBLCLK: - { - fid_t f; - term_t t; - F(f); - t = T(1); - PI(t+0, LpLviElvSelection->lParam) goto b; - P("local_episodes","open_episode",1,t); -b: Fd(f); + ElvEnter(LpLviElvSelection); break; - } case NM_RCLICK: { DWORD dwPos; @@ -94,6 +98,7 @@ b: Fd(f); return 0; } + void ElvRedraw() { -- cgit v1.2.3