aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index ea4849f..29c015b 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -3,15 +3,15 @@
#include <windows.h>
#include <commctrl.h>
-#include "resource.h"
#include "data.h"
#include "datalistview.h"
#include "episodelistview.h"
#include "ext.h"
#include "listview.h"
-#include "main.h"
+#include "resource.h"
#include "util.h"
-#include "win.h"
+#include "win32.h"
+#include "window.h"
EpisodeListView::EpisodeListView(Window& parent)
: ListView(parent, reinterpret_cast<HMENU>(IDC_EPISODELISTVIEW), 0)
@@ -66,12 +66,12 @@ void EpisodeListView::HandleContextMenu(const WORD command)
/* Process other commands. */
switch (command) {
case IDM_WATCH_LOCALLY:
- if(!OpenLocally(lvi.lParam))
+ if(!OpenLocally(parent.cfg, parent.fvElv.At(lvi.lParam-1)))
cNotFound++;
break;
case IDM_WATCH_ONLINE:
- OpenOnline(lvi.lParam);
+ OpenOnline(parent.cfg, lvi.lParam);
break;
case IDM_TOGGLE:
@@ -79,7 +79,7 @@ void EpisodeListView::HandleContextMenu(const WORD command)
break;
case IDM_WIKI:
- OpenWiki(lvi.lParam);
+ OpenWiki(parent.fvDlv.At(lvi.lParam-1));
break;
}
}
@@ -176,15 +176,14 @@ LRESULT EpisodeListView::HandleNotify(const LPARAM lParam)
{
LVITEM lvi = {LVIF_PARAM, -1};
while (FindNextItem(&lvi, LVNI_SELECTED))
- OpenLocally(lvi.lParam) || OpenOnline(lvi.lParam);
+ OpenLocally(parent.cfg, parent.fvElv.At(lvi.lParam-1)) || OpenOnline(parent.cfg, lvi.lParam);
return 0;
}
case NM_RCLICK:
{
- extern HMENU g_hMenuPopup;
const DWORD pos = GetMessagePos();
- Require(TrackPopupMenu(g_hMenuPopup, TPM_RIGHTBUTTON,
+ Require(TrackPopupMenu(parent.hMenuPopup, TPM_RIGHTBUTTON,
LOWORD(pos), HIWORD(pos), 0, parent.hWnd, nullptr));
return 0;
}
@@ -415,7 +414,7 @@ void EpisodeListView::Update()
/* Show number of displayed items in status bar. */
wchar_t disp[16];
Swprintf(disp, L"%d", cItem);
- Status(disp, 1);
+ parent.Status(disp, 1);
}
Sort();