aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-01 20:07:13 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-01 20:07:29 +0200
commiteacbbfc786f3cb351d167bffcb6ae01b5920ee07 (patch)
tree76c437bfa4c63676739074d611ebb616ff955f43 /c/episodelistview.c
parentbc9ee9be4d6c164687f1797215f1ea3177ef5bb2 (diff)
downloadEpisodeBrowser-eacbbfc786f3cb351d167bffcb6ae01b5920ee07.tar.gz
Open all selected episodes on Return.
Diffstat (limited to 'c/episodelistview.c')
-rw-r--r--c/episodelistview.c17
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:
{