git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitk: Use git wrapper to run git-ls-remote.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 30, 2006, 23:20 UTC
Message-ID
<Pine.LNX.4.63.0603310115480.2585@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<slrne2o8lr.l0.mdw@metalzone.distorted.org.uk>
Hi,
On Thu, 30 Mar 2006, Mark Wooding wrote:
Show 9 quoted lines
> Junio C Hamano <junkio@cox.net> wrote:
> 
> > Does anybody know what is going on?
> 
> I'll try staring at the Tcl source code some time.  I'm rather too busy
> tonight, though.
> 
> There's also some very strange geometry management oddness going on in
> gitk.  I'll try to sort that out too.

That has been discussed. My feeling is that this is a bug of Tk with regard to rootless X servers. I never came around to do a proper patch, but I have explicit -height and -width arguments to all frames and panedwindows.

If you want to start working on it, I attached my current patch, which is good enough for me, but note that it changes the geometry subtly everytime gitk is called...

Hth, Dscho

[PATCH] gitk: make geometry less weird on cygwin and macosx
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 gitk |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gitk b/gitk
index 03cd475..7339069 100755
--- a/gitk
+++ b/gitk
@@ -373,13 +373,13 @@ proc makewindow {rargs} {
 	set geometry(ctexth) [expr {($texth - 8) /
 				    [font metrics $textfont -linespace]}]
     }
-    frame .ctop.top
+    frame .ctop.top -height $geometry(canvh)
     frame .ctop.top.bar
     pack .ctop.top.bar -side bottom -fill x
     set cscroll .ctop.top.csb
     scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0
     pack $cscroll -side right -fill y
-    panedwindow .ctop.top.clist -orient horizontal -sashpad 0 -handlesize 4
+    panedwindow .ctop.top.clist -orient horizontal -sashpad 0 -handlesize 4 -height $geometry(canvh)
     pack .ctop.top.clist -side top -fill both -expand 1
     .ctop add .ctop.top
     set canv .ctop.top.clist.canv
@@ -449,9 +449,10 @@ proc makewindow {rargs} {
     # for making sure type==Exact whenever loc==Pickaxe
     trace add variable findloc write findlocchange
 
-    panedwindow .ctop.cdet -orient horizontal
+    panedwindow .ctop.cdet -orient horizontal \
+	-height [expr $geometry(ctexth)*$linespc+4]
     .ctop add .ctop.cdet
-    frame .ctop.cdet.left
+    frame .ctop.cdet.left -width [expr $geometry(ctextw)*[font measure $textfont "0"]+8]
     set ctext .ctop.cdet.left.ctext
     text $ctext -bg white -state disabled -font $textfont \
 	-width $geometry(ctextw) -height $geometry(ctexth) \
Previous: Mark WoodingNext: Christopher Faylor
Message 4 of 5 in “gitk: Use git wrapper to run git-ls-remote.”
  1. gitk: Use git wrapper to run git-ls-remote.Mark Wooding, Mar 30, 2006
  2. Junio C HamanoMar 30, 2006
  3. Mark WoodingMar 30, 2006
  4. Johannes SchindelinMar 30, 2006
  5. Christopher FaylorMar 30, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.