summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/filedialogimpl-win32.cpp
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-03-01 23:01:00 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-03-01 23:01:00 +0000
commitc81b20effba5ae48675dcce10eb8e3f489691474 (patch)
tree668a9c528ba42ef2d0786c69894cc2de1ed99992 /src/ui/dialog/filedialogimpl-win32.cpp
parentFix SVG file preview in Windows native file open dialog. (diff)
downloadinkscape-c81b20effba5ae48675dcce10eb8e3f489691474.tar.gz
inkscape-c81b20effba5ae48675dcce10eb8e3f489691474.zip
Fix for native Windows file open dialog only showing the first character of the file name below the preview.
There seems to be some confusion wheter the type specifier "%s" means char or wchar and the behavior even changes between different versions of MinGW (bzr r15559)
Diffstat (limited to 'src/ui/dialog/filedialogimpl-win32.cpp')
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 2f7dc3f8f..7bc9a848c 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -792,7 +792,7 @@ LRESULT CALLBACK FileOpenDialogImplWin32::preview_wnd_proc(HWND hwnd, UINT uMsg,
_wsplitpath(pImpl->_path_string, NULL, NULL, szFileName, NULL);
const int iLength = snwprintf(szCaption,
- sizeof(szCaption), L"%s\n%d kB",
+ sizeof(szCaption), L"%ls\n%d kB",
szFileName, pImpl->_preview_file_size);
DrawTextW(dc, szCaption, iLength, &rcCaptionRect,
@@ -1494,7 +1494,7 @@ int FileOpenDialogImplWin32::format_caption(wchar_t *caption, int caption_size)
_wsplitpath(_path_string, NULL, NULL, szFileName, NULL);
return snwprintf(caption, caption_size,
- L"%s\n%d kB\n%d \xD7 %d", szFileName, _preview_file_size,
+ L"%ls\n%d kB\n%d \xD7 %d", szFileName, _preview_file_size,
(int)_preview_document_width, (int)_preview_document_height);
}