aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/episodelistview.c12
-rw-r--r--c/listview.c4
-rw-r--r--c/main.c22
3 files changed, 20 insertions, 18 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c
index 5dc0eeb..95f234a 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -53,7 +53,7 @@ ElvHandleNotify(LPARAM lParam)
}
break;
case NM_CUSTOMDRAW:
- {
+ {
LPNMLVCUSTOMDRAW lpLvCd;
lpLvCd = (LPNMLVCUSTOMDRAW)lParam;
switch (lpLvCd->nmcd.dwDrawStage) {
@@ -68,18 +68,18 @@ ElvHandleNotify(LPARAM lParam)
break;
}
break;
- }
+ }
case NM_DBLCLK:
case NM_RETURN:
- {
+ {
term_t t;
t = T(1);
PI(t+0, LpLviElvSelection->lParam) break;
P("local_episodes","open_episode",1,t);
break;
- }
+ }
case NM_RCLICK:
- {
+ {
DWORD dwPos;
extern HMENU HPopupMenu;
dwPos = GetMessagePos();
@@ -87,7 +87,7 @@ ElvHandleNotify(LPARAM lParam)
LOWORD(dwPos), HIWORD(dwPos), 0,
HWnd, NULL);
break;
- }
+ }
}
return 0;
diff --git a/c/listview.c b/c/listview.c
index 582888d..ce81adf 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -47,7 +47,7 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
break;
case WM_GETDLGCODE:
- {
+ {
LRESULT lResult;
extern HWND HElv;
@@ -62,7 +62,7 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
&& ((MSG *)lParam)->wParam == VK_RETURN)
return DLGC_WANTMESSAGE;
return lResult;
- }
+ }
}
return CallWindowProc(LvPrevProc, hLv, uMsg, wParam, lParam);
diff --git a/c/main.c b/c/main.c
index eac223a..52029c4 100644
--- a/c/main.c
+++ b/c/main.c
@@ -102,14 +102,14 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
UpdateLayout();
break;
case WM_GETMINMAXINFO:
- {
+ {
LPMINMAXINFO lpMMI = (LPMINMAXINFO)lParam;
extern HWND HDlv;
lpMMI->ptMinTrackSize.y = LvHeight(HDlv)+80;
break;
- }
+ }
case WM_CREATE:
- {
+ {
extern HWND HElv;
HWnd = hWnd;
DlvCreate();
@@ -117,22 +117,24 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
UpdateTheme();
SetFocus(HElv);
break;
- }
+ }
case WM_THEMECHANGED:
UpdateTheme();
break;
case WM_ACTIVATE:
switch (wParam) {
- term_t t;
case WA_INACTIVE:
HFocus = GetFocus();
break;
case WA_ACTIVE:
case WA_CLICKACTIVE:
+ {
+ term_t t;
SetFocus(HFocus);
t = T(0);
P("track_episodes","update_tracked_episodes",0,t);
ElvRedraw();
+ }
}
break;
case WM_NOTIFY:
@@ -161,7 +163,7 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case ID_TOGGLE:
case ID_FORGET:
case ID_LOOKUP:
- {
+ {
LVITEM lvi;
term_t t;
extern HWND HElv;
@@ -198,8 +200,8 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
}
- b: break;
- }
+ b: break;
+ }
}
break;
default:
@@ -306,12 +308,12 @@ UpdateTheme()
switch (bThemes) {
case -1:
- {
+ {
HMODULE hModule;
hModule = LoadLibrary(TEXT("uxtheme.dll"));
bThemes = hModule && GetProcAddress(hModule,"SetWindowTheme");
break;
- }
+ }
case 1:
bThemeActive = IsThemeActive();
LvSetTheme(HElv, bThemeActive);