aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index 88fb7ac..e34fb34 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -6,16 +6,13 @@
#include "resource.h"
#include "defs.h"
-extern DataListView g_dlv;
+extern DataListView *g_lpDlv;
static int CALLBACK ElvSort(LPARAM, LPARAM, LPARAM);
-void
-EpisodeListView::Create()
+EpisodeListView::EpisodeListView() : ListView((HMENU)IDC_EPISODELISTVIEW, 0)
{
LVCOLUMN lvc;
- ListView::Create((HMENU)IDC_EPISODELISTVIEW, 0);
-
lvc.mask = LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM;
lvc.iSubItem = ELVSIEPISODE;
lvc.pszText = TEXT("#");
@@ -62,7 +59,7 @@ EpisodeListView::HandleNotify(LPARAM lParam)
m_lviFocus.iItem = lpNmLv->iItem;
m_lviFocus.lParam = lpNmLv->lParam;
UpdateItem(&m_lviFocus);
- g_dlv.ShowEpisode(lpNmLv->lParam);
+ g_lpDlv->ShowEpisode(lpNmLv->lParam);
}
break;
case LVN_COLUMNCLICK: /* Sort by column. */
@@ -207,7 +204,7 @@ s: ListView_SetItemState(m_hWnd, -1, LVIF_STATE, LVIS_SELECTED);
m_lviFocus.iItem = iItem;
m_lviFocus.lParam = iEpisode;
UpdateItem(&m_lviFocus);
- g_dlv.ShowEpisode(iEpisode);
+ g_lpDlv->ShowEpisode(iEpisode);
}
/* Select next/previous unwatched episode. */