[PATCH 0/1] MR3270: winhlp32: truncate path in title bar
The buffer in the titlebar was small and the file path was truncated. Therefore, the buffer in the titlebar was expanded from 51 to 300. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270
From: 3ts75 <bimy1280163(a)gn.iwasaki.ac.jp> --- programs/winhlp32/hlpfile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winhlp32/hlpfile.h b/programs/winhlp32/hlpfile.h index 55ef681edd8..1ed8e65f5e0 100644 --- a/programs/winhlp32/hlpfile.h +++ b/programs/winhlp32/hlpfile.h @@ -26,7 +26,7 @@ typedef struct { char type[10]; char name[9]; - char caption[51]; + char caption[300]; POINT origin; SIZE size; int style; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3270
Did you check what windows does it that case (with the .hlp file you're referring to)? - display whole string ? - truncate to filename only - truncate partial path & filename only? Anyway, the 51 size comes from the .hlp internal data structure, and IMO shouldn't be changed as such. Either Windows displays the whole path in that case and we'd better use a dynamic allocated buffer ; or the path is somehow truncated. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_38409
Win2K3 : does not show file title at all :  -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_42769
Maybe a better option would be NOT to display file path at all ? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_42770
@epo : since @3ts75 is not longer active, any opportunity that you take over with the proposed simplification (eg : no file path in title bar, similarly to Win2K3 behavior) ? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_56458
In particular situation made even worse by https://github.com/wine-mirror/wine/commit/6cd7240fec06829e73f240104f6e690b7... from @julliard limiting buffer to 40 chars. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_56459
\[the patch you mention doesn't make it worse, it just reduces the size of the STID_WINE_HELP resource which should fit in 40 char:s AFAICS from po files\] there are .hlp files which caption is still in the form 'title help - filename' when in that form, only the filename part is displayed (drive and directories are dropped) (2 out of 78 in my local store). reason isn't 100% clear (even if the two report an error 'buf\[0x14\] = 0' which an entry which isn't implemented yet; but 2 is to few to be able to generalize). We need to figure out whether it just shows incorrect encoding (and the title derives from that), or something else last but not least, I have also (1) .hlp file where the title isn't cropped to 51 characters so IMO, it will require more work perhaps first and simple step would be to remove driver and directories from displayed filename: * that would be one step into the right direction * it will reduce the not useful information (even if not perfect) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_56460
Strangely enougth, using Wine 8.0.2 in Ubuntu, the code path used is then the second branch, not even showing the title :  [GNUCHESS.HLP](/uploads/2e29088670b97d2df88f1dce3b19aa51/GNUCHESS.HLP) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_56468
I've opened https://gitlab.winehq.org/wine/wine/-/merge_requests/4758 which should fix most of the issues I'm aware of (compared with win98's native winhlp32.exe behavior) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_56488
@epo : Then this MR should be closed and marked superseeded by https://gitlab.winehq.org/wine/wine/-/merge_requests/4758 ? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_56490
Superseded by !4758. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270#note_86786
This merge request was closed by Alexandre Julliard. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3270
participants (5)
-
3ts75 -
Alexandre Julliard (@julliard) -
eric pouech (@epo) -
Kyle Katarn (@KRosUser) -
Yukinari Mitsu (@3ts75)