aboutsummaryrefslogtreecommitdiff
path: root/c/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/main.c')
-rw-r--r--c/main.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/c/main.c b/c/main.c
index cbc3167..b959417 100644
--- a/c/main.c
+++ b/c/main.c
@@ -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: