aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/data.h2
-rw-r--r--c/episodelistview.cpp7
-rw-r--r--c/main.cpp14
3 files changed, 11 insertions, 12 deletions
diff --git a/c/data.h b/c/data.h
index bf45511..ce87cb1 100644
--- a/c/data.h
+++ b/c/data.h
@@ -57,7 +57,7 @@ struct CfgA
unsigned short cEp = 4096;
unsigned short iFocus = 0;
unsigned short heightDlv = 0;
- wchar_t limitScreenwriter[64] = {0}; /* TODO: 64 -> 48 */
+ wchar_t limitToScreenwriter[64] = {0}; /* TODO: 64 -> 48 */
wchar_t root[260] = {0};
wchar_t glob[64] = {0};
wchar_t url[192] = {0};
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp
index cadd751..a76717a 100644
--- a/c/episodelistview.cpp
+++ b/c/episodelistview.cpp
@@ -401,9 +401,10 @@ void EpisodeListView::Update()
if (!e.siEp[0])
continue;
- //if (g_cfg.limitScreenwriter[0] && !Pl("episode_data","episode_datum",iEp,
- // "Screenwriter",g_cfg.limitScreenwriter))
- // continue;
+ if (extern FileView<DlvDataA> g_fvDlv;
+ g_cfg.limitToScreenwriter[0]
+ && wcscmp(g_fvDlv.At(iEp-1).screenwriter, g_cfg.limitToScreenwriter) != 0)
+ continue;
if (!g_cfg.bViewWatched && e.bWatched)
continue;
diff --git a/c/main.cpp b/c/main.cpp
index 8916860..5935ee1 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -221,7 +221,7 @@ LRESULT CALLBACK HandleMsg(const HWND hWnd, const UINT uMsg, const WPARAM wParam
/* Set menu item checkmarks according to saved settings. */
CheckMenuItem(GetMenu(hWnd), IDM_VIEW_WATCHED, g_cfg.bViewWatched? MF_CHECKED: MF_UNCHECKED);
CheckMenuItem(GetMenu(hWnd), IDM_VIEW_TV_ORIGINAL, g_cfg.bViewTVOriginal? MF_CHECKED: MF_UNCHECKED);
- CheckMenuItem(GetMenu(hWnd), IDM_VIEW_OTHERS, g_cfg.limitScreenwriter[0]? MF_UNCHECKED: MF_CHECKED);
+ CheckMenuItem(GetMenu(hWnd), IDM_VIEW_OTHERS, g_cfg.limitToScreenwriter[0]? MF_UNCHECKED: MF_CHECKED);
return 0;
case WM_CLOSE:
@@ -319,7 +319,7 @@ LRESULT CALLBACK HandleMsg(const HWND hWnd, const UINT uMsg, const WPARAM wParam
/*IDM_VIEW_TV_ORIGINAL*/(g_cfg.bViewTVOriginal?
L"Click to hide TV original episodes.":
L"Click to show TV original episodes."),
- /*IDM_VIEW_OTHERS*/(g_cfg.limitScreenwriter?
+ /*IDM_VIEW_OTHERS*/(g_cfg.limitToScreenwriter?
L"Click to hide episodes by other screenwriters.":
L"Click to show episodes by other screenwriters.")
};
@@ -420,16 +420,14 @@ void HandleMainMenu(const HWND hWnd, const WORD command)
break;
case IDM_VIEW_OTHERS:
- if (g_cfg.limitScreenwriter[0]) { /* Show episodes by all screenwriters. */
+ if (g_cfg.limitToScreenwriter[0]) { /* Show episodes by all screenwriters. */
CheckMenuItem(GetMenu(hWnd), IDM_VIEW_OTHERS, MF_CHECKED);
- g_cfg.limitScreenwriter[0] = 0;
+ g_cfg.limitToScreenwriter[0] = 0;
} else { /* Hide episodes by other screenwriters than current. */
- Mark m;
- WcharPtr s;
LVITEM lvi = {LVIF_PARAM, -1};
if (g_elv->FindNextItem(&lvi, LVNI_FOCUSED)
- && Pl("episode_data","episode_datum",lvi.lParam,"Screenwriter",&s)) {
- Wcscpy(g_cfg.limitScreenwriter, s);
+ && g_fvDlv.At(lvi.lParam-1).screenwriter[0]) {
+ Wcscpy(g_cfg.limitToScreenwriter, g_fvDlv.At(lvi.lParam-1).screenwriter);
CheckMenuItem(GetMenu(hWnd), IDM_VIEW_OTHERS, MF_UNCHECKED);
}
}