This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Saving games in Win TCL fixed


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]