Added saving main window geometry into projman.conf file when close programm
This commit is contained in:
@@ -404,10 +404,23 @@ proc SendEmail {mail} {
|
||||
}
|
||||
## QUIT PROJECT MANAGER PROCEDURE ##
|
||||
proc Quit {} {
|
||||
global workDir
|
||||
set v [FileDialog tree close_all]
|
||||
if {$v == "cancel"} {
|
||||
return
|
||||
} else {
|
||||
# copy projman.conf file and rewrite them
|
||||
# open projman.conf file and write current main window geometry
|
||||
file copy -force [file join $workDir projman.conf] [file join $workDir projman.conf.old]
|
||||
set file [open [file join $workDir projman.conf.old] RDONLY]
|
||||
set file1 [open [file join $workDir projman.conf] WRONLY]
|
||||
while {[gets $file line]>=0} {
|
||||
if {[regexp -nocase -all -- {set topLevelGeometry} $line match]} {
|
||||
puts $file1 "set topLevelGeometry \"[winfo geometry .]\""
|
||||
} else {
|
||||
puts $file1 "$line"
|
||||
}
|
||||
}
|
||||
exit
|
||||
}
|
||||
}
|
||||
@@ -750,3 +763,7 @@ proc GetExtention {node} {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user