From 15a09ae4bd7cc686d1be6735b4e72cf490776f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 24 Aug 2022 13:14:12 +0200 Subject: Re-enable screenwriter limit. --- c/main.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'c/main.cpp') 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); } } -- cgit v1.2.3