From 95e27d43f117a9cdc8a6dace63c689d0017321e6 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Tue, 9 Mar 1999 06:59:05 +0000 Subject: Fix from Phil Nelson so that write-code menu item writes to the directory the .fl file is in. git-svn-id: file:///fltk/svn/fltk/trunk@378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/fluid.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 6bdf95b92..02b9b0185 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.14 1999/03/04 18:10:01 mike Exp $" +// "$Id: fluid.cxx,v 1.15 1999/03/09 06:59:05 bill Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -173,7 +173,9 @@ void write_cb(Fl_Widget *, void *) { } else { strcpy(hname, header_file_name); } + if (!compile_only) goto_source_dir(); int x = write_code(cname,hname); + if (!compile_only) leave_source_dir(); strcat(cname, "/"); strcat(cname,header_file_name); if (compile_only) { if (!x) {fprintf(stderr,"%s : %s\n",cname,strerror(errno)); exit(1);} @@ -416,5 +418,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.14 1999/03/04 18:10:01 mike Exp $". +// End of "$Id: fluid.cxx,v 1.15 1999/03/09 06:59:05 bill Exp $". // -- cgit v1.2.3