* "freezing" gitk geometry
@ 2007-02-14 17:23 David Tweed
2007-02-14 17:53 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: David Tweed @ 2007-02-14 17:23 UTC (permalink / raw)
To: git
Hi,
now I've installed 1.5.0, I've discovered gitk is still the
visualisation tool for graphically browsing history. I think gitk is a
good program, but one thing I'd like to be able to change is to have a
way to force gitk not to update its saved internal geometry (position
of internal dividers, etc) when it exits. I tried making ~/.gitk not
writable but that didn't work. I don't know tcl: is there a simple way
to prevent gitk updating this upon quitting?
(Why do I want this? A tiling window manager often changes the size of
clients automatically to fit things onto the screen as new windows
appear. Sometimes this results in windows being made quite small. If I
quit gitk without expanding it up to full size "just to get the
geometry right" it stores a crushed geometry which gets restored when
it's restarted regardless of the actual window space currently
available.)
--
cheers, dave tweed__________________________
david.tweed@gmail.com
Rm 124, School of Systems Engineering, University of Reading.
Details are all that matters; God dwells there, and you never get to
see Him if you don't struggle to get them right. -- Stephen Jay Gould
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: "freezing" gitk geometry
2007-02-14 17:23 "freezing" gitk geometry David Tweed
@ 2007-02-14 17:53 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2007-02-14 17:53 UTC (permalink / raw)
To: David Tweed; +Cc: git
"David Tweed" <david.tweed@gmail.com> writes:
> now I've installed 1.5.0, I've discovered gitk is still the
> visualisation tool for graphically browsing history. I think gitk is a
> good program, but one thing I'd like to be able to change is to have a
> way to force gitk not to update its saved internal geometry (position
> of internal dividers, etc) when it exits. I tried making ~/.gitk not
> writable but that didn't work. I don't know tcl: is there a simple way
> to prevent gitk updating this upon quitting?
I do not talk Tcl, but I think you can apply this patch and then
if you add
set dontsave 1
at the end of ~/.gitk with your editor, it would stop updating
your geometry (or anything else for that matter).
diff --git a/gitk b/gitk
index 9ddff3e..cd0d68d 100755
--- a/gitk
+++ b/gitk
@@ -813,9 +813,10 @@ proc savestuff {w} {
global maxwidth showneartags
global viewname viewfiles viewargs viewperm nextviewnum
global cmitmode wrapcomment
- global colors bgcolor fgcolor diffcolors
+ global colors bgcolor fgcolor diffcolors dontsave
if {$stuffsaved} return
+ if {$dontsave} return
if {![winfo viewable .]} return
catch {
set f [open "~/.gitk-new" w]
@@ -6251,6 +6252,7 @@ set bgcolor white
set fgcolor black
set diffcolors {red "#00a000" blue}
+set dontsave 0
catch {source ~/.gitk}
font create optionfont -family sans-serif -size -12
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-14 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14 17:23 "freezing" gitk geometry David Tweed
2007-02-14 17:53 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.