Need to call set_filename() before reading FLUID file, since otherwise

images aren't loaded from the right directory...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-01 23:08:35 +00:00
parent d5b98e56c0
commit d55d0ead70

View File

@ -1,5 +1,5 @@
// //
// "$Id: fluid.cxx,v 1.15.2.13.2.22 2002/05/01 21:41:59 matthiaswm Exp $" // "$Id: fluid.cxx,v 1.15.2.13.2.23 2002/05/01 23:08:35 easysw Exp $"
// //
// FLUID main entry for the Fast Light Tool Kit (FLTK). // FLUID main entry for the Fast Light Tool Kit (FLTK).
// //
@ -163,12 +163,12 @@ void open_cb(Fl_Widget *, void *v) {
void open_history_cb(Fl_Widget *, void *v) { void open_history_cb(Fl_Widget *, void *v) {
if (modflag && !fl_ask("Discard changes?")) return; if (modflag && !fl_ask("Discard changes?")) return;
char *localcopy = strdup( (char*)v ); char *localcopy = strdup( (char*)v );
set_filename(localcopy);
if (!read_file(localcopy, 0)) { if (!read_file(localcopy, 0)) {
fl_message("Can't read %s: %s", v, strerror(errno)); fl_message("Can't read %s: %s", v, strerror(errno));
free(localcopy); free(localcopy);
return; return;
} }
set_filename(localcopy);
modflag = 0; modflag = 0;
free(localcopy); free(localcopy);
} }
@ -780,5 +780,5 @@ int main(int argc,char **argv) {
} }
// //
// End of "$Id: fluid.cxx,v 1.15.2.13.2.22 2002/05/01 21:41:59 matthiaswm Exp $". // End of "$Id: fluid.cxx,v 1.15.2.13.2.23 2002/05/01 23:08:35 easysw Exp $".
// //