diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-24 13:14:12 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-24 13:14:12 +0200 |
commit | 15a09ae4bd7cc686d1be6735b4e72cf490776f11 (patch) | |
tree | 1bef2467cbe2ad32410481fc45072e5a88a4a171 | |
parent | 7e353754aa3aeb6a795104fc641924e21014d00b (diff) | |
download | EpisodeBrowser-15a09ae4bd7cc686d1be6735b4e72cf490776f11.tar.gz |
Re-enable screenwriter limit.
-rw-r--r-- | c/data.h | 2 | ||||
-rw-r--r-- | c/episodelistview.cpp | 7 | ||||
-rw-r--r-- | c/main.cpp | 14 |
3 files changed, 11 insertions, 12 deletions
@@ -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; @@ -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); } } |