diff options
Diffstat (limited to 'c')
-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: { |