@matheusbsbs / matheus-bagliano / commits / c876dbadc2
Fork 0

gitk: Remember and restore the window state with the geometry

This records the window state in ~/.gitk. On startup, if the gitk window was previously maximized (zoomed), then we restore that state. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>

Pat Thoyts committed Apr 14, 2009 at 22:09 UTC c876dbadc2d44386962296f09a060c3ae69e2029
1 file changed +5
gitk
+5
@@ -2251,6 +2251,10 @@ proc makewindow {} {
2251 }
2252 }
2253
2254 + if {[info exists geometry(state)] && $geometry(state) eq "zoomed"} {
2255 + wm state . $geometry(state)
2256 + }
2257 +
2258 if {[tk windowingsystem] eq {aqua}} {
2259 set M1B M1
2260 set ::BM "3"
@@ -2548,6 +2552,7 @@ proc savestuff {w} {
2552 puts $f [list set perfile_attrs $perfile_attrs]
2553
2554 puts $f "set geometry(main) [wm geometry .]"
2555 + puts $f "set geometry(state) [wm state .]"
2556 puts $f "set geometry(topwidth) [winfo width .tf]"
2557 puts $f "set geometry(topheight) [winfo height .tf]"
2558 puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\""