Skip to content

Commit

Permalink
[WINHLP32] Don't show file path in title (reactos#6250)
Browse files Browse the repository at this point in the history
Based on KRosUser's winhlp.patch. This PR will supersede reactos#5401.
JIRA issue: CORE-18679
Just copy help file title.
  • Loading branch information
katahiromz authored Dec 29, 2023
1 parent 9cfd8dd commit 40131fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/applications/winhlp32/winhelp.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,16 @@ HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name)
strcpy(mwi.type, "primary");
strcpy(mwi.name, "main");
if (hlpfile && hlpfile->lpszTitle[0])
#ifdef __REACTOS__
snprintf(mwi.caption, sizeof(mwi.caption), "%s", hlpfile->lpszTitle);
#else
{
char tmp[128];
LoadStringA(Globals.hInstance, STID_WINE_HELP, tmp, sizeof(tmp));
snprintf(mwi.caption, sizeof(mwi.caption), "%s %s - %s",
hlpfile->lpszTitle, tmp, hlpfile->lpszPath);
}
#endif
else
LoadStringA(Globals.hInstance, STID_WINE_HELP, mwi.caption, sizeof(mwi.caption));
mwi.origin.x = mwi.origin.y = mwi.size.cx = mwi.size.cy = CW_USEDEFAULT;
Expand Down

0 comments on commit 40131fd

Please sign in to comment.