diff options
author | John Ankarström <john@ankarstrom.se> | 2022-05-28 00:55:08 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-05-28 00:55:08 +0200 |
commit | 11a330a7fc93506a44e0b14dd1ad10f7fa4a2104 (patch) | |
tree | d987b8776dae4e83b2da85ab623937d7a97e6760 /c | |
parent | b1b296dbd1b36c0033ffc8aff832e7b2ff49c5cc (diff) | |
download | EpisodeBrowser-11a330a7fc93506a44e0b14dd1ad10f7fa4a2104.tar.gz |
Add "Fetch Screenwriters" menu item.
This is a separate item from "Fetch", because it takes a lot longer.
Diffstat (limited to 'c')
-rw-r--r-- | c/episodelistview.c | 2 | ||||
-rw-r--r-- | c/main.c | 14 | ||||
-rw-r--r-- | c/resource.h | 1 | ||||
-rw-r--r-- | c/resource.rc | 1 |
4 files changed, 14 insertions, 4 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c index 3b23c30..42c207d 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -453,7 +453,7 @@ ElvUpdateItem(LPLVITEM lpLvi) tszName = NULL; PI(t,lpLvi->lParam) goto r; P("episode_data","episode_title",2,t) { - P("episode_data","fetch_episode_data",0,t) goto r; + P("episode_data","update_episode_data",0,t) goto r; P("episode_data","episode_title",2,t) goto r; } GAC(t+1,&szName) goto r; @@ -216,7 +216,15 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { term_t t; t = T(0); - P("episode_data","fetch_episode_data",0,t); + P("episode_data","update_episode_data",0,t); + ElvUpdate(); + break; + } + case IDM_FILE_SCREENWRITERS: + { + term_t t; + t = T(0); + P("episode_data","update_screenwriters",0,t); ElvUpdate(); break; } @@ -465,16 +473,15 @@ UpdateLayout() /* Resize data list view. */ SendMessage(HDlv, WM_SETREDRAW, FALSE, 0); + SendMessage(HElv, WM_SETREDRAW, FALSE, 0); cyDlv = rc.bottom-yStatus-LvHeight(HDlv, DLVSIKEY); MoveWindow(HDlv, 0, cyDlv, rc.right, rc.bottom-yStatus-cyDlv, TRUE); ListView_SetColumnWidth(HDlv, DLVSIKEY, LVSCW_AUTOSIZE); cxColumn = ListView_GetColumnWidth(HDlv, 0)+4; ListView_SetColumnWidth(HDlv, DLVSIKEY, cxColumn); ListView_SetColumnWidth(HDlv, DLVSIVALUE, rc.right-cxColumn-CxVScroll-4); - SendMessage(HDlv, WM_SETREDRAW, TRUE, 0); /* Resize episode list view. */ - SendMessage(HElv, WM_SETREDRAW, FALSE, 0); MoveWindow(HElv, 0, 0, rc.right, cyDlv+1, TRUE); ListView_SetColumnWidth(HElv, ELVSIEPISODE, LVSCW_AUTOSIZE); cxColumn = ListView_GetColumnWidth(HElv, ELVSIEPISODE)+4; @@ -482,6 +489,7 @@ UpdateLayout() cxColumn += ListView_GetColumnWidth(HElv, ELVSIRATING); ListView_SetColumnWidth(HElv, ELVSITITLE, rc.right-cxColumn-CxVScroll-4); SendMessage(HElv, WM_SETREDRAW, TRUE, 0); + SendMessage(HDlv, WM_SETREDRAW, TRUE, 0); /* Resize status bar parts. */ { diff --git a/c/resource.h b/c/resource.h index dc6b576..9c3bf2a 100644 --- a/c/resource.h +++ b/c/resource.h @@ -12,6 +12,7 @@ #define IDM_FILE_REFRESH 402 #define IDM_FILE_RESET 403 #define IDM_FILE_FETCH 404 +#define IDM_FILE_SCREENWRITERS 405 #define IDM_FILE_ABOUT 411 #define IDM_VIEW_WATCHED 421 #define IDM_VIEW_TV_ORIGINAL 422 diff --git a/c/resource.rc b/c/resource.rc index 82b4eaa..2742c58 100644 --- a/c/resource.rc +++ b/c/resource.rc @@ -8,6 +8,7 @@ BEGIN POPUP "&File" BEGIN MENUITEM "&Fetch", IDM_FILE_FETCH + MENUITEM "Fetch Screen&writers", IDM_FILE_SCREENWRITERS MENUITEM "&Refresh", IDM_FILE_REFRESH MENUITEM "Re&set", IDM_FILE_RESET MENUITEM "E&xit", IDM_FILE_EXIT |