aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index f004f8a..db53be3 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -12,6 +12,8 @@
#include "util.h"
#include "win.h"
+extern CfgA& g_cfg;
+
EpisodeListView::EpisodeListView(const HWND hWndParent)
: ListView(hWndParent, reinterpret_cast<HMENU>(IDC_EPISODELISTVIEW), 0)
{
@@ -34,8 +36,7 @@ EpisodeListView::EpisodeListView(const HWND hWndParent)
ListView_InsertColumn(hWnd, ELVSIRATING, &lvc);
/* Get saved sort-by-column setting. */
- extern FileView<CfgA> g_fvCfg;
- m_iSortCol = g_fvCfg->iSortCol;
+ m_iSortCol = g_cfg.iSortCol;
}
void EpisodeListView::EnsureFocusVisible()
@@ -136,8 +137,7 @@ LRESULT EpisodeListView::HandleNotify(const LPARAM lParam)
/* The sign of m_iSortCol decides the sort order. */
m_iSortCol = abs(m_iSortCol) == iCol? -m_iSortCol: iCol;
- extern FileView<CfgA> g_fvCfg;
- g_fvCfg->iSortCol = m_iSortCol;
+ g_cfg.iSortCol = m_iSortCol;
Sort();
ShowFocus();
return 0;
@@ -231,10 +231,9 @@ void EpisodeListView::RestoreFocus()
int i, iEpisode, iItem;
LVFINDINFO lvfi;
extern DataListView* const g_dlv;
- extern FileView<CfgA> g_fvCfg;
iItem = 0;
- iEpisode = g_fvCfg->iFocus;
+ iEpisode = g_cfg.iFocus;
lvfi.flags = LVFI_PARAM;
lvfi.lParam = iEpisode;
@@ -260,10 +259,9 @@ s: g_dlv->ShowEpisode(iEpisode);
void EpisodeListView::SaveFocus()
{
- extern FileView<CfgA> g_fvCfg;
LVITEM lvi = {LVIF_PARAM, -1};
if (FindNextItem(&lvi, LVNI_FOCUSED))
- g_fvCfg->iFocus = lvi.lParam;
+ g_cfg.iFocus = lvi.lParam;
}
void EpisodeListView::SetTop(const int iItem)
@@ -405,15 +403,14 @@ void EpisodeListView::Update()
if (!e.siEp[0])
continue;
- extern FileView<CfgA> g_fvCfg;
- //if (g_fvCfg->limitScreenwriter[0] && !Pl("episode_data","episode_datum",iEp,
- // "Screenwriter",g_fvCfg->limitScreenwriter))
+ //if (g_cfg.limitScreenwriter[0] && !Pl("episode_data","episode_datum",iEp,
+ // "Screenwriter",g_cfg.limitScreenwriter))
// continue;
- if (!g_fvCfg->bViewWatched && e.bWatched)
+ if (!g_cfg.bViewWatched && e.bWatched)
continue;
- if (!g_fvCfg->bViewTVOriginal && e.bTVOriginal)
+ if (!g_cfg.bViewTVOriginal && e.bTVOriginal)
continue;
/* Insert item. */