Alexander Nicolaysen Sørnes : wordpad: Don't show full path in caption.
Module: wine Branch: master Commit: 219c47338a2c695e5791fda3bd167291a6c3e259 URL: http://source.winehq.org/git/wine.git/?a=commit;h=219c47338a2c695e5791fda3bd... Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Wed Aug 22 22:44:21 2007 +0200 wordpad: Don't show full path in caption. --- programs/wordpad/wordpad.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 767e813..208528a 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -155,6 +155,7 @@ static DWORD CALLBACK stream_out(DWORD_PTR cookie, LPBYTE buffer, LONG cb, LONG return 0; } + static LPWSTR file_basename(LPWSTR path) { LPWSTR pos = path + lstrlenW(path); @@ -182,6 +183,8 @@ static void set_caption(LPCWSTR wszNewFileName) if(!wszNewFileName) wszNewFileName = wszDefaultFileName; + else + wszNewFileName = file_basename((LPWSTR)wszNewFileName); wszCaption = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lstrlenW(wszNewFileName)*sizeof(WCHAR)+sizeof(wszSeparator)+sizeof(wszAppTitle));
participants (1)
-
Alexandre Julliard