aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2009-04-14 22:09:53 +0100
committerPaul Mackerras <paulus@samba.org>2009-04-17 22:47:49 +1000
commitc876dbadc2d44386962296f09a060c3ae69e2029 (patch)
tree86427d9d08313919bf3b89653580c7d2a270378b
parentb6e192dbf73397da0f76252b7e39770150a8763f (diff)
downloadgit-c876dbadc2d44386962296f09a060c3ae69e2029.tar.gz
git-c876dbadc2d44386962296f09a060c3ae69e2029.tar.xz
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>
-rwxr-xr-xgitk5
1 files changed, 5 insertions, 0 deletions
diff --git a/gitk b/gitk
index a65d961a0..045e4abba 100755
--- a/gitk
+++ b/gitk
@@ -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"
@@ -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]\""