Author: sanel.z
Date: 2007-05-31 10:27:07 -0400 (Thu, 31 May 2007)
New Revision: 5864
Log:
Fond demo fixups. Same for error label in fluid.
Modified:
trunk/fluid/fluid.cxx
trunk/test/fonts.cxx
Modified: trunk/fluid/fluid.cxx
===================================================================
--- trunk/fluid/fluid.cxx 2007-05-31 13:38:07 UTC (rev 5863)
+++ trunk/fluid/fluid.cxx 2007-05-31 14:27:07 UTC (rev 5864)
@@ -1411,7 +1411,7 @@
fprintf(stderr,"%s : %s\n", c, strerror(errno));
exit(1);
}
- message("XCan't read %s: %s", c, strerror(errno));
+ message("Can't read %s: %s", c, strerror(errno));
}
if(sw) sw->show(); // keep splash screen on top if any
Undo::resume();
Modified: trunk/test/fonts.cxx
===================================================================
--- trunk/test/fonts.cxx 2007-05-31 13:38:07 UTC (rev 5863)
+++ trunk/test/fonts.cxx 2007-05-31 14:27:07 UTC (rev 5864)
@@ -47,7 +47,7 @@
void FontDisplay::draw() {
draw_box();
- fltk::push_clip(2,2,w()-2,h()-2);
+ fltk::push_clip(2,2,w()-4,h()-4);
const char* saved_encoding = fltk::get_encoding();
fltk::set_encoding(encoding);
fltk::setfont(font, size);
@@ -142,17 +142,16 @@
void encoding_cb(fltk::Widget *, long) {
int i = encobj->value();
-// CET - FIXME - new browser code has value starting from 0!
-// if (!i) return;
+ if (i < 0)
+ return;
textobj->encoding = encobj->child(i)->label();
textobj->redraw();
}
void size_cb(fltk::Widget *, long) {
int i = sizeobj->value();
- if (i < 0) return;
-// CET - FIXME - new browser code has value starting from 0!
-// if (!i) return;
+ if (i < 0)
+ return;
const char *c = sizeobj->child(i)->label();
while (*c < '0' || *c > '9') c++;
pickedsize = (float) atoi(c);
@@ -199,8 +198,9 @@
int main(int argc, char **argv) {
create_the_forms();
int numfonts = fltk::list_fonts(fonts);
- for (int i = 0; i < numfonts; i++) fontobj->add(fonts[i]->name());
-// CET - FIXME - new browser code has value starting from 0!
+ for (int i = 0; i < numfonts; i++)
+ fontobj->add(fonts[i]->name());
+
fontobj->value(0);
textobj->encoding = fltk::get_encoding();
font_cb(fontobj,0);
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit