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

Re: [PATCH] Make gitk work reasonably well on Cygwin.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 31, 2007, 15:17 UTC
Message-ID
<Pine.LNX.4.63.0701311612420.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<BAY13-F213DF79906B3889D42369D0A50@phx.gbl>
Hi,
On Wed, 31 Jan 2007, Mike Nefari wrote:
> The gitk gui layout was completely broken on Cygwin.

This was noted before. I tried to argue with Paulus (now Cc'ed, as per SubmittingPatches) that he should include it in gitk. Somehow this did not have the effect intended be me.

I also verified that with my Tcl/Tk installation on MacOSX, a patch like this was needed. IIRC Paulus argued that I should get a native TclTk, which is supposed to work (though not with the paths on Cygwin, oh well).

Oh, and it is also needed for MinGW. But I guess it will remain unfixed.
> gitk |  282 ++++++++++++++++++++++++++++++++++++------------------------------
> 1 files changed, 154 insertions(+), 128 deletions(-)
FWIW my patch is less intrusive:
 gitk |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/gitk b/gitk
index 31d0aad..d3dc8f1 100755
--- a/gitk
+++ b/gitk
@@ -451,7 +451,10 @@ proc makewindow {} {
 	set geometry(ctexth) [expr {($texth - 8) /
 				    [font metrics $textfont -linespace]}]
     }
-    frame .ctop.top
+    if {![info exists geometry(ctoptoph)]} {
+	set geometry(ctoptoph) [expr $geometry(canvh)+34]
+    }
+    frame .ctop.top -height $geometry(ctoptoph)
     frame .ctop.top.bar
     frame .ctop.top.lbar
     pack .ctop.top.lbar -side bottom -fill x
@@ -459,7 +462,7 @@ proc makewindow {} {
     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
@@ -568,9 +571,17 @@ proc makewindow {} {
     trace add variable highlight_related write vrel_change
     pack .ctop.top.lbar.relm -side left -fill y
 
-    panedwindow .ctop.cdet -orient horizontal
+    if {![info exists geometry(cdeth)]} {
+	set geometry(cdeth) \
+	    [expr $geometry(ctexth)*[font metrics $textfont -linespace]+4]
+    }
+    panedwindow .ctop.cdet -orient horizontal -height $geometry(cdeth)
     .ctop add .ctop.cdet
-    frame .ctop.cdet.left
+    if {![info exists geometry(cdetleftw)]} {
+	set geometry(cdetleftw) \
+	    [expr $geometry(ctextw)*[font measure $textfont "0"]+8] 
+    }
+    frame .ctop.cdet.left -width $geometry(cdetleftw)
     frame .ctop.cdet.left.bot
     pack .ctop.cdet.left.bot -side bottom -fill x
     button .ctop.cdet.left.bot.search -text "Search" -command dosearch \
@@ -814,6 +825,9 @@ proc savestuff {w} {
 	set wid [expr {([winfo width $cflist] - 11) \
 			   / [font measure [$cflist cget -font] "0"]}]
 	puts $f "set geometry(cflistw) $wid"
+	puts $f "set geometry(ctoptoph) [winfo height .ctop.top]"
+	puts $f "set geometry(cdeth) [winfo height .ctop.cdet]"
+	puts $f "set geometry(cdetleftw) [winfo width .ctop.cdet.left]"
 	puts -nonewline $f "set permviews {"
 	for {set v 0} {$v < $nextviewnum} {incr v} {
 	    if {$viewperm($v)} {
Previous: Mike NefariNext: Mark Levedahl
Message 2 of 23 in “Make gitk work reasonably well on Cygwin.”
  1. Make gitk work reasonably well on Cygwin.Mike Nefari, Jan 31, 2007
  2. Johannes SchindelinJan 31, 2007
  3. Mark LevedahlJan 31, 2007
  4. Johannes SixtJan 31, 2007
  5. Johannes SchindelinJan 31, 2007
  6. Mark LevedahlFeb 1, 2007
  7. Junio C HamanoFeb 1, 2007
  8. Seth FalconFeb 1, 2007
  9. Alex RiesenFeb 1, 2007
  10. Mark LevedahlFeb 1, 2007
  11. Shawn O. PearceFeb 1, 2007
  12. Johannes SchindelinFeb 1, 2007
  13. Mark LevedahlFeb 1, 2007
  14. Johannes SchindelinFeb 1, 2007
  15. Mark LevedahlFeb 1, 2007
  16. Christian MICHONFeb 1, 2007
  17. Johannes SixtFeb 1, 2007
  18. Johannes SchindelinFeb 1, 2007
  19. Mark LevedahlFeb 1, 2007
  20. Mark LevedahlFeb 1, 2007
  21. Johannes SixtJan 31, 2007
  22. Alex RiesenJan 31, 2007
  23. Mark LevedahlJan 31, 2007

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.