diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-25 16:38:11 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-25 16:38:11 +0000 |
| commit | c147aca0541e9f45b1bd9c8eed4ec71cb1c650ec (patch) | |
| tree | 3593beb32b551396fa369ce98e737f019a9193a9 /fluid | |
| parent | f6d88d27359cc24329ba728d00ede8a363640006 (diff) | |
Add flstring.h header file to include string functions, strcasecmp
definitions, and (v)snprintf function declarations...
Fix Fl_File_Chooser so it always checks for an empty directory_ (so
that is doesn't add the leading slash to drive letters and mount
points)
Make Fl_File_Icon use Fl_Shared_Image, and look in all KDE icon
directories.
Fl::error() no longer exits by default; only Fl::fatal() does...
Wasn't doing callbacks in Fl_Tabs when the current tab was changed
via the keyboard.
FLUID wasn't writing the tooltips in message files, and didn't count
tooltips when computing the message number for catgets.
Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Type.cxx | 7 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 6 | ||||
| -rw-r--r-- | fluid/code.cxx | 122 |
3 files changed, 94 insertions, 41 deletions
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx index 1afc5782d..f36b8970c 100644 --- a/fluid/Fl_Type.cxx +++ b/fluid/Fl_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Type.cxx,v 1.6.2.6.2.1 2001/10/29 03:44:32 easysw Exp $" +// "$Id: Fl_Type.cxx,v 1.6.2.6.2.2 2001/11/25 16:38:11 easysw Exp $" // // Widget type code for the Fast Light Tool Kit (FLTK). // @@ -396,7 +396,8 @@ Fl_Type::msgnum() { Fl_Type *p; for (count = 0, p = this; p;) { - if (p->is_widget() && p->label() && !((Fl_Widget_Type *)p)->image) count ++; + if (p->label()) count ++; + if (p != this && p->is_widget() && ((Fl_Widget_Type *)p)->tooltip()) count ++; if (p->prev) p = p->prev; else p = p->parent; @@ -667,5 +668,5 @@ void Fl_Type::read_property(const char *c) { int Fl_Type::read_fdesign(const char*, const char*) {return 0;} // -// End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.1 2001/10/29 03:44:32 easysw Exp $". +// End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.2 2001/11/25 16:38:11 easysw Exp $". // diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 2594104c6..842fdc3cf 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.7 2001/10/30 21:56:15 easysw Exp $" +// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.8 2001/11/25 16:38:11 easysw Exp $" // // Widget type code for the Fast Light Tool Kit (FLTK). // @@ -1535,7 +1535,7 @@ void Fl_Widget_Type::write_widget_code() { break; case 2 : /* POSIX catgets */ write_c("catgets(%s,%s,%d,", i18n_file[0] ? i18n_file : "_catalog", - i18n_set, msgnum()); + i18n_set, msgnum() + 1); write_cstring(tooltip()); write_c(")"); break; @@ -1963,5 +1963,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) { } // -// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.7 2001/10/30 21:56:15 easysw Exp $". +// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.8 2001/11/25 16:38:11 easysw Exp $". // diff --git a/fluid/code.cxx b/fluid/code.cxx index f523ec085..3356fd8c6 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -1,5 +1,5 @@ // -// "$Id: code.cxx,v 1.9.2.9.2.1 2001/08/02 16:17:04 easysw Exp $" +// "$Id: code.cxx,v 1.9.2.9.2.2 2001/11/25 16:38:11 easysw Exp $" // // Code output routines for the Fast Light Tool Kit (FLTK). // @@ -335,6 +335,7 @@ int write_code(const char *s, const char *t) { int write_strings(const char *sfile) { FILE *fp = fopen(sfile, "w"); Fl_Type *p; + Fl_Widget_Type *w; int i; if (!fp) return 1; @@ -344,13 +345,26 @@ int write_strings(const char *sfile) { fprintf(fp, "# generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); for (p = Fl_Type::first; p; p = p->next) { - if (p->is_widget() && p->label() && !((Fl_Widget_Type *)p)->image) { - for (const char *s = p->label(); *s; s ++) - if (*s < 32 || *s > 126 || *s == '\"') - fprintf(fp, "\\%03o", *s); - else - putc(*s, fp); - putc('\n', fp); + if (p->is_widget()) { + w = (Fl_Widget_Type *)p; + + if (w->label()) { + for (const char *s = w->label(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + putc('\n', fp); + } + + if (w->tooltip()) { + for (const char *s = w->tooltip(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + putc('\n', fp); + } } } break; @@ -358,24 +372,48 @@ int write_strings(const char *sfile) { fprintf(fp, "# generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); for (p = Fl_Type::first; p; p = p->next) { - if (p->is_widget() && p->label() && !((Fl_Widget_Type *)p)->image) { - const char *s; - - fputs("msgid \"", fp); - for (s = p->label(); *s; s ++) - if (*s < 32 || *s > 126 || *s == '\"') - fprintf(fp, "\\%03o", *s); - else - putc(*s, fp); - fputs("\"\n", fp); - - fputs("msgstr \"", fp); - for (s = p->label(); *s; s ++) - if (*s < 32 || *s > 126 || *s == '\"') - fprintf(fp, "\\%03o", *s); - else - putc(*s, fp); - fputs("\"\n", fp); + if (p->is_widget()) { + w = (Fl_Widget_Type *)p; + + if (w->label()) { + const char *s; + + fputs("msgid \"", fp); + for (s = w->label(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + fputs("\"\n", fp); + + fputs("msgstr \"", fp); + for (s = w->label(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + fputs("\"\n", fp); + } + + if (w->tooltip()) { + const char *s; + + fputs("msgid \"", fp); + for (s = w->tooltip(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + fputs("\"\n", fp); + + fputs("msgstr \"", fp); + for (s = w->tooltip(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + fputs("\"\n", fp); + } } } break; @@ -386,14 +424,28 @@ int write_strings(const char *sfile) { fputs("$quote \"\n", fp); for (i = 1, p = Fl_Type::first; p; p = p->next) { - if (p->is_widget() && p->label() && !((Fl_Widget_Type *)p)->image) { - fprintf(fp, "%d \"", i ++); - for (const char *s = p->label(); *s; s ++) - if (*s < 32 || *s > 126 || *s == '\"') - fprintf(fp, "\\%03o", *s); - else - putc(*s, fp); - fputs("\"\n", fp); + if (p->is_widget()) { + w = (Fl_Widget_Type *)p; + + if (w->label()) { + fprintf(fp, "%d \"", i ++); + for (const char *s = w->label(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + fputs("\"\n", fp); + } + + if (w->tooltip()) { + fprintf(fp, "%d \"", i ++); + for (const char *s = w->tooltip(); *s; s ++) + if (*s < 32 || *s > 126 || *s == '\"') + fprintf(fp, "\\%03o", *s); + else + putc(*s, fp); + fputs("\"\n", fp); + } } } break; @@ -412,5 +464,5 @@ void Fl_Type::write_code1() { void Fl_Type::write_code2() {} // -// End of "$Id: code.cxx,v 1.9.2.9.2.1 2001/08/02 16:17:04 easysw Exp $". +// End of "$Id: code.cxx,v 1.9.2.9.2.2 2001/11/25 16:38:11 easysw Exp $". // |
