This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Saving games in Win TCL fixed
- From: Hans Ronne <hronne at comhem dot se>
- To: "Robert Goulding" <Goulding dot 2 at nd dot edu>
- Cc: xconq7 at sources dot redhat dot com
- Date: Sun, 4 Jul 2004 08:10:31 +0200
- Subject: Saving games in Win TCL fixed
- References: <l03130300bd0b96427c7d@[212.181.162.155]><l03130300bd0c4ec895fa@[212.181.162.155]>
I have now checked in a fix to the Open/Save game bug on the Windows
platform (the problem was with saving games that had been restored). The
bug was not in the C code but in the tkconq.tcl script file, where the
popup_open_dialog procedure did not save and restore the working directory,
thus causing path-finding problems.
To fix the problem in your own tkconq.tcl file (until new binaries are
available) jus make the folowing change:
proc popup_open_dialog { } {
set dname [ game_homedir ]
set rslt [ tk_getOpenFile -initialdir $dname ]
# Empty result cancels.
if { "$rslt" == "" } {
return
}
# Set the working directory manually to the game file location (needed
# in both MacOS and Windows).
set home [ pwd ] # <------ ADD THIS LINE
set dname [ file dirname $rslt ]
cd $dname
start_saved_game "$rslt"
cd $home # <------ ADD THIS LINE
popup_variants_dialog
}
Hans