diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-01 20:07:13 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-01 20:07:29 +0200 |
commit | eacbbfc786f3cb351d167bffcb6ae01b5920ee07 (patch) | |
tree | 76c437bfa4c63676739074d611ebb616ff955f43 | |
parent | bc9ee9be4d6c164687f1797215f1ea3177ef5bb2 (diff) | |
download | EpisodeBrowser-eacbbfc786f3cb351d167bffcb6ae01b5920ee07.tar.gz |
Open all selected episodes on Return.
-rw-r--r-- | c/episodelistview.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c index b292725..657b099 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -75,11 +75,22 @@ ElvHandleNotify(LPARAM lParam) case NM_DBLCLK: case NM_RETURN: { + LVITEM lvi; term_t t; + extern HWND HElv; + + /* Open all selected episodes. */ + + lvi.mask = LVIF_PARAM; + lvi.iItem = -1; t = T(1); - PI(t+0, LpLviElvSelection->lParam) break; - P("local_episodes","open_episode",1,t); - break; + while ((lvi.iItem = ListView_GetNextItem( + HElv, lvi.iItem, LVNI_SELECTED)) != -1) { + if (!ListView_GetItem(HElv, &lvi)) goto b; + PI(t,lvi.lParam) goto b; + P("local_episodes","open_episode",1,t); + } + b: break; } case NM_RCLICK: { |