summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_WIN32.cxx
AgeCommit message (Collapse)Author
4 dayswip: forkmaxim nikonov
2023-02-20Remove 2 compilation warnings under Windows with mingw64ManoloFLTK
Compiling Fl_Native_File_Chooser_WIN32.cxx... fl_dnd_win32.cxx:436:11: warning: private field 'm_EnumF' is not used [-Wunused-private-field] FLEnum *m_EnumF; ^ 1 warning generated. Fl_Native_File_Chooser_WIN32.cxx:378:19: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] bool unixpath = IsUnixPath(_directory) | IsUnixPath(_preset_file); // caller uses unix paths? ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ || Fl_Native_File_Chooser_WIN32.cxx:378:19: note: cast one or both operands to int to silence this warning 1 warning generated.
2022-12-30Use `FL_OVERRIDE` for all overridden virtual methods (#611)Matthias Melcher
FL_OVERRIDE is defined as `override` for C++11 and higher FL_OVERRIDE is defined as `override` for VisualC 2015 and newer Don't interfere with Fl_Widget::override()
2022-09-26Replace all calls to sprintf() by calls to snprintf().ManoloFLTK
2022-01-16Rename FL/fl_string.h to FL/fl_string_functions.hAlbrecht Schlosser
This is part 1 of the final fix for a previous name clash on case insensitive file systems (fl_string.h vs. Fl_String.H).
2021-08-30Fix compiler warnings (Windows only)Albrecht Schlosser
src/Fl_Native_File_Chooser_WIN32.cxx:331:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 331 | while ( s=strchr(s,'\\') ) *s = '/'; | ~^~~~~~~~~~~~~~~ src/Fl_Native_File_Chooser_WIN32.cxx:336:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 336 | while ( s=strchr(s,'/') ) *s = '\\'; | ~^~~~~~~~~~~~~~
2021-05-31Windows: Fix compiler warning, simplify codeAlbrecht Schlosser
src/Fl_Native_File_Chooser_WIN32.cxx:190:10: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=] 190 | strncpy(wp2, string, n); | ~~~~~~~^~~~~~~~~~~~~~~~ Although there was no real problem with the code (the allocated buffer was large enough), the code was questionable and there was redundant code that could be simplified.
2021-04-16Fix potential buffer overrun (WIN32 only)Albrecht Schlosser
2021-03-23Better fix for issue #206.Greg Ercolano
Albrecht caught a problem with my strncat use (see comments for 12d8da9c). I noticed we have fl_strlcpy() and fl_strlcat() which is what was really needed here.
2021-03-23Solve issue #206 warning.Greg Ercolano
2020-12-13Set errmsg to exterr instead of err which will always be zero.ComputerNerd
2020-08-22Fix .clang-format and some whitespace errorsAlbrecht Schlosser
.clang-format: UseTab: ForIndentation -> Never Update fluid generated files
2020-08-08Allow unix style paths for windows native filechooserGreg Ercolano
Allows and preserves unix style paths if user specifies them, otherwise uses Windows style. This allows end users to use either style path and get behavior they expect in cross-platform environments. Addresses problems raised by issue #122
2020-08-07Error string that was created is now saved with errmsg()Greg Ercolano
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2018-01-31Replace FL/x.H with FL/platform.H - step 2 (STR #3435).Albrecht Schlosser
This second step replaces FL/x.H with FL/platform.H in all source files. Dependencies have been adjusted as well. This commit completes the replacement of FL/x.H with FL/platform.H. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-14Fix confusing (QT style) doxygen comment marker.Albrecht Schlosser
Add a space between '/*' and '!'. Other changes: comment alignment. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12494 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-05Bringing over fix [r11920] from 1.3 current to the porting branch.Greg Ercolano
Fixes STR#3200 issue with filter() on Win32. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11922 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-20Bringing over fix [r11188] from 1.3 current to the porting branch.Greg Ercolano
Some code cleanup of FNFC Win32: no functional changes. > Replace huge static WCHAR wpattern[] array with dynamic in win32 FNFC (ABI 1.3.4) (Should decrease the memory weight WIN32 lib) > Simplify current working directory management > Comment simplification, CMP adherence git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11831 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16Use more consistent naming for derived classes of Fl_Native_File_Chooser_Driver.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-05Rewrite the Fl_File_Native_Chooser class under the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-26Remove FLTK_ABI_VERSION from all but *tree*.* and documentation.Albrecht Schlosser
Everything related to Fl_Tree and its test and demo programs has been cleaned. Documentation needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11428 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-30Fix Windows compilation error in Fl_Native_File_Chooser_WIN32.cxx.Albrecht Schlosser
Fix regression (typo) introduced in svn r11086. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11089 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-29Fixed a few warnings from a picky compiler setting.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-28Some trivial adjustments to support buildingIan MacArthur
under Win32/mingw with the configure/make on Win7 with Msys. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-22Fix for STR #3221: restore the correct state of mouse buttons and keyboard ↵Manolo Gouy
modifier keys after closing a non-FLTK window (file or printer dialogs). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-06The Fl_Native_File_Chooser class contains, under WIN32, two system-defined ↵Manolo Gouy
structures (OPENFILENAMEW and BROWSEINFOW). This forces any application program that uses Fl_Native_File_Chooser to include file windows.h. This is corrected by using in the Fl_Native_File_Chooser class pointers to the 2 structures. The changes are protected by #if FLTK_ABI_VERSION >= 10304 for ABI compatibility. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10437 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-15Consolidate the Win32 init and cleanup code in to one place soPierre Ossman
it's easier to keep track of it. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10312 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-07-21Removed unused code strcnt() to prevent warnings w/mingwGreg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10222 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-07-01Fix for STR #3101 to handle e.g. "foo.f[ld]" filters properly.Greg Ercolano
(Was only counting ',' style filters, not character oriented filters) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-30Changes brought in at r. 10046 make fluid crash when open or saving files ↵Manolo Gouy
with Fl_Native_File_Chooser on the WIN32 platform. The filter used by fluid "FLUID files \t*.f[ld]/n" makes Fl_Native_File_Chooser::parse_filter() crash. The present changes TEMPORARILY avoid this crash, but r. 10046 changes should be closely reviewed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10215 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-24It's probably better to also change SendMessage into SendMessageWManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10208 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-06-24Fixed error when browsing for a directory and using a non-ascii starting ↵Manolo Gouy
directory. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10207 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-01Partial fix for STR #3044.Ian MacArthur
Fixes typo in a DEBUG section of Fl_Native_File_Chooser_WIN32.cxx git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-27Fixes STR#3041, int -> size_tGreg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-16Two functions strcnt() with distinct prototypes where defined and only one ↵Manolo Gouy
was used, causing a -Wunused-function warning. Also strcnt() is used in WIN32 only, so should not belong to Fl_Native_File_Chooser_common.cxx that contains functions used across platforms. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10064 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-06Fixes STR# 3025; string overflow with large filter()s.Greg Ercolano
Replaced fixed arrays with dynamic strings. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10046 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-06Fix mem leak with 'oldcwd' if user hits 'cancel' button in browser..Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10045 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-06-06Remove a header file I added during testing, but which is not required now...Ian MacArthur
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9933 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-06-06Attempt to fix UTF8 encoding of WIN32 Native File Chooser BROWSE_DIRECTORY ↵Ian MacArthur
options git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9931 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-26Imported Walter Garms' comments re:BIF_SHAREABLE from theGreg Ercolano
./TODO file that came with the original version of FNFC. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9629 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-24Fixed more warnings in VC2010 32+64 bits buildsFabien Costantini
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05Fixed build error in msvs because Fl ref to FULLSCREEN enum was not ↵Fabien Costantini
accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-13Small fix: typo affected string length calc.Greg Ercolano
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-13Solve STR #2733: MAX_PATH too small on Win32 (260 chars!)Greg Ercolano
Removed some hardcoded arrays in favor of dynamic, and created a new macro with 32768 and used it for remaining pathname arrays. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-13Solve STR #2768: WIN32 file filter pulldown menu was not showing wildcard ↵Greg Ercolano
patterns. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-20Fix STR #2569 cont'd: put back MSWindows version of ↵Manolo Gouy
Fl_Native_File_Chooser::filters() that had been erroneously removed by r.8378 that merged include files (it was previously an inline function). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8454 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-08Fixed more Windows compiler warnings:Albrecht Schlosser
- unused functions: dnullprint, strapp - format mismatch for newer compilers and/or 64-bit mode git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7977 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-29More copyright 2010 mods.Greg Ercolano
Used: vi `grep -r 'Copyright .*Spitzak' . | grep -v 2010 | grep -v '/\.svn' | cut -d: -f1` git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7913 ea41ed52-d2ee-0310-a9c1-e6b18d33e121