Added saving main window geometry into projman.conf file when close programm

This commit is contained in:
Sergey Kalinin
2018-02-15 12:51:28 +03:00
parent 3eaa8bb66f
commit 91fa85203b
13 changed files with 79 additions and 38 deletions

View File

@@ -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} {