Skip to content

Commit

Permalink
gitk: Remember and restore the window state with the geometry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pat Thoyts authored and Paul Mackerras committed Apr 17, 2009
1 parent b6e192d commit c876dba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,10 @@ proc makewindow {} {
}
}

if {[info exists geometry(state)] && $geometry(state) eq "zoomed"} {
wm state . $geometry(state)
}

if {[tk windowingsystem] eq {aqua}} {
set M1B M1
set ::BM "3"
Expand Down Expand Up @@ -2548,6 +2552,7 @@ proc savestuff {w} {
puts $f [list set perfile_attrs $perfile_attrs]

puts $f "set geometry(main) [wm geometry .]"
puts $f "set geometry(state) [wm state .]"
puts $f "set geometry(topwidth) [winfo width .tf]"
puts $f "set geometry(topheight) [winfo height .tf]"
puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\""
Expand Down

0 comments on commit c876dba

Please sign in to comment.