diff options
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r-- | c/datalistview.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp index b63a342..cdd8189 100644 --- a/c/datalistview.cpp +++ b/c/datalistview.cpp @@ -9,12 +9,10 @@ #include "episodelistview.h" #include "listview.h" #include "layout.h" +#include "main.h" -extern CfgA& g_cfg; -extern FileView<DlvDataA> g_fvDlv; - -DataListView::DataListView(const HWND hWndParent) - : ListView(hWndParent, reinterpret_cast<HMENU>(IDC_DATALISTVIEW), LVS_NOCOLUMNHEADER) +DataListView::DataListView(Window& parent) + : ListView(parent, reinterpret_cast<HMENU>(IDC_DATALISTVIEW), LVS_NOCOLUMNHEADER) { LVCOLUMN lvc; @@ -30,7 +28,7 @@ DataListView::DataListView(const HWND hWndParent) lvc.cx = 500; ListView_InsertColumn(hWnd, DLVSIVALUE, &lvc); - m_height = g_cfg.heightDlv; + m_height = parent.cfg.heightDlv; } int DataListView::Height() @@ -53,7 +51,7 @@ void DataListView::SetHeight(int h) void DataListView::ShowEpisode(const int iEpisode) { - const DlvDataA& d = g_fvDlv[iEpisode-1]; + const DlvDataA& d = parent.fvDlv[iEpisode-1]; ListView_DeleteAllItems(hWnd); if (d.version == Version<DlvDataA>) { @@ -88,8 +86,7 @@ void DataListView::ShowEpisode(const int iEpisode) LVFINDINFO lvfi; lvfi.flags = LVFI_PARAM; lvfi.lParam = iEpisode; - extern EpisodeListView* g_elv; - int iItem = ListView_FindItem(g_elv->hWnd, -1, &lvfi); + int iItem = ListView_FindItem(parent.elv.hWnd, -1, &lvfi); if (iItem != -1) - ListView_EnsureVisible(g_elv->hWnd, iItem, TRUE); + ListView_EnsureVisible(parent.elv.hWnd, iItem, TRUE); } |