FLTK logo

[Library] r8477 - in trunk/src: . x11

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r8477 - in trunk/src: . x11 fltk-dev Feb 26, 2011  
 
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;

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.