summaryrefslogtreecommitdiff
path: root/src/Fl_File_Browser.cxx
AgeCommit message (Collapse)Author
2023-11-25Adds `linespacing()` to `Fl_Browser_` and all derived widgetsMatthias Melcher
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).
2020-08-01Implement + deploy fl_strdup()Greg Ercolano
2020-07-14First pass at fixing issue 99Greg Ercolano
A lot of code touched because low level functions needed to pass up error messages reliably, and this had to propagate up the entire driver hierarchy. Tested OK *in English* on: > Linux > OSX 10.10.x > Windows VS2017 > Windows mingw64 I have no way to test on Android, but it might work. TODO: Needs testing in other languages to verify proper UTF8 error messages, esp. with Windows VS, due to complexities with FormatMessage() -- see get_ms_errmsg()
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-06-26Move Fl_System_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12976 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-19Add one more argument to virtual ↵Manolo Gouy
Fl_System_Driver::file_browser_load_filesystem() giving length of the filename argument git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-10Fix error in WIN32 code when rewriting Fl_File_Browser.cxx for the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11572 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-10Rewrite Fl_File_Browser.cxx under the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11570 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-08Rewrite filename_isdir.cxx for the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-13Details on PORTME items. Move fl_parse_color() to screen drivers.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-02-11Mark places that need to be refactored with // PORTME:Matthias Melcher
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-04Fix typos in #pragma FL_PORTING.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-01-03Updated platform specific #if's to report unimplemented code when compiling ↵Matthias Melcher
with FL_PORTING defined and WIN32 and __APPLE__ undefined> git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@10989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-11-27Improve code formatting according to CMP.Albrecht Schlosser
Add one pair of braces for clarity, move some other braces and else statements around. There's more to that, but these were minimal changes to improve readability for solving STR #3043. There are no real code changes involved though. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-05-04Removed compilation warnings.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10145 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-16Apply the *nix file-chooser patches from STR #2935.Ian MacArthur
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9884 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-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
2010-12-19Changed all fixed filename buffers (that I could find) to use FL_PATH_MX ↵Matthias Melcher
instead. Raised FL_PATH_MX from skipy 256 characters to 2048, which corresponds with modern file systems. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28Fixed Copyright to 2010.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-29Removed Metrowerks support for Apple builds.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-09-09Added warnings re: duplicate definition of Fl_Browser.cxx's private FL_BLINEGreg Ercolano
struct in Fl_File_Browser.cxx. Currently changes to one struct must be manually kept in sync with the other. todo: Fl_File_Browser should be fixed to not do this. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6853 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-09-07 Small mod to FL_BLINE to follow similar mod in Fl_Browser's FL_BLINEGreg Ercolano
which was made in order to solve STR #1739. Thanks to SebHoll for pointing this out. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Changed Copyright in 'src' directoryMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-10Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and ↵Matthias Melcher
additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-01-23Rename fl_filename_isdir_quick to _fl_filename_isdir_quick, do notMichael R Sweet
export it, and add comments to indicate that it is a private API we do not support outside of FLTK. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5635 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-01-22Removed 'optimization' for fl_filename_isdir which would break the original ↵Matthias Melcher
purpose of the fuction (testing the *existence* of a directory). But I did not want to lose the performance in the directory chooser where I *know* that a directory exists, just not if it is a file or directory, so I added the function fl_filename_isdir_quick() to do just that. Please verify that the new version works as expected, especially with regard to the directory chooser. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-10-29Fl_File_Browser did not calculate the width of directory itemsMichael R Sweet
correctly (STR #1470) src/Fl_File_Browser.cxx: - Fl_File_Browser::item_width(): Use a bold font for directory items. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-03-28ST 1148: a preselected filename will also be selected in the file chooser ↵Matthias Melcher
when popping up. I put a lot of effort into trying to make the chooser behave as it previously did in all other situations, e.g. to choose a directory git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4875 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-18Fix new trailing slash usage, and restore correct OSX filesystem listingMichael R Sweet
(added filter to hide /dev and /.vol) src/Fl_File_Browser.cxx: - Fl_File_Browser::load(): use getfsstat() API on OSX, and don't bother adding a trailing slash to directories since we already have them! src/filename_list.cxx: - fl_filename_list(): Add 3 bytes (two possible slashes + nul byte) to temporary buffer, and document why we are using memcpy() instead of strcpy(). src/filename_isdir.cxx: - fl_filename_isdir(): Add check for trailing directory separator before wasting time doing a stat() call. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4526 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-17This change is controversial. It changes the behavior of fl_filename_listMatthias Melcher
slightly by adding a forward slash after every directory name on every supported OS. Included in this patch is a change in the code that lists mounted volumes on OS X Mac. Apple users, please check. Open FLUID, open the file dialog and clear the current path. You shoudl see a list of mounted volumes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4525 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06Check for no icon, and if so manually check for a directory...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4038 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05Fl_File_Chooser was slow with large directories (STR #654)Michael R Sweet
FL/Fl_File_Browser.H: - Don't reload the directory view unless asked to. FL/Fl_File_Chooser.H: - Rebuilt using current FLUID. src/Fl_File_Browser.cxx: - Don't reload the directory view unless asked to. src/Fl_File_Chooser.cxx: - Fl_File_Chooser::show() calls rescan(). src/Fl_File_Chooser.fl: - Fl_File_Chooser::show() calls rescan(). src/Fl_File_Chooser2.cxx: - Only call rescan() when chooser is shown. src/Fl_File_Icon.cxx: - Add optimization for Windows - filenames with trailing slash are directories. test/file_chooser.cxx: - Only call show() once... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4010 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11Copyright updates and prep for 1.1.5rc1.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-02-26WIN32's scandir() emulation did not allocate enough memory forMichael R Sweet
directory names (STR #263) Fl::compose() did not handle special keys like backspace properly (STR #293) Fl_Choice did not clip its text when drawing using the plastic scheme (STR #287) Fl_Group incorrectly mapped the emacs CTRL keys to keyboard navigation (STR #228) Fl_File_Browser::load() didn't handle a NULL directory name (STR #266) 64-bit library fixes (STR #261, ) The Fl_Valuator::format() function did not limit the size of the number buffer (STR #268) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3211 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-05-04Fl_File_Browser incorrectly included "." on WIN32 (STR #9)Michael R Sweet
Include shellapi.h instead of ShellAPI.h in the WIN32 drag-n-drop code in order to work with the MingW cross compiler (STR #6) The cursor was not properly restored when doing drag-n-drop on X11 (STR #4) Fl::remove_fd() didn't recalculate the highest file descriptor properly (STR #20) Fl_Preferences::deleteGroup() didn't work properly (STR #13) Fixed the fl_show_file_selector() function - it was copying using the wrong string size (STR #14) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30Copyright update for 1.1.3 release (not quite yet, but soon...)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-11-19Get rid of some valid compiler warnings with CodeWarrior that were reportedMichael R Sweet
by Paul Chambers. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-08-13Use box function to redraw Fl_Browser_, Fl_Input_, and Fl_Slider.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2580 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-08-09Remove unnecessary void cast.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2569 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-08-09Move the rest of the image file formats (except for XBM and XPM) toMichael R Sweet
the fltk_images library; saves about 16k in the FLTK core library on my Intel system. Fix a memory leak bug in most of the fl_set_fonts*.cxx implementations; as a result, the Fl_Fontdesc structure now has a fontname member to old the human-readable font name. Lots of fixes for shadowed variables, etc. Use snprintf, strlcpy, and strlcat in more places. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-17Use parenthesis for "#if defined foo" -> "#if defined(foo)" - portability.Michael R Sweet
Use ANSI C comments in flstring.h, which is included from both C++ and C code. Move prototypes for OSX inside existing "C" wrapper in flstring.h. Simplify M_PI and M_SQRT2 definitions in FL/math.h; no need to define them twice... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2537 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-17First steps in CodeWarrior on OS_X support.Matthias Melcher
(Praise the day when I finally stop screwing up cvs ;-/ ) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-01File chooser updates - ../ and ./ map properly, now show ".." in theMichael R Sweet
directory list, added custom filter stuff, added filter_value() methods. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2487 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-13Make sure DIRECTORY is undef'd for BC++.Michael R Sweet
Try to get rid of flickering in CubeView demo... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2310 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-16Massive update to use strlcpy() and strlcat() instead of strncpy()Michael R Sweet
and strncat() in almost all places (there are still a few strncpy's that need to be used...) Added configure check for strlcat() and strlcpy(). Added emulation code for strlcat() and strlcpy(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-06Clip text in file list properly.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121