Author: bgbnbigben
Date: 2011-02-26 04:22:23 -0800 (Sat, 26 Feb 2011)
New Revision: 8477
Log:
Fixed a bug in the FileChooser where a / would be displayed as \/ due to the 
way things were displayed internally.


Modified:
   trunk/src/Menu_add.cxx
   trunk/src/x11/Font_xlfd.cxx

Modified: trunk/src/Menu_add.cxx
===================================================================
--- trunk/src/Menu_add.cxx      2011-02-26 08:23:30 UTC (rev 8476)
+++ trunk/src/Menu_add.cxx      2011-02-26 12:22:23 UTC (rev 8477)
@@ -61,7 +61,14 @@
   } else {
     o = new Item();
   }
-  o->copy_label(label);
+  char buf[1024];
+  const char *p;
+  char *q;
+  for (p = label, q = buf; *p; *q++ = *p++)
+    if (*p == '\\' && p[1]) p++;
+  *q = 0;
+
+  o->copy_label(buf);
   if (flags & MENU_RADIO) o->type(Item::RADIO);
   else if (flags & MENU_TOGGLE) o->type(Item::TOGGLE);
   // Shift the old flags values over to where they are in fltk,

Modified: trunk/src/x11/Font_xlfd.cxx
===================================================================
--- trunk/src/x11/Font_xlfd.cxx 2011-02-26 08:23:30 UTC (rev 8476)
+++ trunk/src/x11/Font_xlfd.cxx 2011-02-26 12:22:23 UTC (rev 8477)
@@ -537,7 +537,7 @@
 
   // See if the current font is correct:
   if (font == current_font_ && psize == current_size_ &&
-      (f->encoding==encoding_ ||
+      ((f && f->encoding && encoding_ && f->encoding == encoding_) ||
           (!encoding_ || !strcmp(f->encoding, encoding_))))
     return;
   current_font_ = font; current_size_ = psize;

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

Reply via email to