From 13005b2a3f0f16579522523460a82dca48e855a4 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 4 May 2003 21:45:46 +0000 Subject: Fl_File_Browser incorrectly included "." on WIN32 (STR #9) 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 --- CHANGES | 13 +++++++++++++ src/Fl_File_Browser.cxx | 12 ++++-------- src/Fl_Preferences.cxx | 6 +++--- src/Fl_x.cxx | 7 ++++--- src/fl_dnd_win32.cxx | 6 +++--- src/fl_dnd_x.cxx | 7 ++++--- src/forms_fselect.cxx | 8 ++++---- 7 files changed, 35 insertions(+), 24 deletions(-) diff --git a/CHANGES b/CHANGES index 2d78bcc7f..5d2d006d8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,18 @@ CHANGES IN FLTK 1.1.4 + - Fl_File_Browser incorrectly included "." on WIN32 (STR + #9) + - 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) - fl_font() and fl_size() were not implemented on MacOS X. - Sorted the icon menu bar in fluid. diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx index 6bee7a25b..6052fa99d 100644 --- a/src/Fl_File_Browser.cxx +++ b/src/Fl_File_Browser.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Browser.cxx,v 1.1.2.25 2003/01/30 21:41:41 easysw Exp $" +// "$Id: Fl_File_Browser.cxx,v 1.1.2.26 2003/05/04 21:45:45 easysw Exp $" // // Fl_File_Browser routines. // @@ -582,12 +582,8 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load for (i = 0, num_dirs = 0; i < num_files; i ++) { -#if 0 - if (strcmp(files[i]->d_name, ".") != 0 && - strcmp(files[i]->d_name, "..") != 0) -#else - if (strcmp(files[i]->d_name, ".") != 0) -#endif // 0 + if (strcmp(files[i]->d_name, ".") && + strcmp(files[i]->d_name, "./")) { snprintf(filename, sizeof(filename), "%s/%s", directory_, files[i]->d_name); @@ -643,5 +639,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string // -// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.25 2003/01/30 21:41:41 easysw Exp $". +// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.26 2003/05/04 21:45:45 easysw Exp $". // diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index 6f1d6295f..54cbbb804 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Preferences.cxx,v 1.1.2.24 2003/01/30 21:42:30 easysw Exp $" +// "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $" // // Preferences methods for the Fast Light Tool Kit (FLTK). // @@ -1097,7 +1097,7 @@ char Fl_Preferences::Node::remove() if ( parent_ ) { nd = parent_->child_; np = 0L; - for ( ; nd; nd = nd->next_ ) + for ( ; nd; np = nd, nd = nd->next_ ) { if ( nd == this ) { @@ -1116,5 +1116,5 @@ char Fl_Preferences::Node::remove() // -// End of "$Id: Fl_Preferences.cxx,v 1.1.2.24 2003/01/30 21:42:30 easysw Exp $". +// End of "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $". // diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 83b23e707..6379a054f 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_x.cxx,v 1.24.2.24.2.28 2003/04/03 04:28:15 matthiaswm Exp $" +// "$Id: Fl_x.cxx,v 1.24.2.24.2.29 2003/05/04 21:45:46 easysw Exp $" // // X specific code for the Fast Light Tool Kit (FLTK). // @@ -123,6 +123,7 @@ void Fl::add_fd(int n, void (*cb)(int, void*), void* v) { void Fl::remove_fd(int n, int events) { int i,j; + maxfd = -1; // recalculate maxfd on the fly for (i=j=0; i maxfd) maxfd = fd[i].fd; // move it down in the array if necessary: if (j= 3 #include -#include +#include /** * subclass the IDropTarget to receive data from DnD operations @@ -349,5 +349,5 @@ int Fl::dnd() // -// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.14 2003/01/30 21:43:37 easysw Exp $". +// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.15 2003/05/04 21:45:46 easysw Exp $". // diff --git a/src/fl_dnd_x.cxx b/src/fl_dnd_x.cxx index cb4b3fca0..31499bb6b 100644 --- a/src/fl_dnd_x.cxx +++ b/src/fl_dnd_x.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_dnd_x.cxx,v 1.5.2.6 2003/01/30 21:43:38 easysw Exp $" +// "$Id: fl_dnd_x.cxx,v 1.5.2.7 2003/05/04 21:45:46 easysw Exp $" // // Drag & Drop code for the Fast Light Tool Kit (FLTK). // @@ -81,6 +81,7 @@ static int local_handle(int event, Fl_Window* window) { } int Fl::dnd() { + Fl_Window *source_fl_win = Fl::first_window(); Fl::first_window()->cursor((Fl_Cursor)21); Window source_window = fl_xid(Fl::first_window()); fl_local_grab = grabfunc; @@ -161,11 +162,11 @@ int Fl::dnd() { } fl_local_grab = 0; - Fl::first_window()->cursor(FL_CURSOR_DEFAULT); + source_fl_win->cursor(FL_CURSOR_DEFAULT); return 1; } // -// End of "$Id: fl_dnd_x.cxx,v 1.5.2.6 2003/01/30 21:43:38 easysw Exp $". +// End of "$Id: fl_dnd_x.cxx,v 1.5.2.7 2003/05/04 21:45:46 easysw Exp $". // diff --git a/src/forms_fselect.cxx b/src/forms_fselect.cxx index c23669eea..25186a774 100644 --- a/src/forms_fselect.cxx +++ b/src/forms_fselect.cxx @@ -1,5 +1,5 @@ // -// "$Id: forms_fselect.cxx,v 1.4.2.3.2.5 2003/01/30 21:44:29 easysw Exp $" +// "$Id: forms_fselect.cxx,v 1.4.2.3.2.6 2003/05/04 21:45:46 easysw Exp $" // // Forms file selection routines for the Fast Light Tool Kit (FLTK). // @@ -30,7 +30,7 @@ static char fl_directory[1024]; static const char *fl_pattern; // assummed passed value is static -static char fl_filename[256]; +static char fl_filename[1024]; char* fl_show_file_selector(const char *message,const char *dir, const char *pat,const char *fname) { @@ -48,7 +48,7 @@ char* fl_show_file_selector(const char *message,const char *dir, if (!q) return 0; strlcpy(fl_directory, q, sizeof(fl_directory)); p = (char *)fl_filename_name(fl_directory); - strlcpy(fl_filename, p, sizeof(fl_directory)); + strlcpy(fl_filename, p, sizeof(fl_filename)); if (p > fl_directory+1) p--; *p = 0; return (char *)q; @@ -61,5 +61,5 @@ char* fl_get_pattern() {return (char *)fl_pattern;} char* fl_get_filename() {return fl_filename;} // -// End of "$Id: forms_fselect.cxx,v 1.4.2.3.2.5 2003/01/30 21:44:29 easysw Exp $". +// End of "$Id: forms_fselect.cxx,v 1.4.2.3.2.6 2003/05/04 21:45:46 easysw Exp $". // -- cgit v1.2.3