From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: git@vger.kernel.org
Cc: paulus@samba.org
Subject: [PATCH] gitk: persist and restore the window state with the geometry
Date: 14 Apr 2009 22:09:53 +0100 [thread overview]
Message-ID: <873acbndr2.fsf@users.sourceforge.net> (raw)
This patch records the window state and if the window was maximized
this state is re-applied.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
gitk | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/gitk b/gitk
index a7294a1..edb3ba2 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"
@@ -2540,6 +2544,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]\""
--
1.6.2.2.1669.g7eaf8
next reply other threads:[~2009-04-14 21:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 21:09 Pat Thoyts [this message]
2009-04-14 21:18 ` [PATCH] gitk: persist and restore the window state with the geometry Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873acbndr2.fsf@users.sourceforge.net \
--to=patthoyts@users.sourceforge.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox