diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-07 00:22:37 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-07 00:22:37 +0200 |
commit | 966a203ff8409972aefe3dd7d243d36adaf21fce (patch) | |
tree | f15b8ffefb867a4b7ac95a49bd6170a3ed58f070 /c/main.c | |
parent | c4e5a91da5f50b01cbf46d70830fdb7e51413e29 (diff) | |
download | EpisodeBrowser-966a203ff8409972aefe3dd7d243d36adaf21fce.tar.gz |
Add "View TV Originals" option.
Diffstat (limited to 'c/main.c')
-rw-r--r-- | c/main.c | 37 |
1 files changed, 31 insertions, 6 deletions
@@ -11,6 +11,7 @@ HFONT HfBold; HMENU HPopupMenu; HWND HFocus; HWND HWnd; +int BViewTVOriginal = 1; int BViewWatched = 1; int IDPI = -1; static int BThemes; @@ -110,7 +111,6 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { HMODULE hModule; FARPROC GetDpiForWindow; - term_t t; extern HWND HWnd, HElv; HWnd = hWnd; IDPI = 96; @@ -120,10 +120,22 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) FreeLibrary(hModule); } SetWindowPos(hWnd, NULL, -1, -1, Dpi(510), Dpi(400), SWP_NOMOVE); - t = T(1); - P("cfg","get_view_watched",1,t) goto s; - GI(t,&BViewWatched); - CheckMenuItem(GetMenu(hWnd), ID_VIEW_WATCHED, BViewWatched? MF_CHECKED: MF_UNCHECKED); + { + term_t t; + t = T(1); + P("cfg","get_view_watched",1,t) goto s; + GI(t,&BViewWatched); + CheckMenuItem(GetMenu(hWnd), ID_VIEW_WATCHED, + BViewWatched? MF_CHECKED: MF_UNCHECKED); + } + { + term_t t; + t = T(1); + P("cfg","get_view_tv_original",1,t) goto s; + GI(t,&BViewTVOriginal); + CheckMenuItem(GetMenu(hWnd), ID_VIEW_TV_ORIGINAL, + BViewTVOriginal? MF_CHECKED: MF_UNCHECKED); + } s: SetupFonts(); DlvCreate(); ElvCreate(); @@ -207,7 +219,8 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case ID_VIEW_WATCHED: { term_t t; - CheckMenuItem(GetMenu(hWnd), ID_VIEW_WATCHED, BViewWatched? MF_UNCHECKED: MF_CHECKED); + CheckMenuItem(GetMenu(hWnd), ID_VIEW_WATCHED, + BViewWatched? MF_UNCHECKED: MF_CHECKED); BViewWatched = !BViewWatched; ElvUpdate(); t = T(1); @@ -215,6 +228,18 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) P("cfg","set_view_watched",1,t); break; } + case ID_VIEW_TV_ORIGINAL: + { + term_t t; + CheckMenuItem(GetMenu(hWnd), ID_VIEW_TV_ORIGINAL, + BViewTVOriginal? MF_UNCHECKED: MF_CHECKED); + BViewTVOriginal = !BViewTVOriginal; + ElvUpdate(); + t = T(1); + PI(t,BViewTVOriginal) break; + P("cfg","set_view_tv_original",1,t); + break; + } case ID_WATCH: case ID_TOGGLE: case ID_FORGET: |