aboutsummaryrefslogtreecommitdiff
path: root/c/main.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-27 19:57:28 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-27 19:57:28 +0200
commit9004eaac8c454cafcf4d54e29173c32db33a07ab (patch)
tree0f74acd692003339be959a9b1c1ccb41dcc1a136 /c/main.cpp
parent259f738c1e5de190de34867536005538adcec79f (diff)
downloadEpisodeBrowser-9004eaac8c454cafcf4d54e29173c32db33a07ab.tar.gz
Fix status bar help message.
The string arrays are static.
Diffstat (limited to 'c/main.cpp')
-rw-r--r--c/main.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/c/main.cpp b/c/main.cpp
index a9625c3..8a8e198 100644
--- a/c/main.cpp
+++ b/c/main.cpp
@@ -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: