Author: greg.ercolano
Date: 2009-09-08 22:16:41 -0700 (Tue, 08 Sep 2009)
New Revision: 6853
Log:
Added warnings re: duplicate definition of Fl_Browser.cxx's private FL_BLINE
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.



Modified:
   branches/branch-1.3/src/Fl_Browser.cxx
   branches/branch-1.3/src/Fl_File_Browser.cxx

Modified: branches/branch-1.3/src/Fl_Browser.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Browser.cxx      2009-09-08 01:43:57 UTC (rev 
6852)
+++ branches/branch-1.3/src/Fl_Browser.cxx      2009-09-09 05:16:41 UTC (rev 
6853)
@@ -44,6 +44,11 @@
 #define SELECTED 1
 #define NOTDISPLAYED 2
 
+// WARNING:
+//       Fl_File_Chooser.cxx also has a definition of this structure 
(FL_BLINE).
+//       Changes to FL_BLINE *must* be reflected in Fl_File_Chooser.cxx as 
well.
+//       This hack in Fl_File_Chooser should be solved.
+//
 struct FL_BLINE {      // data is in a linked list of these
   FL_BLINE* prev;
   FL_BLINE* next;
@@ -367,8 +372,7 @@
     fl_font(textfont(), textsize());
     int hh = fl_height();
     if (hh > hmax) hmax = hh;
-  }
-  else {
+  } else {
     const int* i = column_widths();
     // do each column separately as they may all set different fonts:
     for (char* str = l->txt; str && *str; str++) {

Modified: branches/branch-1.3/src/Fl_File_Browser.cxx
===================================================================
--- branches/branch-1.3/src/Fl_File_Browser.cxx 2009-09-08 01:43:57 UTC (rev 
6852)
+++ branches/branch-1.3/src/Fl_File_Browser.cxx 2009-09-09 05:16:41 UTC (rev 
6853)
@@ -81,6 +81,11 @@
 #define SELECTED 1
 #define NOTDISPLAYED 2
 
+// TODO -- Warning: The definition of FL_BLINE here is a hack.
+//    Fl_File_Browser should not do this. PLEASE FIX.
+//    FL_BLINE should be private to Fl_Browser, and not re-defined here.
+//    For now, make sure this struct is precisely consistent with 
Fl_Browser.cxx.
+//
 struct FL_BLINE                        // data is in a linked list of these
 {
   FL_BLINE     *prev;          // Previous item in list

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to