diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-27 19:57:28 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-27 19:57:28 +0200 |
commit | 9004eaac8c454cafcf4d54e29173c32db33a07ab (patch) | |
tree | 0f74acd692003339be959a9b1c1ccb41dcc1a136 | |
parent | 259f738c1e5de190de34867536005538adcec79f (diff) | |
download | EpisodeBrowser-9004eaac8c454cafcf4d54e29173c32db33a07ab.tar.gz |
Fix status bar help message.
The string arrays are static.
-rw-r--r-- | c/main.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -320,14 +320,9 @@ LRESULT CALLBACK WndProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam, /*IDM_FILE_FETCH_DATA*/L"Fetch episode data from the web (may take a few seconds).", /*IDM_FILE_FETCH_SCREENWRITERS*/L"Fetch screenwriters from the web (may take a minute).", /*IDM_FILE_ABOUT*/L"Show information about Episode Browser.", - /*IDM_VIEW_WATCHED*/(g_bViewWatched? L"Click to hide watched episodes.": - L"Click to show watched episodes."), - /*IDM_VIEW_TV_ORIGINAL*/(g_bViewTVOriginal? - L"Click to hide TV original episodes.": - L"Click to show TV original episodes."), - /*IDM_VIEW_OTHERS*/(g_szLimitScreenwriter? - L"Click to hide episodes by other screenwriters.": - L"Click to show episodes by other screenwriters.") + /*IDM_VIEW_WATCHED*/L"Show/hide watched episodes.", + /*IDM_VIEW_TV_ORIGINAL*/L"Show/hide TV original episodes.", + /*IDM_VIEW_OTHERS*/L"Show/hide episodes by other screenwriters." }; static const wchar_t* aWszCtx[] = { /*IDM_WATCH_LOCALLY*/L"Open local copy of episode, if available.", @@ -351,9 +346,12 @@ LRESULT CALLBACK WndProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam, const unsigned short wCommand = LOWORD(wParam); const unsigned short wGroup = ID_GROUP(wCommand); - if (!wGroup) break; - const wchar_t** aWsz = wGroup==IDG_MENU? aWszMenu: aWszCtx; - SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(0,0), (LPARAM)aWsz[ID_INDEX(wCommand)]); + const wchar_t* wsz = {0}; + if (wGroup) { + const wchar_t** aWsz = wGroup==IDG_MENU? aWszMenu: aWszCtx; + wsz = aWsz[ID_INDEX(wCommand)]; + } + SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(0,0), (LPARAM)wsz); break; } default: |