diff options
author | John Ankarström <john@ankarstrom.se> | 2022-03-02 21:48:41 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-03-02 21:48:41 +0100 |
commit | 85cf754ff86c053c4f7a34b57b1528c0cf655b35 (patch) | |
tree | 63456b2ba31b501ca1e0cf8683ff969868760a07 /c/episodelistview.c | |
parent | 56d4f25db9cedb5b45a731ce2db004fb03ccc001 (diff) | |
download | EpisodeBrowser-85cf754ff86c053c4f7a34b57b1528c0cf655b35.tar.gz |
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.
Diffstat (limited to 'c/episodelistview.c')
-rw-r--r-- | c/episodelistview.c | 23 |
1 files changed, 14 insertions, 9 deletions
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() { |