diff options
Diffstat (limited to 'c/main.c')
-rw-r--r-- | c/main.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -92,7 +92,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, t = T(0); P("track_episodes","update_tracked_episodes",0,t); ElvUpdate(); - ElvSelectRecent(); + ElvSelectFocus(); while (GetMessage(&msg, NULL, 0, 0) > 0) { if (IsDialogMessage(hWnd, &msg)) continue; @@ -162,8 +162,20 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) DestroyWindow(hWnd); break; case WM_DESTROY: - PostQuitMessage(0); + { + LVITEM lvi; + extern HWND HElv; + lvi.mask = LVIF_PARAM; + if ((lvi.iItem=ListView_GetNextItem(HElv,-1,LVNI_FOCUSED)) != -1 + && ListView_GetItem(HElv, &lvi)) { + term_t t; + t = T(1); + PI(t,lvi.lParam) goto q; + P("cfg","set_focus",1,t); + } + q: PostQuitMessage(0); break; + } case WM_SIZE: SendMessage(HWndStatus, WM_SIZE, wParam, lParam); UpdateLayout(); @@ -221,9 +233,6 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case IDM_FILE_REFRESH: ElvUpdate(); break; - case IDM_FILE_RESET: - ElvSelectRecent(); - break; case IDM_FILE_FETCH_DATA: { term_t t; |