All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make gitk work reasonably well on Cygwin.
@ 2007-01-31 14:50 Mike Nefari
  2007-01-31 15:17 ` Johannes Schindelin
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Mike Nefari @ 2007-01-31 14:50 UTC (permalink / raw)
  To: git

The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window sashes
to get a useable layout. However, if ~/.gitk existed, this was not possible
at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous bugs
in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
    pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
    Again, this is necessary to get around a layout problem on Cygwin.

Signed-off-by: Mark Levedahl <fastestspinner@hotmail.com>
---
gitk |  282 
++++++++++++++++++++++++++++++++++++------------------------------
1 files changed, 154 insertions(+), 128 deletions(-)

diff --git a/gitk b/gitk
index 31d0aad..8aadf5a 100755
--- a/gitk
+++ b/gitk
@@ -427,7 +427,7 @@ proc makewindow {} {
     .bar.view add separator
     .bar.view add radiobutton -label "All files" -command {showview 0} \
	-variable selectedview -value 0
-
+
     menu .bar.help
     .bar add cascade -label "Help" -menu .bar.help
     .bar.help add command -label "About gitk" -command about
@@ -435,56 +435,59 @@ proc makewindow {} {
     .bar.help configure -font $uifont
     . configure -menu .bar

-    if {![info exists geometry(canv1)]} {
-	set geometry(canv1) [expr {45 * $charspc}]
-	set geometry(canv2) [expr {30 * $charspc}]
-	set geometry(canv3) [expr {15 * $charspc}]
-	set geometry(canvh) [expr {25 * $linespc + 4}]
-	set geometry(ctextw) 80
-	set geometry(ctexth) 30
-	set geometry(cflistw) 30
-    }
+    # the gui has upper and lower half, parts of a paned window.
     panedwindow .ctop -orient vertical
-    if {[info exists geometry(width)]} {
-	.ctop conf -width $geometry(width) -height $geometry(height)
-	set texth [expr {$geometry(height) - $geometry(canvh) - 56}]
-	set geometry(ctexth) [expr {($texth - 8) /
-				    [font metrics $textfont -linespace]}]
-    }
-    frame .ctop.top
-    frame .ctop.top.bar
-    frame .ctop.top.lbar
-    pack .ctop.top.lbar -side bottom -fill x
-    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
-    pack .ctop.top.clist -side top -fill both -expand 1
-    .ctop add .ctop.top
-    set canv .ctop.top.clist.canv
-    canvas $canv -height $geometry(canvh) -width $geometry(canv1) \
+
+    # possibly use assumed geometry
+    if {![info exists geometry(topheight)]} {
+        set geometry(topheight) [expr {15 * $linespc}]
+        set geometry(topwidth) [expr {100 * $charspc}]
+        set geometry(botheight) [expr {30 * $linespc}]
+        set geometry(botwidth) [expr {70 * $charspc}]
+        set geometry(canv) [expr {50 * $charspc}]
+        set geometry(canv2) [expr {30 * $charspc}]
+        set geometry(canv3) [expr {20 * $charspc}]
+    }
+
+    # the upper half will have a paned window, a scroll bar to the right, 
and some stuff below
+    frame .tf -height $geometry(topheight) -width $geometry(topwidth)
+    frame .tf.histframe
+    panedwindow .tf.histframe.pwclist -orient horizontal -sashpad 0 
-handlesize 4
+
+    # create three canvases
+    set cscroll .tf.histframe.csb
+    set canv .tf.histframe.pwclist.canv
+    canvas $canv -width $geometry(canv) \
	-background $bgcolor -bd 0 \
	-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
-    .ctop.top.clist add $canv
-    set canv2 .ctop.top.clist.canv2
-    canvas $canv2 -height $geometry(canvh) -width $geometry(canv2) \
+    .tf.histframe.pwclist add $canv
+    set canv2 .tf.histframe.pwclist.canv2
+    canvas $canv2 -width $geometry(canv2) \
	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv2
-    set canv3 .ctop.top.clist.canv3
-    canvas $canv3 -height $geometry(canvh) -width $geometry(canv3) \
+    .tf.histframe.pwclist add $canv2
+    set canv3 .tf.histframe.pwclist.canv3
+    canvas $canv3 -width $geometry(canv3) \
	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv3
-    bind .ctop.top.clist <Configure> {resizeclistpanes %W %w}
+    .tf.histframe.pwclist add $canv3
+
+    # a scroll bar to rule them
+    scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0
+    pack $cscroll -side right -fill y
+    bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w}
     lappend bglist $canv $canv2 $canv3
+    pack .tf.histframe.pwclist -fill both -expand 1 -side left
+
+    # we have two button bars at bottom of top frame. Bar 1
+    frame .tf.bar
+    frame .tf.lbar -height 15

-    set sha1entry .ctop.top.bar.sha1
+    set sha1entry .tf.bar.sha1
     set entries $sha1entry
-    set sha1but .ctop.top.bar.sha1label
+    set sha1but .tf.bar.sha1label
     button $sha1but -text "SHA1 ID: " -state disabled -relief flat \
	-command gotocommit -width 8 -font $uifont
     $sha1but conf -disabledforeground [$sha1but cget -foreground]
-    pack .ctop.top.bar.sha1label -side left
+    pack .tf.bar.sha1label -side left
     entry $sha1entry -width 40 -font $textfont -textvariable sha1string
     trace add variable sha1string write sha1change
     pack $sha1entry -side left -pady 2
@@ -505,91 +508,107 @@ proc makewindow {} {
	0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c,
	0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01};
     }
-    button .ctop.top.bar.leftbut -image bm-left -command goback \
+    button .tf.bar.leftbut -image bm-left -command goback \
	-state disabled -width 26
-    pack .ctop.top.bar.leftbut -side left -fill y
-    button .ctop.top.bar.rightbut -image bm-right -command goforw \
+    pack .tf.bar.leftbut -side left -fill y
+    button .tf.bar.rightbut -image bm-right -command goforw \
	-state disabled -width 26
-    pack .ctop.top.bar.rightbut -side left -fill y
+    pack .tf.bar.rightbut -side left -fill y

-    button .ctop.top.bar.findbut -text "Find" -command dofind -font $uifont
-    pack .ctop.top.bar.findbut -side left
+    button .tf.bar.findbut -text "Find" -command dofind -font $uifont
+    pack .tf.bar.findbut -side left
     set findstring {}
-    set fstring .ctop.top.bar.findstring
+    set fstring .tf.bar.findstring
     lappend entries $fstring
     entry $fstring -width 30 -font $textfont -textvariable findstring
     trace add variable findstring write find_change
-    pack $fstring -side left -expand 1 -fill x
+    pack $fstring -side left -expand 1 -fill x -in .tf.bar
     set findtype Exact
-    set findtypemenu [tk_optionMenu .ctop.top.bar.findtype \
-			  findtype Exact IgnCase Regexp]
+    set findtypemenu [tk_optionMenu .tf.bar.findtype \
+		      findtype Exact IgnCase Regexp]
     trace add variable findtype write find_change
-    .ctop.top.bar.findtype configure -font $uifont
-    .ctop.top.bar.findtype.menu configure -font $uifont
+    .tf.bar.findtype configure -font $uifont
+    .tf.bar.findtype.menu configure -font $uifont
     set findloc "All fields"
-    tk_optionMenu .ctop.top.bar.findloc findloc "All fields" Headline \
+    tk_optionMenu .tf.bar.findloc findloc "All fields" Headline \
	Comments Author Committer
     trace add variable findloc write find_change
-    .ctop.top.bar.findloc configure -font $uifont
-    .ctop.top.bar.findloc.menu configure -font $uifont
-    pack .ctop.top.bar.findloc -side right
-    pack .ctop.top.bar.findtype -side right
+    .tf.bar.findloc configure -font $uifont
+    .tf.bar.findloc.menu configure -font $uifont
+    pack .tf.bar.findloc -side right
+    pack .tf.bar.findtype -side right

-    label .ctop.top.lbar.flabel -text "Highlight:  Commits " \
-	-font $uifont
-    pack .ctop.top.lbar.flabel -side left -fill y
+    #-----------------
+
+    # build up the bottom bar of upper window
+    label .tf.lbar.flabel -text "Highlight:  Commits " \
+    -font $uifont
+    pack .tf.lbar.flabel -side left -fill y
     set gdttype "touching paths:"
-    set gm [tk_optionMenu .ctop.top.lbar.gdttype gdttype "touching paths:" 
\
-		"adding/removing string:"]
+    set gm [tk_optionMenu .tf.lbar.gdttype gdttype "touching paths:" \
+	"adding/removing string:"]
     trace add variable gdttype write hfiles_change
     $gm conf -font $uifont
-    .ctop.top.lbar.gdttype conf -font $uifont
-    pack .ctop.top.lbar.gdttype -side left -fill y
-    entry .ctop.top.lbar.fent -width 25 -font $textfont \
+    .tf.lbar.gdttype conf -font $uifont
+    pack .tf.lbar.gdttype -side left -fill y
+    entry .tf.lbar.fent -width 25 -font $textfont \
	-textvariable highlight_files
     trace add variable highlight_files write hfiles_change
-    lappend entries .ctop.top.lbar.fent
-    pack .ctop.top.lbar.fent -side left -fill x -expand 1
-    label .ctop.top.lbar.vlabel -text " OR in view" -font $uifont
-    pack .ctop.top.lbar.vlabel -side left -fill y
+    lappend entries .tf.lbar.fent
+    pack .tf.lbar.fent -side left -fill x -expand 1
+    label .tf.lbar.vlabel -text " OR in view" -font $uifont
+    pack .tf.lbar.vlabel -side left -fill y
     global viewhlmenu selectedhlview
-    set viewhlmenu [tk_optionMenu .ctop.top.lbar.vhl selectedhlview None]
+    set viewhlmenu [tk_optionMenu .tf.lbar.vhl selectedhlview None]
     $viewhlmenu entryconf None -command delvhighlight
     $viewhlmenu conf -font $uifont
-    .ctop.top.lbar.vhl conf -font $uifont
-    pack .ctop.top.lbar.vhl -side left -fill y
-    label .ctop.top.lbar.rlabel -text " OR " -font $uifont
-    pack .ctop.top.lbar.rlabel -side left -fill y
+    .tf.lbar.vhl conf -font $uifont
+    pack .tf.lbar.vhl -side left -fill y
+    label .tf.lbar.rlabel -text " OR " -font $uifont
+    pack .tf.lbar.rlabel -side left -fill y
     global highlight_related
-    set m [tk_optionMenu .ctop.top.lbar.relm highlight_related None \
-	       "Descendent" "Not descendent" "Ancestor" "Not ancestor"]
+    set m [tk_optionMenu .tf.lbar.relm highlight_related None \
+	"Descendent" "Not descendent" "Ancestor" "Not ancestor"]
     $m conf -font $uifont
-    .ctop.top.lbar.relm conf -font $uifont
+    .tf.lbar.relm conf -font $uifont
     trace add variable highlight_related write vrel_change
-    pack .ctop.top.lbar.relm -side left -fill y
-
-    panedwindow .ctop.cdet -orient horizontal
-    .ctop add .ctop.cdet
-    frame .ctop.cdet.left
-    frame .ctop.cdet.left.bot
-    pack .ctop.cdet.left.bot -side bottom -fill x
-    button .ctop.cdet.left.bot.search -text "Search" -command dosearch \
+    pack .tf.lbar.relm -side left -fill y
+
+    # Finish putting the upper half of the viewer together
+    pack .tf.lbar -in .tf -side bottom -fill x
+    pack .tf.bar -in .tf -side bottom -fill x
+    pack .tf.histframe -fill both -side top -expand 1
+    .ctop add .tf
+
+    # now build up the bottom
+    panedwindow .pwbottom -orient horizontal
+
+    # lower left, a text box over search bar, scroll bar to the right
+    # if we know window height, then that will set the lower text height, 
otherwise
+    # we set lower text height which will drive window height
+    if {[info exists geometry(main)]} {
+        frame .bleft -width $geometry(botwidth)
+    } else {
+        frame .bleft -width $geometry(botwidth) -height 
$geometry(botheight)
+    }
+    frame .bleft.top
+
+    button .bleft.top.search -text "Search" -command dosearch \
	-font $uifont
-    pack .ctop.cdet.left.bot.search -side left -padx 5
-    set sstring .ctop.cdet.left.bot.sstring
+    pack .bleft.top.search -side left -padx 5
+    set sstring .bleft.top.sstring
     entry $sstring -width 20 -font $textfont -textvariable searchstring
     lappend entries $sstring
     trace add variable searchstring write incrsearch
     pack $sstring -side left -expand 1 -fill x
-    set ctext .ctop.cdet.left.ctext
+    set ctext .bleft.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
	-state disabled -font $textfont \
-	-width $geometry(ctextw) -height $geometry(ctexth) \
	-yscrollcommand scrolltext -wrap none
-    scrollbar .ctop.cdet.left.sb -command "$ctext yview"
-    pack .ctop.cdet.left.sb -side right -fill y
+    scrollbar .bleft.sb -command "$ctext yview"
+    pack .bleft.top -side top -fill x
+    pack .bleft.sb -side right -fill y
     pack $ctext -side left -fill both -expand 1
-    .ctop.cdet add .ctop.cdet.left
     lappend bglist $ctext
     lappend fglist $ctext

@@ -620,36 +639,45 @@ proc makewindow {} {
     $ctext tag conf msep -font [concat $textfont bold]
     $ctext tag conf found -back yellow

-    frame .ctop.cdet.right
-    frame .ctop.cdet.right.mode
-    radiobutton .ctop.cdet.right.mode.patch -text "Patch" \
+    .pwbottom add .bleft
+
+    # lower right
+    frame .bright
+    frame .bright.mode
+    radiobutton .bright.mode.patch -text "Patch" \
	-command reselectline -variable cmitmode -value "patch"
-    radiobutton .ctop.cdet.right.mode.tree -text "Tree" \
+    radiobutton .bright.mode.tree -text "Tree" \
	-command reselectline -variable cmitmode -value "tree"
-    grid .ctop.cdet.right.mode.patch .ctop.cdet.right.mode.tree -sticky ew
-    pack .ctop.cdet.right.mode -side top -fill x
-    set cflist .ctop.cdet.right.cfiles
+    grid .bright.mode.patch .bright.mode.tree -sticky ew
+    pack .bright.mode -side top -fill x
+    set cflist .bright.cfiles
     set indent [font measure $mainfont "nn"]
-    text $cflist -width $geometry(cflistw) \
+    text $cflist \
	-background $bgcolor -foreground $fgcolor \
	-font $mainfont \
	-tabs [list $indent [expr {2 * $indent}]] \
-	-yscrollcommand ".ctop.cdet.right.sb set" \
+	-yscrollcommand ".bright.sb set" \
	-cursor [. cget -cursor] \
	-spacing1 1 -spacing3 1
     lappend bglist $cflist
     lappend fglist $cflist
-    scrollbar .ctop.cdet.right.sb -command "$cflist yview"
-    pack .ctop.cdet.right.sb -side right -fill y
+    scrollbar .bright.sb -command "$cflist yview"
+    pack .bright.sb -side right -fill y
     pack $cflist -side left -fill both -expand 1
     $cflist tag configure highlight \
	-background [$cflist cget -selectbackground]
     $cflist tag configure bold -font [concat $mainfont bold]
-    .ctop.cdet add .ctop.cdet.right
-    bind .ctop.cdet <Configure> {resizecdetpanes %W %w}

-    pack .ctop -side top -fill both -expand 1
+    .pwbottom add .bright
+    .ctop add .pwbottom
+
+    # restore window position if known
+    if {[info exists geometry(main)]} {
+        wm geometry . "$geometry(main)"
+    }

+    bind .pwbottom <Configure> {resizecdetpanes %W %w}
+    pack .ctop -fill both -expand 1
     bindall <1> {selcanvline %W %x %y}
     #bindall <B1-Motion> {selcanvline %W %x %y}
     bindall <ButtonRelease-4> "allcanvs yview scroll -5 units"
@@ -802,18 +830,16 @@ proc savestuff {w} {
	puts $f [list set fgcolor $fgcolor]
	puts $f [list set colors $colors]
	puts $f [list set diffcolors $diffcolors]
-	puts $f "set geometry(width) [winfo width .ctop]"
-	puts $f "set geometry(height) [winfo height .ctop]"
-	puts $f "set geometry(canv1) [expr {[winfo width $canv]-2}]"
-	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-2}]"
-	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-2}]"
-	puts $f "set geometry(canvh) [expr {[winfo height $canv]-2}]"
-	set wid [expr {([winfo width $ctext] - 8) \
-			   / [font measure $textfont "0"]}]
-	puts $f "set geometry(ctextw) $wid"
-	set wid [expr {([winfo width $cflist] - 11) \
-			   / [font measure [$cflist cget -font] "0"]}]
-	puts $f "set geometry(cflistw) $wid"
+
+        puts $f "set geometry(main) [winfo geometry .]"
+	puts $f "set geometry(topwidth) [winfo width .tf]"
+	puts $f "set geometry(topheight) [winfo height .tf]"
+	puts $f "set geometry(canv) [expr {[winfo width $canv]-0}]"
+	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-0}]"
+	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-0}]"
+	puts $f "set geometry(botwidth) [winfo width .bleft]"
+	puts $f "set geometry(botheight) [winfo height .bleft]"
+
	puts -nonewline $f "set permviews {"
	for {set v 0} {$v < $nextviewnum} {incr v} {
	    if {$viewperm($v)} {
@@ -1402,7 +1428,7 @@ proc newview {ishighlight} {
     set newviewname($nextviewnum) "View $nextviewnum"
     set newviewperm($nextviewnum) 0
     set newviewargs($nextviewnum) [shellarglist $revtreeargs]
-    vieweditor $top $nextviewnum "Gitk view definition"
+    vieweditor $top $nextviewnum "Gitk view definition"
}

proc editview {} {
@@ -3897,7 +3923,7 @@ proc selectline {l isnew} {
	}
	$ctext insert end "\n"
     }
-
+
     set headers {}
     set olds [lindex $parentlist $l]
     if {[llength $olds] > 1} {
@@ -4006,7 +4032,7 @@ proc selnextpage {dir} {
         set l [expr $numcommits - 1]
     }
     unmarkmatches
-    selectline $l 1
+    selectline $l 1
}

proc unselectline {} {
@@ -4043,11 +4069,11 @@ proc addtohistory {cmd} {
     }
     incr historyindex
     if {$historyindex > 1} {
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     } else {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
-    .ctop.top.bar.rightbut conf -state disabled
+    .tf.bar.rightbut conf -state disabled
}

proc godo {elt} {
@@ -4070,7 +4096,7 @@ proc goback {} {
	.ctop.top.bar.rightbut conf -state normal
     }
     if {$historyindex <= 1} {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
}

@@ -4081,10 +4107,10 @@ proc goforw {} {
	set cmd [lindex $history $historyindex]
	incr historyindex
	godo $cmd
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     }
     if {$historyindex >= [llength $history]} {
-	.ctop.top.bar.rightbut conf -state disabled
+	.tf.bar.rightbut conf -state disabled
     }
}

@@ -4591,7 +4617,7 @@ proc searchmarkvisible {doall} {
proc scrolltext {f0 f1} {
     global searchstring

-    .ctop.cdet.left.sb set $f0 $f1
+    .bleft.sb set $f0 $f1
     if {$searchstring ne {}} {
	searchmarkvisible 0
     }
--
1.5.0.rc2.76.g4fc0-dirty

_________________________________________________________________
Search for grocery stores. Find gratitude. Turn a simple search into 
something more. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_gratitude&FORM=WLMTAG

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 14:50 [PATCH] Make gitk work reasonably well on Cygwin Mike Nefari
@ 2007-01-31 15:17 ` Johannes Schindelin
  2007-01-31 16:00   ` Mark Levedahl
                     ` (3 more replies)
  2007-01-31 16:28 ` Johannes Sixt
  2007-01-31 16:36 ` Alex Riesen
  2 siblings, 4 replies; 23+ messages in thread
From: Johannes Schindelin @ 2007-01-31 15:17 UTC (permalink / raw)
  To: Mike Nefari; +Cc: git, Paul Mackerras

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)} {

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 15:17 ` Johannes Schindelin
@ 2007-01-31 16:00   ` Mark Levedahl
  2007-01-31 16:33   ` Johannes Sixt
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 23+ messages in thread
From: Mark Levedahl @ 2007-01-31 16:00 UTC (permalink / raw)
  To: Johannes.Schindelin; +Cc: git, paulus

The current gitk is completely broken on Windows using the current Active 
State Tcl/Tk release as well: the display is very similar to what is shown 
on cygwin. The basic problem seems to be that Tk's geometry manager is 
buggy, on all platforms, not just cygwin. I found many variations of the 
gitk layout that broke on Linux in similar ways to the breakage on cygwin on 
my way to creating this patch (including ones that worked on Cygwin/Windows 
but not on Linux). So, arguments to the effect of "get the native Tcl/Tk" or 
"update Cygwin's Tcl/Tk, the old one is broken" just don't hold up.

Mark Levedahl


>From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
>To: Mike Nefari <fastestspinner@hotmail.com>
>CC: git@vger.kernel.org, Paul Mackerras <paulus@samba.org>
>Subject: Re: [PATCH] Make gitk work reasonably well on Cygwin.
>Date: Wed, 31 Jan 2007 16:17:17 +0100 (CET)
>
>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.
>

_________________________________________________________________
Turn searches into helpful donations. Make your search count. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donation&FORM=WLMTAG

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 14:50 [PATCH] Make gitk work reasonably well on Cygwin Mike Nefari
  2007-01-31 15:17 ` Johannes Schindelin
@ 2007-01-31 16:28 ` Johannes Sixt
  2007-01-31 16:36 ` Alex Riesen
  2 siblings, 0 replies; 23+ messages in thread
From: Johannes Sixt @ 2007-01-31 16:28 UTC (permalink / raw)
  To: git

Mike Nefari wrote:
> 
> The gitk gui layout was completely broken on Cygwin. If gitk was started
> without previous geometry in ~/.gitk, the user could drag the window sashes
> to get a useable layout. However, if ~/.gitk existed, this was not possible
> at all.
> 
> The fix was to rewrite makewindow, changing the toplevel containers and
> the particular geometry information saved between sessions. Numerous bugs
> in both the Cygwin and the Linux Tk versions make this a delicate
> balancing act: the version here works in both but many subtle variants
> are competely broken in one or the other environment.

Your mailer has garbled your patch. But once this is fixed, it works
quite well, both on my Linux box with Tk 8.4, where gitk's layout was
suboptimal, as well as under MinGW, also with Tk 8.4.

Thank you, you saved my day!

-- Hannes

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 15:17 ` Johannes Schindelin
  2007-01-31 16:00   ` Mark Levedahl
@ 2007-01-31 16:33   ` Johannes Sixt
  2007-01-31 16:44     ` Johannes Schindelin
  2007-02-01  1:41   ` Mark Levedahl
  2007-02-01  2:09   ` Mark Levedahl
  3 siblings, 1 reply; 23+ messages in thread
From: Johannes Sixt @ 2007-01-31 16:33 UTC (permalink / raw)
  To: git

Johannes Schindelin wrote:
> 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.

You patch does not improve gitk under MinGW. The layout becomes less
useful because the lower part becomes too high, so that the Search bar
and some part of the patch + file list windows is not visible. :(

-- Hannes

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 14:50 [PATCH] Make gitk work reasonably well on Cygwin Mike Nefari
  2007-01-31 15:17 ` Johannes Schindelin
  2007-01-31 16:28 ` Johannes Sixt
@ 2007-01-31 16:36 ` Alex Riesen
  2007-01-31 16:39   ` Mark Levedahl
  2 siblings, 1 reply; 23+ messages in thread
From: Alex Riesen @ 2007-01-31 16:36 UTC (permalink / raw)
  To: Mike Nefari; +Cc: git

On 1/31/07, Mike Nefari <fastestspinner@hotmail.com> wrote:
> The gitk gui layout was completely broken on Cygwin. If gitk was started
> without previous geometry in ~/.gitk, the user could drag the window sashes
> to get a useable layout. However, if ~/.gitk existed, this was not possible
> at all.
>
> The fix was to rewrite makewindow, changing the toplevel containers and
> the particular geometry information saved between sessions. Numerous bugs
> in both the Cygwin and the Linux Tk versions make this a delicate
> balancing act: the version here works in both but many subtle variants
> are competely broken in one or the other environment.
>

The patch is broken very spectacularly. How have you made it?
Copy-paste in the browsers window?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 16:36 ` Alex Riesen
@ 2007-01-31 16:39   ` Mark Levedahl
  0 siblings, 0 replies; 23+ messages in thread
From: Mark Levedahl @ 2007-01-31 16:39 UTC (permalink / raw)
  To: raa.lkml; +Cc: git

I will resend tonight when I get access to an account where I can control 
the mailer.


>From: "Alex Riesen" <raa.lkml@gmail.com>
>To: "Mike Nefari" <fastestspinner@hotmail.com>
>CC: git@vger.kernel.org
>Subject: Re: [PATCH] Make gitk work reasonably well on Cygwin.
>Date: Wed, 31 Jan 2007 17:36:16 +0100
>
>On 1/31/07, Mike Nefari <fastestspinner@hotmail.com> wrote:
>>The gitk gui layout was completely broken on Cygwin. If gitk was started
>>without previous geometry in ~/.gitk, the user could drag the window 
>>sashes
>>to get a useable layout. However, if ~/.gitk existed, this was not 
>>possible
>>at all.
>>
>>The fix was to rewrite makewindow, changing the toplevel containers and
>>the particular geometry information saved between sessions. Numerous bugs
>>in both the Cygwin and the Linux Tk versions make this a delicate
>>balancing act: the version here works in both but many subtle variants
>>are competely broken in one or the other environment.
>>
>
>The patch is broken very spectacularly. How have you made it?
>Copy-paste in the browsers window?

_________________________________________________________________
Get live scores and news about your team: Add the Live.com Football Page  
http://www.live.com/?addtemplate=football

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 16:33   ` Johannes Sixt
@ 2007-01-31 16:44     ` Johannes Schindelin
  0 siblings, 0 replies; 23+ messages in thread
From: Johannes Schindelin @ 2007-01-31 16:44 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git


Hi,
On Wed, 31 Jan 2007, Johannes Sixt wrote:

> Johannes Schindelin wrote:
> > 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.
> 
> You patch does not improve gitk under MinGW. The layout becomes less
> useful because the lower part becomes too high, so that the Search bar
> and some part of the patch + file list windows is not visible. :(

Ah yes, I don't use gitk all that often, and I did not realize that there 
was a search bar. Still, I think Mike's patch is too verbose, i.e. it is 
not minimal enough ;-)

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 15:17 ` Johannes Schindelin
  2007-01-31 16:00   ` Mark Levedahl
  2007-01-31 16:33   ` Johannes Sixt
@ 2007-02-01  1:41   ` Mark Levedahl
  2007-02-01  3:22     ` Junio C Hamano
  2007-02-01  9:20     ` Johannes Schindelin
  2007-02-01  2:09   ` Mark Levedahl
  3 siblings, 2 replies; 23+ messages in thread
From: Mark Levedahl @ 2007-02-01  1:41 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

[-- Attachment #1: Type: text/plain, Size: 2560 bytes --]

The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window 
sashes to get a useable layout. However, if ~/.gitk existed, this was 
not possible at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous 
bugs in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
    pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
    Again, this is necessary to get around a layout problem on Cygwin.

Also, responding to other comments on this thread:

1) Regarding the size of the patch. I tried many different approaches to 
getting the layout to work on Cgywin as well as Linux, ultimately the 
only approach that worked required changing the very top level structure 
containing the Tk widgets. As the  style used names all widgets using 
their parents, every widget's name is changed. This makes the patch seem 
more complex than it is, many changes  are just changing names. There 
might be a simpler solution, I didn't find it and I can find absolutely 
no indication from googling that anyone else has found a better solution.

2) I have changed the default window size (used only the first time gitk 
is run) to be smaller. This may address the problem of layout noted in 
mingw. Note that the search bar is not at the bottom left, but is now 
middle left. On cygwin, the widgets mostly resize with the window, but 
may not always do so if the resizing is significant, and in particular 
the lower left pane can extend below the window and be clipped. 
Restarting gitk after setting the desired geometry will cause all 
widgets to size correctly, so this layout problem is a minor annoyance 
suffered only the first time, and only on Cygwin (it does not happen on 
Linux).

3) I have tried this extensively on Linux and Cygwin (the latter using 
the native Tcl /Tk as well as one built for the X-server under cygwin). 
This version of gitk works well in all, and as far as I can tell has no 
regressions from the current version while significantly improving the 
situation in native Cygwin.

Mark Levedahl

[-- Attachment #2: 0001-Make-gitk-work-reasonably-well-on-Cygwin.patch --]
[-- Type: text/plain, Size: 18760 bytes --]

>From ba01b56d615dcc553e278ead7030a0f0b4918766 Mon Sep 17 00:00:00 2001
From: Mark Levedahl <mdl123@verizon.net>
Date: Wed, 31 Jan 2007 18:51:21 -0500
Subject: [PATCH] Make gitk work reasonably well on Cygwin.

The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window sashes
to get a useable layout. However, if ~/.gitk existed, this was not possible
at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous bugs
in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
    pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
    Again, this is necessary to get around a layout problem on Cygwin.
---
 gitk |  284 ++++++++++++++++++++++++++++++++++++------------------------------
 1 files changed, 155 insertions(+), 129 deletions(-)

diff --git a/gitk b/gitk
index 31d0aad..a0d27f5 100755
--- a/gitk
+++ b/gitk
@@ -427,7 +427,7 @@ proc makewindow {} {
     .bar.view add separator
     .bar.view add radiobutton -label "All files" -command {showview 0} \
 	-variable selectedview -value 0
-    
+
     menu .bar.help
     .bar add cascade -label "Help" -menu .bar.help
     .bar.help add command -label "About gitk" -command about
@@ -435,56 +435,59 @@ proc makewindow {} {
     .bar.help configure -font $uifont
     . configure -menu .bar
 
-    if {![info exists geometry(canv1)]} {
-	set geometry(canv1) [expr {45 * $charspc}]
-	set geometry(canv2) [expr {30 * $charspc}]
-	set geometry(canv3) [expr {15 * $charspc}]
-	set geometry(canvh) [expr {25 * $linespc + 4}]
-	set geometry(ctextw) 80
-	set geometry(ctexth) 30
-	set geometry(cflistw) 30
-    }
+    # the gui has upper and lower half, parts of a paned window.
     panedwindow .ctop -orient vertical
-    if {[info exists geometry(width)]} {
-	.ctop conf -width $geometry(width) -height $geometry(height)
-	set texth [expr {$geometry(height) - $geometry(canvh) - 56}]
-	set geometry(ctexth) [expr {($texth - 8) /
-				    [font metrics $textfont -linespace]}]
-    }
-    frame .ctop.top
-    frame .ctop.top.bar
-    frame .ctop.top.lbar
-    pack .ctop.top.lbar -side bottom -fill x
-    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
-    pack .ctop.top.clist -side top -fill both -expand 1
-    .ctop add .ctop.top
-    set canv .ctop.top.clist.canv
-    canvas $canv -height $geometry(canvh) -width $geometry(canv1) \
+
+    # possibly use assumed geometry
+    if {![info exists geometry(topheight)]} {
+        set geometry(topheight) [expr {15 * $linespc}]
+        set geometry(topwidth) [expr {80 * $charspc}]
+        set geometry(botheight) [expr {15 * $linespc}]
+        set geometry(botwidth) [expr {50 * $charspc}]
+        set geometry(canv) [expr {40 * $charspc}]
+        set geometry(canv2) [expr {20 * $charspc}]
+        set geometry(canv3) [expr {20 * $charspc}]
+    }
+
+    # the upper half will have a paned window, a scroll bar to the right, and some stuff below
+    frame .tf -height $geometry(topheight) -width $geometry(topwidth)
+    frame .tf.histframe
+    panedwindow .tf.histframe.pwclist -orient horizontal -sashpad 0 -handlesize 4
+
+    # create three canvases
+    set cscroll .tf.histframe.csb
+    set canv .tf.histframe.pwclist.canv
+    canvas $canv -width $geometry(canv) \
 	-background $bgcolor -bd 0 \
 	-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
-    .ctop.top.clist add $canv
-    set canv2 .ctop.top.clist.canv2
-    canvas $canv2 -height $geometry(canvh) -width $geometry(canv2) \
+    .tf.histframe.pwclist add $canv
+    set canv2 .tf.histframe.pwclist.canv2
+    canvas $canv2 -width $geometry(canv2) \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv2
-    set canv3 .ctop.top.clist.canv3
-    canvas $canv3 -height $geometry(canvh) -width $geometry(canv3) \
+    .tf.histframe.pwclist add $canv2
+    set canv3 .tf.histframe.pwclist.canv3
+    canvas $canv3 -width $geometry(canv3) \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv3
-    bind .ctop.top.clist <Configure> {resizeclistpanes %W %w}
+    .tf.histframe.pwclist add $canv3
+
+    # a scroll bar to rule them
+    scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0
+    pack $cscroll -side right -fill y
+    bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w}
     lappend bglist $canv $canv2 $canv3
+    pack .tf.histframe.pwclist -fill both -expand 1 -side left
+
+    # we have two button bars at bottom of top frame. Bar 1
+    frame .tf.bar
+    frame .tf.lbar -height 15
 
-    set sha1entry .ctop.top.bar.sha1
+    set sha1entry .tf.bar.sha1
     set entries $sha1entry
-    set sha1but .ctop.top.bar.sha1label
+    set sha1but .tf.bar.sha1label
     button $sha1but -text "SHA1 ID: " -state disabled -relief flat \
 	-command gotocommit -width 8 -font $uifont
     $sha1but conf -disabledforeground [$sha1but cget -foreground]
-    pack .ctop.top.bar.sha1label -side left
+    pack .tf.bar.sha1label -side left
     entry $sha1entry -width 40 -font $textfont -textvariable sha1string
     trace add variable sha1string write sha1change
     pack $sha1entry -side left -pady 2
@@ -505,91 +508,107 @@ proc makewindow {} {
 	0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c,
 	0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01};
     }
-    button .ctop.top.bar.leftbut -image bm-left -command goback \
+    button .tf.bar.leftbut -image bm-left -command goback \
 	-state disabled -width 26
-    pack .ctop.top.bar.leftbut -side left -fill y
-    button .ctop.top.bar.rightbut -image bm-right -command goforw \
+    pack .tf.bar.leftbut -side left -fill y
+    button .tf.bar.rightbut -image bm-right -command goforw \
 	-state disabled -width 26
-    pack .ctop.top.bar.rightbut -side left -fill y
+    pack .tf.bar.rightbut -side left -fill y
 
-    button .ctop.top.bar.findbut -text "Find" -command dofind -font $uifont
-    pack .ctop.top.bar.findbut -side left
+    button .tf.bar.findbut -text "Find" -command dofind -font $uifont
+    pack .tf.bar.findbut -side left
     set findstring {}
-    set fstring .ctop.top.bar.findstring
+    set fstring .tf.bar.findstring
     lappend entries $fstring
     entry $fstring -width 30 -font $textfont -textvariable findstring
     trace add variable findstring write find_change
-    pack $fstring -side left -expand 1 -fill x
+    pack $fstring -side left -expand 1 -fill x -in .tf.bar
     set findtype Exact
-    set findtypemenu [tk_optionMenu .ctop.top.bar.findtype \
-			  findtype Exact IgnCase Regexp]
+    set findtypemenu [tk_optionMenu .tf.bar.findtype \
+		      findtype Exact IgnCase Regexp]
     trace add variable findtype write find_change
-    .ctop.top.bar.findtype configure -font $uifont
-    .ctop.top.bar.findtype.menu configure -font $uifont
+    .tf.bar.findtype configure -font $uifont
+    .tf.bar.findtype.menu configure -font $uifont
     set findloc "All fields"
-    tk_optionMenu .ctop.top.bar.findloc findloc "All fields" Headline \
+    tk_optionMenu .tf.bar.findloc findloc "All fields" Headline \
 	Comments Author Committer
     trace add variable findloc write find_change
-    .ctop.top.bar.findloc configure -font $uifont
-    .ctop.top.bar.findloc.menu configure -font $uifont
-    pack .ctop.top.bar.findloc -side right
-    pack .ctop.top.bar.findtype -side right
+    .tf.bar.findloc configure -font $uifont
+    .tf.bar.findloc.menu configure -font $uifont
+    pack .tf.bar.findloc -side right
+    pack .tf.bar.findtype -side right
 
-    label .ctop.top.lbar.flabel -text "Highlight:  Commits " \
-	-font $uifont
-    pack .ctop.top.lbar.flabel -side left -fill y
+    #-----------------
+
+    # build up the bottom bar of upper window
+    label .tf.lbar.flabel -text "Highlight:  Commits " \
+    -font $uifont
+    pack .tf.lbar.flabel -side left -fill y
     set gdttype "touching paths:"
-    set gm [tk_optionMenu .ctop.top.lbar.gdttype gdttype "touching paths:" \
-		"adding/removing string:"]
+    set gm [tk_optionMenu .tf.lbar.gdttype gdttype "touching paths:" \
+	"adding/removing string:"]
     trace add variable gdttype write hfiles_change
     $gm conf -font $uifont
-    .ctop.top.lbar.gdttype conf -font $uifont
-    pack .ctop.top.lbar.gdttype -side left -fill y
-    entry .ctop.top.lbar.fent -width 25 -font $textfont \
+    .tf.lbar.gdttype conf -font $uifont
+    pack .tf.lbar.gdttype -side left -fill y
+    entry .tf.lbar.fent -width 25 -font $textfont \
 	-textvariable highlight_files
     trace add variable highlight_files write hfiles_change
-    lappend entries .ctop.top.lbar.fent
-    pack .ctop.top.lbar.fent -side left -fill x -expand 1
-    label .ctop.top.lbar.vlabel -text " OR in view" -font $uifont
-    pack .ctop.top.lbar.vlabel -side left -fill y
+    lappend entries .tf.lbar.fent
+    pack .tf.lbar.fent -side left -fill x -expand 1
+    label .tf.lbar.vlabel -text " OR in view" -font $uifont
+    pack .tf.lbar.vlabel -side left -fill y
     global viewhlmenu selectedhlview
-    set viewhlmenu [tk_optionMenu .ctop.top.lbar.vhl selectedhlview None]
+    set viewhlmenu [tk_optionMenu .tf.lbar.vhl selectedhlview None]
     $viewhlmenu entryconf None -command delvhighlight
     $viewhlmenu conf -font $uifont
-    .ctop.top.lbar.vhl conf -font $uifont
-    pack .ctop.top.lbar.vhl -side left -fill y
-    label .ctop.top.lbar.rlabel -text " OR " -font $uifont
-    pack .ctop.top.lbar.rlabel -side left -fill y
+    .tf.lbar.vhl conf -font $uifont
+    pack .tf.lbar.vhl -side left -fill y
+    label .tf.lbar.rlabel -text " OR " -font $uifont
+    pack .tf.lbar.rlabel -side left -fill y
     global highlight_related
-    set m [tk_optionMenu .ctop.top.lbar.relm highlight_related None \
-	       "Descendent" "Not descendent" "Ancestor" "Not ancestor"]
+    set m [tk_optionMenu .tf.lbar.relm highlight_related None \
+	"Descendent" "Not descendent" "Ancestor" "Not ancestor"]
     $m conf -font $uifont
-    .ctop.top.lbar.relm conf -font $uifont
+    .tf.lbar.relm conf -font $uifont
     trace add variable highlight_related write vrel_change
-    pack .ctop.top.lbar.relm -side left -fill y
-
-    panedwindow .ctop.cdet -orient horizontal
-    .ctop add .ctop.cdet
-    frame .ctop.cdet.left
-    frame .ctop.cdet.left.bot
-    pack .ctop.cdet.left.bot -side bottom -fill x
-    button .ctop.cdet.left.bot.search -text "Search" -command dosearch \
+    pack .tf.lbar.relm -side left -fill y
+
+    # Finish putting the upper half of the viewer together
+    pack .tf.lbar -in .tf -side bottom -fill x
+    pack .tf.bar -in .tf -side bottom -fill x
+    pack .tf.histframe -fill both -side top -expand 1
+    .ctop add .tf
+
+    # now build up the bottom
+    panedwindow .pwbottom -orient horizontal
+
+    # lower left, a text box over search bar, scroll bar to the right
+    # if we know window height, then that will set the lower text height, otherwise
+    # we set lower text height which will drive window height
+    if {[info exists geometry(main)]} {
+        frame .bleft -width $geometry(botwidth)
+    } else {
+        frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
+    }
+    frame .bleft.top
+
+    button .bleft.top.search -text "Search" -command dosearch \
 	-font $uifont
-    pack .ctop.cdet.left.bot.search -side left -padx 5
-    set sstring .ctop.cdet.left.bot.sstring
+    pack .bleft.top.search -side left -padx 5
+    set sstring .bleft.top.sstring
     entry $sstring -width 20 -font $textfont -textvariable searchstring
     lappend entries $sstring
     trace add variable searchstring write incrsearch
     pack $sstring -side left -expand 1 -fill x
-    set ctext .ctop.cdet.left.ctext
+    set ctext .bleft.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
 	-state disabled -font $textfont \
-	-width $geometry(ctextw) -height $geometry(ctexth) \
 	-yscrollcommand scrolltext -wrap none
-    scrollbar .ctop.cdet.left.sb -command "$ctext yview"
-    pack .ctop.cdet.left.sb -side right -fill y
+    scrollbar .bleft.sb -command "$ctext yview"
+    pack .bleft.top -side top -fill x
+    pack .bleft.sb -side right -fill y
     pack $ctext -side left -fill both -expand 1
-    .ctop.cdet add .ctop.cdet.left
     lappend bglist $ctext
     lappend fglist $ctext
 
@@ -620,36 +639,45 @@ proc makewindow {} {
     $ctext tag conf msep -font [concat $textfont bold]
     $ctext tag conf found -back yellow
 
-    frame .ctop.cdet.right
-    frame .ctop.cdet.right.mode
-    radiobutton .ctop.cdet.right.mode.patch -text "Patch" \
+    .pwbottom add .bleft
+
+    # lower right
+    frame .bright
+    frame .bright.mode
+    radiobutton .bright.mode.patch -text "Patch" \
 	-command reselectline -variable cmitmode -value "patch"
-    radiobutton .ctop.cdet.right.mode.tree -text "Tree" \
+    radiobutton .bright.mode.tree -text "Tree" \
 	-command reselectline -variable cmitmode -value "tree"
-    grid .ctop.cdet.right.mode.patch .ctop.cdet.right.mode.tree -sticky ew
-    pack .ctop.cdet.right.mode -side top -fill x
-    set cflist .ctop.cdet.right.cfiles
+    grid .bright.mode.patch .bright.mode.tree -sticky ew
+    pack .bright.mode -side top -fill x
+    set cflist .bright.cfiles
     set indent [font measure $mainfont "nn"]
-    text $cflist -width $geometry(cflistw) \
+    text $cflist \
 	-background $bgcolor -foreground $fgcolor \
 	-font $mainfont \
 	-tabs [list $indent [expr {2 * $indent}]] \
-	-yscrollcommand ".ctop.cdet.right.sb set" \
+	-yscrollcommand ".bright.sb set" \
 	-cursor [. cget -cursor] \
 	-spacing1 1 -spacing3 1
     lappend bglist $cflist
     lappend fglist $cflist
-    scrollbar .ctop.cdet.right.sb -command "$cflist yview"
-    pack .ctop.cdet.right.sb -side right -fill y
+    scrollbar .bright.sb -command "$cflist yview"
+    pack .bright.sb -side right -fill y
     pack $cflist -side left -fill both -expand 1
     $cflist tag configure highlight \
 	-background [$cflist cget -selectbackground]
     $cflist tag configure bold -font [concat $mainfont bold]
-    .ctop.cdet add .ctop.cdet.right
-    bind .ctop.cdet <Configure> {resizecdetpanes %W %w}
 
-    pack .ctop -side top -fill both -expand 1
+    .pwbottom add .bright
+    .ctop add .pwbottom
+
+    # restore window position if known
+    if {[info exists geometry(main)]} {
+        wm geometry . "$geometry(main)"
+    }
 
+    bind .pwbottom <Configure> {resizecdetpanes %W %w}
+    pack .ctop -fill both -expand 1
     bindall <1> {selcanvline %W %x %y}
     #bindall <B1-Motion> {selcanvline %W %x %y}
     bindall <ButtonRelease-4> "allcanvs yview scroll -5 units"
@@ -802,18 +830,16 @@ proc savestuff {w} {
 	puts $f [list set fgcolor $fgcolor]
 	puts $f [list set colors $colors]
 	puts $f [list set diffcolors $diffcolors]
-	puts $f "set geometry(width) [winfo width .ctop]"
-	puts $f "set geometry(height) [winfo height .ctop]"
-	puts $f "set geometry(canv1) [expr {[winfo width $canv]-2}]"
-	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-2}]"
-	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-2}]"
-	puts $f "set geometry(canvh) [expr {[winfo height $canv]-2}]"
-	set wid [expr {([winfo width $ctext] - 8) \
-			   / [font measure $textfont "0"]}]
-	puts $f "set geometry(ctextw) $wid"
-	set wid [expr {([winfo width $cflist] - 11) \
-			   / [font measure [$cflist cget -font] "0"]}]
-	puts $f "set geometry(cflistw) $wid"
+
+        puts $f "set geometry(main) [winfo geometry .]"
+	puts $f "set geometry(topwidth) [winfo width .tf]"
+	puts $f "set geometry(topheight) [winfo height .tf]"
+	puts $f "set geometry(canv) [expr {[winfo width $canv]-0}]"
+	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-0}]"
+	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-0}]"
+	puts $f "set geometry(botwidth) [winfo width .bleft]"
+	puts $f "set geometry(botheight) [winfo height .bleft]"
+
 	puts -nonewline $f "set permviews {"
 	for {set v 0} {$v < $nextviewnum} {incr v} {
 	    if {$viewperm($v)} {
@@ -1402,7 +1428,7 @@ proc newview {ishighlight} {
     set newviewname($nextviewnum) "View $nextviewnum"
     set newviewperm($nextviewnum) 0
     set newviewargs($nextviewnum) [shellarglist $revtreeargs]
-    vieweditor $top $nextviewnum "Gitk view definition" 
+    vieweditor $top $nextviewnum "Gitk view definition"
 }
 
 proc editview {} {
@@ -3897,7 +3923,7 @@ proc selectline {l isnew} {
 	}
 	$ctext insert end "\n"
     }
- 
+
     set headers {}
     set olds [lindex $parentlist $l]
     if {[llength $olds] > 1} {
@@ -4006,7 +4032,7 @@ proc selnextpage {dir} {
         set l [expr $numcommits - 1]
     }
     unmarkmatches
-    selectline $l 1    
+    selectline $l 1
 }
 
 proc unselectline {} {
@@ -4043,11 +4069,11 @@ proc addtohistory {cmd} {
     }
     incr historyindex
     if {$historyindex > 1} {
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     } else {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
-    .ctop.top.bar.rightbut conf -state disabled
+    .tf.bar.rightbut conf -state disabled
 }
 
 proc godo {elt} {
@@ -4067,10 +4093,10 @@ proc goback {} {
     if {$historyindex > 1} {
 	incr historyindex -1
 	godo [lindex $history [expr {$historyindex - 1}]]
-	.ctop.top.bar.rightbut conf -state normal
+	.tf.bar.rightbut conf -state normal
     }
     if {$historyindex <= 1} {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
 }
 
@@ -4081,10 +4107,10 @@ proc goforw {} {
 	set cmd [lindex $history $historyindex]
 	incr historyindex
 	godo $cmd
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     }
     if {$historyindex >= [llength $history]} {
-	.ctop.top.bar.rightbut conf -state disabled
+	.tf.bar.rightbut conf -state disabled
     }
 }
 
@@ -4591,7 +4617,7 @@ proc searchmarkvisible {doall} {
 proc scrolltext {f0 f1} {
     global searchstring
 
-    .ctop.cdet.left.sb set $f0 $f1
+    .bleft.sb set $f0 $f1
     if {$searchstring ne {}} {
 	searchmarkvisible 0
     }
-- 
1.5.0.rc2.62.g874ea


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-01-31 15:17 ` Johannes Schindelin
                     ` (2 preceding siblings ...)
  2007-02-01  1:41   ` Mark Levedahl
@ 2007-02-01  2:09   ` Mark Levedahl
  3 siblings, 0 replies; 23+ messages in thread
From: Mark Levedahl @ 2007-02-01  2:09 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras

[-- Attachment #1: Type: text/plain, Size: 2560 bytes --]

The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window 
sashes to get a useable layout. However, if ~/.gitk existed, this was 
not possible at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous 
bugs in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
    pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
    Again, this is necessary to get around a layout problem on Cygwin.

Also, responding to other comments on this thread:

1) Regarding the size of the patch. I tried many different approaches to 
getting the layout to work on Cgywin as well as Linux, ultimately the 
only approach that worked required changing the very top level structure 
containing the Tk widgets. As the  style used names all widgets using 
their parents, every widget's name is changed. This makes the patch seem 
more complex than it is, many changes  are just changing names. There 
might be a simpler solution, I didn't find it and I can find absolutely 
no indication from googling that anyone else has found a better solution.

2) I have changed the default window size (used only the first time gitk 
is run) to be smaller. This may address the problem of layout noted in 
mingw. Note that the search bar is not at the bottom left, but is now 
middle left. On cygwin, the widgets mostly resize with the window, but 
may not always do so if the resizing is significant, and in particular 
the lower left pane can extend below the window and be clipped. 
Restarting gitk after setting the desired geometry will cause all 
widgets to size correctly, so this layout problem is a minor annoyance 
suffered only the first time, and only on Cygwin (it does not happen on 
Linux).

3) I have tried this extensively on Linux and Cygwin (the latter using 
the native Tcl /Tk as well as one built for the X-server under cygwin). 
This version of gitk works well in all, and as far as I can tell has no 
regressions from the current version while significantly improving the 
situation in native Cygwin.

Mark Levedahl

[-- Attachment #2: 0001-Make-gitk-work-reasonably-well-on-Cygwin.patch --]
[-- Type: text/plain, Size: 18760 bytes --]

>From ba01b56d615dcc553e278ead7030a0f0b4918766 Mon Sep 17 00:00:00 2001
From: Mark Levedahl <mdl123@verizon.net>
Date: Wed, 31 Jan 2007 18:51:21 -0500
Subject: [PATCH] Make gitk work reasonably well on Cygwin.

The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window sashes
to get a useable layout. However, if ~/.gitk existed, this was not possible
at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous bugs
in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
    pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
    Again, this is necessary to get around a layout problem on Cygwin.
---
 gitk |  284 ++++++++++++++++++++++++++++++++++++------------------------------
 1 files changed, 155 insertions(+), 129 deletions(-)

diff --git a/gitk b/gitk
index 31d0aad..a0d27f5 100755
--- a/gitk
+++ b/gitk
@@ -427,7 +427,7 @@ proc makewindow {} {
     .bar.view add separator
     .bar.view add radiobutton -label "All files" -command {showview 0} \
 	-variable selectedview -value 0
-    
+
     menu .bar.help
     .bar add cascade -label "Help" -menu .bar.help
     .bar.help add command -label "About gitk" -command about
@@ -435,56 +435,59 @@ proc makewindow {} {
     .bar.help configure -font $uifont
     . configure -menu .bar
 
-    if {![info exists geometry(canv1)]} {
-	set geometry(canv1) [expr {45 * $charspc}]
-	set geometry(canv2) [expr {30 * $charspc}]
-	set geometry(canv3) [expr {15 * $charspc}]
-	set geometry(canvh) [expr {25 * $linespc + 4}]
-	set geometry(ctextw) 80
-	set geometry(ctexth) 30
-	set geometry(cflistw) 30
-    }
+    # the gui has upper and lower half, parts of a paned window.
     panedwindow .ctop -orient vertical
-    if {[info exists geometry(width)]} {
-	.ctop conf -width $geometry(width) -height $geometry(height)
-	set texth [expr {$geometry(height) - $geometry(canvh) - 56}]
-	set geometry(ctexth) [expr {($texth - 8) /
-				    [font metrics $textfont -linespace]}]
-    }
-    frame .ctop.top
-    frame .ctop.top.bar
-    frame .ctop.top.lbar
-    pack .ctop.top.lbar -side bottom -fill x
-    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
-    pack .ctop.top.clist -side top -fill both -expand 1
-    .ctop add .ctop.top
-    set canv .ctop.top.clist.canv
-    canvas $canv -height $geometry(canvh) -width $geometry(canv1) \
+
+    # possibly use assumed geometry
+    if {![info exists geometry(topheight)]} {
+        set geometry(topheight) [expr {15 * $linespc}]
+        set geometry(topwidth) [expr {80 * $charspc}]
+        set geometry(botheight) [expr {15 * $linespc}]
+        set geometry(botwidth) [expr {50 * $charspc}]
+        set geometry(canv) [expr {40 * $charspc}]
+        set geometry(canv2) [expr {20 * $charspc}]
+        set geometry(canv3) [expr {20 * $charspc}]
+    }
+
+    # the upper half will have a paned window, a scroll bar to the right, and some stuff below
+    frame .tf -height $geometry(topheight) -width $geometry(topwidth)
+    frame .tf.histframe
+    panedwindow .tf.histframe.pwclist -orient horizontal -sashpad 0 -handlesize 4
+
+    # create three canvases
+    set cscroll .tf.histframe.csb
+    set canv .tf.histframe.pwclist.canv
+    canvas $canv -width $geometry(canv) \
 	-background $bgcolor -bd 0 \
 	-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
-    .ctop.top.clist add $canv
-    set canv2 .ctop.top.clist.canv2
-    canvas $canv2 -height $geometry(canvh) -width $geometry(canv2) \
+    .tf.histframe.pwclist add $canv
+    set canv2 .tf.histframe.pwclist.canv2
+    canvas $canv2 -width $geometry(canv2) \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv2
-    set canv3 .ctop.top.clist.canv3
-    canvas $canv3 -height $geometry(canvh) -width $geometry(canv3) \
+    .tf.histframe.pwclist add $canv2
+    set canv3 .tf.histframe.pwclist.canv3
+    canvas $canv3 -width $geometry(canv3) \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv3
-    bind .ctop.top.clist <Configure> {resizeclistpanes %W %w}
+    .tf.histframe.pwclist add $canv3
+
+    # a scroll bar to rule them
+    scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0
+    pack $cscroll -side right -fill y
+    bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w}
     lappend bglist $canv $canv2 $canv3
+    pack .tf.histframe.pwclist -fill both -expand 1 -side left
+
+    # we have two button bars at bottom of top frame. Bar 1
+    frame .tf.bar
+    frame .tf.lbar -height 15
 
-    set sha1entry .ctop.top.bar.sha1
+    set sha1entry .tf.bar.sha1
     set entries $sha1entry
-    set sha1but .ctop.top.bar.sha1label
+    set sha1but .tf.bar.sha1label
     button $sha1but -text "SHA1 ID: " -state disabled -relief flat \
 	-command gotocommit -width 8 -font $uifont
     $sha1but conf -disabledforeground [$sha1but cget -foreground]
-    pack .ctop.top.bar.sha1label -side left
+    pack .tf.bar.sha1label -side left
     entry $sha1entry -width 40 -font $textfont -textvariable sha1string
     trace add variable sha1string write sha1change
     pack $sha1entry -side left -pady 2
@@ -505,91 +508,107 @@ proc makewindow {} {
 	0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c,
 	0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01};
     }
-    button .ctop.top.bar.leftbut -image bm-left -command goback \
+    button .tf.bar.leftbut -image bm-left -command goback \
 	-state disabled -width 26
-    pack .ctop.top.bar.leftbut -side left -fill y
-    button .ctop.top.bar.rightbut -image bm-right -command goforw \
+    pack .tf.bar.leftbut -side left -fill y
+    button .tf.bar.rightbut -image bm-right -command goforw \
 	-state disabled -width 26
-    pack .ctop.top.bar.rightbut -side left -fill y
+    pack .tf.bar.rightbut -side left -fill y
 
-    button .ctop.top.bar.findbut -text "Find" -command dofind -font $uifont
-    pack .ctop.top.bar.findbut -side left
+    button .tf.bar.findbut -text "Find" -command dofind -font $uifont
+    pack .tf.bar.findbut -side left
     set findstring {}
-    set fstring .ctop.top.bar.findstring
+    set fstring .tf.bar.findstring
     lappend entries $fstring
     entry $fstring -width 30 -font $textfont -textvariable findstring
     trace add variable findstring write find_change
-    pack $fstring -side left -expand 1 -fill x
+    pack $fstring -side left -expand 1 -fill x -in .tf.bar
     set findtype Exact
-    set findtypemenu [tk_optionMenu .ctop.top.bar.findtype \
-			  findtype Exact IgnCase Regexp]
+    set findtypemenu [tk_optionMenu .tf.bar.findtype \
+		      findtype Exact IgnCase Regexp]
     trace add variable findtype write find_change
-    .ctop.top.bar.findtype configure -font $uifont
-    .ctop.top.bar.findtype.menu configure -font $uifont
+    .tf.bar.findtype configure -font $uifont
+    .tf.bar.findtype.menu configure -font $uifont
     set findloc "All fields"
-    tk_optionMenu .ctop.top.bar.findloc findloc "All fields" Headline \
+    tk_optionMenu .tf.bar.findloc findloc "All fields" Headline \
 	Comments Author Committer
     trace add variable findloc write find_change
-    .ctop.top.bar.findloc configure -font $uifont
-    .ctop.top.bar.findloc.menu configure -font $uifont
-    pack .ctop.top.bar.findloc -side right
-    pack .ctop.top.bar.findtype -side right
+    .tf.bar.findloc configure -font $uifont
+    .tf.bar.findloc.menu configure -font $uifont
+    pack .tf.bar.findloc -side right
+    pack .tf.bar.findtype -side right
 
-    label .ctop.top.lbar.flabel -text "Highlight:  Commits " \
-	-font $uifont
-    pack .ctop.top.lbar.flabel -side left -fill y
+    #-----------------
+
+    # build up the bottom bar of upper window
+    label .tf.lbar.flabel -text "Highlight:  Commits " \
+    -font $uifont
+    pack .tf.lbar.flabel -side left -fill y
     set gdttype "touching paths:"
-    set gm [tk_optionMenu .ctop.top.lbar.gdttype gdttype "touching paths:" \
-		"adding/removing string:"]
+    set gm [tk_optionMenu .tf.lbar.gdttype gdttype "touching paths:" \
+	"adding/removing string:"]
     trace add variable gdttype write hfiles_change
     $gm conf -font $uifont
-    .ctop.top.lbar.gdttype conf -font $uifont
-    pack .ctop.top.lbar.gdttype -side left -fill y
-    entry .ctop.top.lbar.fent -width 25 -font $textfont \
+    .tf.lbar.gdttype conf -font $uifont
+    pack .tf.lbar.gdttype -side left -fill y
+    entry .tf.lbar.fent -width 25 -font $textfont \
 	-textvariable highlight_files
     trace add variable highlight_files write hfiles_change
-    lappend entries .ctop.top.lbar.fent
-    pack .ctop.top.lbar.fent -side left -fill x -expand 1
-    label .ctop.top.lbar.vlabel -text " OR in view" -font $uifont
-    pack .ctop.top.lbar.vlabel -side left -fill y
+    lappend entries .tf.lbar.fent
+    pack .tf.lbar.fent -side left -fill x -expand 1
+    label .tf.lbar.vlabel -text " OR in view" -font $uifont
+    pack .tf.lbar.vlabel -side left -fill y
     global viewhlmenu selectedhlview
-    set viewhlmenu [tk_optionMenu .ctop.top.lbar.vhl selectedhlview None]
+    set viewhlmenu [tk_optionMenu .tf.lbar.vhl selectedhlview None]
     $viewhlmenu entryconf None -command delvhighlight
     $viewhlmenu conf -font $uifont
-    .ctop.top.lbar.vhl conf -font $uifont
-    pack .ctop.top.lbar.vhl -side left -fill y
-    label .ctop.top.lbar.rlabel -text " OR " -font $uifont
-    pack .ctop.top.lbar.rlabel -side left -fill y
+    .tf.lbar.vhl conf -font $uifont
+    pack .tf.lbar.vhl -side left -fill y
+    label .tf.lbar.rlabel -text " OR " -font $uifont
+    pack .tf.lbar.rlabel -side left -fill y
     global highlight_related
-    set m [tk_optionMenu .ctop.top.lbar.relm highlight_related None \
-	       "Descendent" "Not descendent" "Ancestor" "Not ancestor"]
+    set m [tk_optionMenu .tf.lbar.relm highlight_related None \
+	"Descendent" "Not descendent" "Ancestor" "Not ancestor"]
     $m conf -font $uifont
-    .ctop.top.lbar.relm conf -font $uifont
+    .tf.lbar.relm conf -font $uifont
     trace add variable highlight_related write vrel_change
-    pack .ctop.top.lbar.relm -side left -fill y
-
-    panedwindow .ctop.cdet -orient horizontal
-    .ctop add .ctop.cdet
-    frame .ctop.cdet.left
-    frame .ctop.cdet.left.bot
-    pack .ctop.cdet.left.bot -side bottom -fill x
-    button .ctop.cdet.left.bot.search -text "Search" -command dosearch \
+    pack .tf.lbar.relm -side left -fill y
+
+    # Finish putting the upper half of the viewer together
+    pack .tf.lbar -in .tf -side bottom -fill x
+    pack .tf.bar -in .tf -side bottom -fill x
+    pack .tf.histframe -fill both -side top -expand 1
+    .ctop add .tf
+
+    # now build up the bottom
+    panedwindow .pwbottom -orient horizontal
+
+    # lower left, a text box over search bar, scroll bar to the right
+    # if we know window height, then that will set the lower text height, otherwise
+    # we set lower text height which will drive window height
+    if {[info exists geometry(main)]} {
+        frame .bleft -width $geometry(botwidth)
+    } else {
+        frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
+    }
+    frame .bleft.top
+
+    button .bleft.top.search -text "Search" -command dosearch \
 	-font $uifont
-    pack .ctop.cdet.left.bot.search -side left -padx 5
-    set sstring .ctop.cdet.left.bot.sstring
+    pack .bleft.top.search -side left -padx 5
+    set sstring .bleft.top.sstring
     entry $sstring -width 20 -font $textfont -textvariable searchstring
     lappend entries $sstring
     trace add variable searchstring write incrsearch
     pack $sstring -side left -expand 1 -fill x
-    set ctext .ctop.cdet.left.ctext
+    set ctext .bleft.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
 	-state disabled -font $textfont \
-	-width $geometry(ctextw) -height $geometry(ctexth) \
 	-yscrollcommand scrolltext -wrap none
-    scrollbar .ctop.cdet.left.sb -command "$ctext yview"
-    pack .ctop.cdet.left.sb -side right -fill y
+    scrollbar .bleft.sb -command "$ctext yview"
+    pack .bleft.top -side top -fill x
+    pack .bleft.sb -side right -fill y
     pack $ctext -side left -fill both -expand 1
-    .ctop.cdet add .ctop.cdet.left
     lappend bglist $ctext
     lappend fglist $ctext
 
@@ -620,36 +639,45 @@ proc makewindow {} {
     $ctext tag conf msep -font [concat $textfont bold]
     $ctext tag conf found -back yellow
 
-    frame .ctop.cdet.right
-    frame .ctop.cdet.right.mode
-    radiobutton .ctop.cdet.right.mode.patch -text "Patch" \
+    .pwbottom add .bleft
+
+    # lower right
+    frame .bright
+    frame .bright.mode
+    radiobutton .bright.mode.patch -text "Patch" \
 	-command reselectline -variable cmitmode -value "patch"
-    radiobutton .ctop.cdet.right.mode.tree -text "Tree" \
+    radiobutton .bright.mode.tree -text "Tree" \
 	-command reselectline -variable cmitmode -value "tree"
-    grid .ctop.cdet.right.mode.patch .ctop.cdet.right.mode.tree -sticky ew
-    pack .ctop.cdet.right.mode -side top -fill x
-    set cflist .ctop.cdet.right.cfiles
+    grid .bright.mode.patch .bright.mode.tree -sticky ew
+    pack .bright.mode -side top -fill x
+    set cflist .bright.cfiles
     set indent [font measure $mainfont "nn"]
-    text $cflist -width $geometry(cflistw) \
+    text $cflist \
 	-background $bgcolor -foreground $fgcolor \
 	-font $mainfont \
 	-tabs [list $indent [expr {2 * $indent}]] \
-	-yscrollcommand ".ctop.cdet.right.sb set" \
+	-yscrollcommand ".bright.sb set" \
 	-cursor [. cget -cursor] \
 	-spacing1 1 -spacing3 1
     lappend bglist $cflist
     lappend fglist $cflist
-    scrollbar .ctop.cdet.right.sb -command "$cflist yview"
-    pack .ctop.cdet.right.sb -side right -fill y
+    scrollbar .bright.sb -command "$cflist yview"
+    pack .bright.sb -side right -fill y
     pack $cflist -side left -fill both -expand 1
     $cflist tag configure highlight \
 	-background [$cflist cget -selectbackground]
     $cflist tag configure bold -font [concat $mainfont bold]
-    .ctop.cdet add .ctop.cdet.right
-    bind .ctop.cdet <Configure> {resizecdetpanes %W %w}
 
-    pack .ctop -side top -fill both -expand 1
+    .pwbottom add .bright
+    .ctop add .pwbottom
+
+    # restore window position if known
+    if {[info exists geometry(main)]} {
+        wm geometry . "$geometry(main)"
+    }
 
+    bind .pwbottom <Configure> {resizecdetpanes %W %w}
+    pack .ctop -fill both -expand 1
     bindall <1> {selcanvline %W %x %y}
     #bindall <B1-Motion> {selcanvline %W %x %y}
     bindall <ButtonRelease-4> "allcanvs yview scroll -5 units"
@@ -802,18 +830,16 @@ proc savestuff {w} {
 	puts $f [list set fgcolor $fgcolor]
 	puts $f [list set colors $colors]
 	puts $f [list set diffcolors $diffcolors]
-	puts $f "set geometry(width) [winfo width .ctop]"
-	puts $f "set geometry(height) [winfo height .ctop]"
-	puts $f "set geometry(canv1) [expr {[winfo width $canv]-2}]"
-	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-2}]"
-	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-2}]"
-	puts $f "set geometry(canvh) [expr {[winfo height $canv]-2}]"
-	set wid [expr {([winfo width $ctext] - 8) \
-			   / [font measure $textfont "0"]}]
-	puts $f "set geometry(ctextw) $wid"
-	set wid [expr {([winfo width $cflist] - 11) \
-			   / [font measure [$cflist cget -font] "0"]}]
-	puts $f "set geometry(cflistw) $wid"
+
+        puts $f "set geometry(main) [winfo geometry .]"
+	puts $f "set geometry(topwidth) [winfo width .tf]"
+	puts $f "set geometry(topheight) [winfo height .tf]"
+	puts $f "set geometry(canv) [expr {[winfo width $canv]-0}]"
+	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-0}]"
+	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-0}]"
+	puts $f "set geometry(botwidth) [winfo width .bleft]"
+	puts $f "set geometry(botheight) [winfo height .bleft]"
+
 	puts -nonewline $f "set permviews {"
 	for {set v 0} {$v < $nextviewnum} {incr v} {
 	    if {$viewperm($v)} {
@@ -1402,7 +1428,7 @@ proc newview {ishighlight} {
     set newviewname($nextviewnum) "View $nextviewnum"
     set newviewperm($nextviewnum) 0
     set newviewargs($nextviewnum) [shellarglist $revtreeargs]
-    vieweditor $top $nextviewnum "Gitk view definition" 
+    vieweditor $top $nextviewnum "Gitk view definition"
 }
 
 proc editview {} {
@@ -3897,7 +3923,7 @@ proc selectline {l isnew} {
 	}
 	$ctext insert end "\n"
     }
- 
+
     set headers {}
     set olds [lindex $parentlist $l]
     if {[llength $olds] > 1} {
@@ -4006,7 +4032,7 @@ proc selnextpage {dir} {
         set l [expr $numcommits - 1]
     }
     unmarkmatches
-    selectline $l 1    
+    selectline $l 1
 }
 
 proc unselectline {} {
@@ -4043,11 +4069,11 @@ proc addtohistory {cmd} {
     }
     incr historyindex
     if {$historyindex > 1} {
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     } else {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
-    .ctop.top.bar.rightbut conf -state disabled
+    .tf.bar.rightbut conf -state disabled
 }
 
 proc godo {elt} {
@@ -4067,10 +4093,10 @@ proc goback {} {
     if {$historyindex > 1} {
 	incr historyindex -1
 	godo [lindex $history [expr {$historyindex - 1}]]
-	.ctop.top.bar.rightbut conf -state normal
+	.tf.bar.rightbut conf -state normal
     }
     if {$historyindex <= 1} {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
 }
 
@@ -4081,10 +4107,10 @@ proc goforw {} {
 	set cmd [lindex $history $historyindex]
 	incr historyindex
 	godo $cmd
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     }
     if {$historyindex >= [llength $history]} {
-	.ctop.top.bar.rightbut conf -state disabled
+	.tf.bar.rightbut conf -state disabled
     }
 }
 
@@ -4591,7 +4617,7 @@ proc searchmarkvisible {doall} {
 proc scrolltext {f0 f1} {
     global searchstring
 
-    .ctop.cdet.left.sb set $f0 $f1
+    .bleft.sb set $f0 $f1
     if {$searchstring ne {}} {
 	searchmarkvisible 0
     }
-- 
1.5.0.rc2.62.g874ea


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01  1:41   ` Mark Levedahl
@ 2007-02-01  3:22     ` Junio C Hamano
  2007-02-01  5:24       ` Seth Falcon
  2007-02-01  9:20     ` Johannes Schindelin
  1 sibling, 1 reply; 23+ messages in thread
From: Junio C Hamano @ 2007-02-01  3:22 UTC (permalink / raw)
  To: git; +Cc: Mark Levedahl

I am not in X right now and won't be able to look at it myself
tonight.  Could folks on MacOS comment on Mark's patch?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01  3:22     ` Junio C Hamano
@ 2007-02-01  5:24       ` Seth Falcon
  2007-02-01  8:03         ` Alex Riesen
  0 siblings, 1 reply; 23+ messages in thread
From: Seth Falcon @ 2007-02-01  5:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Mark Levedahl

Junio C Hamano <junkio@cox.net> writes:

> I am not in X right now and won't be able to look at it myself
> tonight.  Could folks on MacOS comment on Mark's patch?

I gave it a quick spin on OS X.  gitk loads with a different geometry
than it had before, but seems to work the same.  If this fixes things
elsewhere, it seems fine here.

+ seth

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01  5:24       ` Seth Falcon
@ 2007-02-01  8:03         ` Alex Riesen
  2007-02-01 14:03           ` Mark Levedahl
  2007-02-01 19:24           ` Shawn O. Pearce
  0 siblings, 2 replies; 23+ messages in thread
From: Alex Riesen @ 2007-02-01  8:03 UTC (permalink / raw)
  To: Seth Falcon; +Cc: Junio C Hamano, git, Mark Levedahl

On 2/1/07, Seth Falcon <sethfalcon@gmail.com> wrote:
>
> > I am not in X right now and won't be able to look at it myself
> > tonight.  Could folks on MacOS comment on Mark's patch?
>
> I gave it a quick spin on OS X.  gitk loads with a different geometry
> than it had before, but seems to work the same.  If this fixes things
> elsewhere, it seems fine here.
>

FWIW, I confirm that. Much better. Mouse selection still does not
work in patch pane, but broken layout was the most annoying.
Thanks, Mark!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01  1:41   ` Mark Levedahl
  2007-02-01  3:22     ` Junio C Hamano
@ 2007-02-01  9:20     ` Johannes Schindelin
  2007-02-01 13:56       ` Mark Levedahl
  1 sibling, 1 reply; 23+ messages in thread
From: Johannes Schindelin @ 2007-02-01  9:20 UTC (permalink / raw)
  To: Mark Levedahl; +Cc: git, Paul Mackerras

Hi,

On Wed, 31 Jan 2007, Mark Levedahl wrote:

> 1) Regarding the size of the patch. I tried many different approaches to 
> getting the layout to work on Cgywin as well as Linux, ultimately the 
> only approach that worked required changing the very top level structure 
> containing the Tk widgets. As the style used names all widgets using 
> their parents, every widget's name is changed. This makes the patch seem 
> more complex than it is, many changes are just changing names.

Well, I don't like the size mainly because it makes it absolutely 
impossible for me to review it. After 20 lines of just renamed widget 
paths I really lose all my concentration.

And then I find that you also fixed whitespace breakage, which does not 
belong in this patch.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01  9:20     ` Johannes Schindelin
@ 2007-02-01 13:56       ` Mark Levedahl
  2007-02-01 14:05         ` Johannes Schindelin
  0 siblings, 1 reply; 23+ messages in thread
From: Mark Levedahl @ 2007-02-01 13:56 UTC (permalink / raw)
  To: git

"Johannes Schindelin" <Johannes.Schindelin@gmx.de> wrote in message 
news:Pine.LNX.4.63.0702011016430.22628@wbgn013.biozentrum.uni-wuerzburg.de...
> Hi,
>
> And then I find that you also fixed whitespace breakage, which does not
> belong in this patch.
>
> Ciao,
> Dscho
>
My editor simply will not write out trailing whitespace so I do not notice when such breakage is fixed.

In the attached, I split out the four whitespace fixes in a separate patch.

Mark 


begin 666 0002-Make-gitk-work-reasonably-well-on-Cygwin.patch
M1G)O;2 S8S T,C4P-C$V9C!D965D.#@Q8V4Q-CDP93AC,3DU,&(Q-C0S8C W
M($UO;B!397 @,3<@,# Z,# Z,# @,C P,0I&<F]M.B!-87)K($QE=F5D86AL
M(#QM9&PQ,C- =F5R:7IO;BYN970^"D1A=&4Z(%1H=2P@,2!&96(@,C P-R P
M.#HT-CHS." M,#4P, I3=6)J96-T.B!;4$%40TA=($UA:V4@9VET:R!W;W)K
M(')E87-O;F%B;'D@=V5L;"!O;B!#>6=W:6XN"@I4:&4@9VET:R!G=6D@;&%Y
M;W5T('=A<R!C;VUP;&5T96QY(&)R;VME;B!O;B!#>6=W:6XN($EF(&=I=&L@
M=V%S('-T87)T960*=VET:&]U="!P<F5V:6]U<R!G96]M971R>2!I;B!^+RYG
M:71K+"!T:&4@=7-E<B!C;W5L9"!D<F%G('1H92!W:6YD;W<@<V%S:&5S"G1O
M(&=E="!A('5S96%B;&4@;&%Y;W5T+B!(;W=E=F5R+"!I9B!^+RYG:71K(&5X
M:7-T960L('1H:7,@=V%S(&YO="!P;W-S:6)L90IA="!A;&PN"@I4:&4@9FEX
M('=A<R!T;R!R97=R:71E(&UA:V5W:6YD;W<L(&-H86YG:6YG('1H92!T;W!L
M979E;"!C;VYT86EN97)S(&%N9 IT:&4@<&%R=&EC=6QA<B!G96]M971R>2!I
M;F9O<FUA=&EO;B!S879E9"!B971W965N('-E<W-I;VYS+B!.=6UE<F]U<R!B
M=6=S"FEN(&)O=&@@=&AE($-Y9W=I;B!A;F0@=&AE($QI;G5X(%1K('9E<G-I
M;VYS(&UA:V4@=&AI<R!A(&1E;&EC871E"F)A;&%N8VEN9R!A8W0Z('1H92!V
M97)S:6]N(&AE<F4@=V]R:W,@:6X@8F]T:"!B=70@;6%N>2!S=6)T;&4@=F%R
M:6%N=',*87)E(&-O;7!E=&5L>2!B<F]K96X@:6X@;VYE(&]R('1H92!O=&AE
M<B!E;G9I<F]N;65N="X*"E1H<F5E('5S97(@=FES:6)L92!C:&%N9V5S(')E
M<W5L=#H*,2 M(%1H92!V:65W97(@:7,@9G5L;'D@9G5N8W1I;VYA;"!U;F1E
M<B!#>6=W:6XN"C(@+2!4:&4@<V5A<F-H(&)A<B!M;W9E<R!F<F]M('1H92!B
M;W1T;VT@=&\@=&AE('1O<"!O9B!T:&4@;&]W97(@;&5F= H@(" @<&%N92X@
M5&AI<R!W87,@;F5C97-S87)Y('1O(&=E="!A<F]U;F0@82!L87EO=70@<')O
M8FQE;2!O;B!#>6=W:6XN"C,@+2!4:&4@=VEN9&]W('-I>F4@86YD('!O<VET
M:6]N(&ES('-A=F5D(&%N9"!R97-T;W)E9"!B971W965N('-E<W-I;VYS+@H@
M(" @06=A:6XL('1H:7,@:7,@;F5C97-S87)Y('1O(&=E="!A<F]U;F0@82!L
M87EO=70@<')O8FQE;2!O;B!#>6=W:6XN"@I3:6=N960M;V9F+6)Y.B!-87)K
M($QE=F5D86AL(#QM9&PQ,C- =F5R:7IO;BYN970^"BTM+0H@9VET:R!\(" R
M-S8@*RLK*RLK*RLK*RLK*RLK*RLK*RLK*RLK*RLK*RLK*RLK*RLK+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM"B Q(&9I;&5S(&-H86YG960L(#$U
M,"!I;G-E<G1I;VYS*"LI+" Q,C8@9&5L971I;VYS*"TI"@ID:69F("TM9VET
M(&$O9VET:R!B+V=I=&L*:6YD97@@-C4P-#,U92XN.#$S,C@Q,B Q,# W-34*
M+2TM(&$O9VET:PHK*RL@8B]G:71K"D! ("TT,S4L-38@*S0S-2PU.2! 0"!P
M<F]C(&UA:V5W:6YD;W<@>WT@>PH@(" @("YB87(N:&5L<"!C;VYF:6=U<F4@
M+69O;G0@)'5I9F]N= H@(" @("X@8V]N9FEG=7)E("UM96YU("YB87(*( HM
M(" @(&EF('LA6VEN9F\@97AI<W1S(&=E;VUE=')Y*&-A;G8Q*5U]('L*+0ES
M970@9V5O;65T<GDH8V%N=C$I(%ME>'!R('LT-2 J("1C:&%R<W!C?5T*+0ES
M970@9V5O;65T<GDH8V%N=C(I(%ME>'!R('LS," J("1C:&%R<W!C?5T*+0ES
M970@9V5O;65T<GDH8V%N=C,I(%ME>'!R('LQ-2 J("1C:&%R<W!C?5T*+0ES
M970@9V5O;65T<GDH8V%N=F@I(%ME>'!R('LR-2 J("1L:6YE<W!C("L@-'U=
M"BT)<V5T(&=E;VUE=')Y*&-T97AT=RD@.# *+0ES970@9V5O;65T<GDH8W1E
M>'1H*2 S, HM"7-E="!G96]M971R>2AC9FQI<W1W*2 S, HM(" @('T**R @
M(" C('1H92!G=6D@:&%S('5P<&5R(&%N9"!L;W=E<B!H86QF+"!P87)T<R!O
M9B!A('!A;F5D('=I;F1O=RX*(" @("!P86YE9'=I;F1O=R N8W1O<" M;W)I
M96YT('9E<G1I8V%L"BT@(" @:68@>UMI;F9O(&5X:7-T<R!G96]M971R>2AW
M:61T:"E=?2!["BT)+F-T;W @8V]N9B M=VED=&@@)&=E;VUE=')Y*'=I9'1H
M*2 M:&5I9VAT("1G96]M971R>2AH96EG:'0I"BT)<V5T('1E>'1H(%ME>'!R
M('LD9V5O;65T<GDH:&5I9VAT*2 M("1G96]M971R>2AC86YV:"D@+2 U-GU=
M"BT)<V5T(&=E;VUE=')Y*&-T97AT:"D@6V5X<'(@>R@D=&5X=&@@+2 X*2 O
M"BT)"0D)(" @(%MF;VYT(&UE=')I8W,@)'1E>'1F;VYT("UL:6YE<W!A8V5=
M?5T*+2 @("!]"BT@(" @9G)A;64@+F-T;W N=&]P"BT@(" @9G)A;64@+F-T
M;W N=&]P+F)A<@HM(" @(&9R86UE("YC=&]P+G1O<"YL8F%R"BT@(" @<&%C
M:R N8W1O<"YT;W N;&)A<B M<VED92!B;W1T;VT@+69I;&P@> HM(" @('!A
M8VL@+F-T;W N=&]P+F)A<B M<VED92!B;W1T;VT@+69I;&P@> HM(" @('-E
M="!C<V-R;VQL("YC=&]P+G1O<"YC<V(*+2 @("!S8W)O;&QB87(@)&-S8W)O
M;&P@+6-O;6UA;F0@>V%L;&-A;G9S('EV:65W?2 M:&EG:&QI9VAT=&AI8VMN
M97-S(# *+2 @("!P86-K("1C<V-R;VQL("US:61E(')I9VAT("UF:6QL('D*
M+2 @("!P86YE9'=I;F1O=R N8W1O<"YT;W N8VQI<W0@+6]R:65N="!H;W)I
M>F]N=&%L("US87-H<&%D(# @+6AA;F1L97-I>F4@- HM(" @('!A8VL@+F-T
M;W N=&]P+F-L:7-T("US:61E('1O<" M9FEL;"!B;W1H("UE>'!A;F0@,0HM
M(" @("YC=&]P(&%D9" N8W1O<"YT;W *+2 @("!S970@8V%N=B N8W1O<"YT
M;W N8VQI<W0N8V%N=@HM(" @(&-A;G9A<R D8V%N=B M:&5I9VAT("1G96]M
M971R>2AC86YV:"D@+7=I9'1H("1G96]M971R>2AC86YV,2D@7 HK"BL@(" @
M(R!P;W-S:6)L>2!U<V4@87-S=6UE9"!G96]M971R>0HK(" @(&EF('LA6VEN
M9F\@97AI<W1S(&=E;VUE=')Y*'1O<&AE:6=H="E=?2!["BL@(" @(" @('-E
M="!G96]M971R>2AT;W!H96EG:'0I(%ME>'!R('LQ-2 J("1L:6YE<W!C?5T*
M*R @(" @(" @<V5T(&=E;VUE=')Y*'1O<'=I9'1H*2!;97AP<B![.# @*B D
M8VAA<G-P8WU="BL@(" @(" @('-E="!G96]M971R>2AB;W1H96EG:'0I(%ME
M>'!R('LQ-2 J("1L:6YE<W!C?5T**R @(" @(" @<V5T(&=E;VUE=')Y*&)O
M='=I9'1H*2!;97AP<B![-3 @*B D8VAA<G-P8WU="BL@(" @(" @('-E="!G
M96]M971R>2AC86YV*2!;97AP<B![-# @*B D8VAA<G-P8WU="BL@(" @(" @
M('-E="!G96]M971R>2AC86YV,BD@6V5X<'(@>S(P("H@)&-H87)S<&-]70HK
M(" @(" @("!S970@9V5O;65T<GDH8V%N=C,I(%ME>'!R('LR," J("1C:&%R
M<W!C?5T**R @("!]"BL**R @(" C('1H92!U<'!E<B!H86QF('=I;&P@:&%V
M92!A('!A;F5D('=I;F1O=RP@82!S8W)O;&P@8F%R('1O('1H92!R:6=H="P@
M86YD('-O;64@<W1U9F8@8F5L;W<**R @("!F<F%M92 N=&8@+6AE:6=H=" D
M9V5O;65T<GDH=&]P:&5I9VAT*2 M=VED=&@@)&=E;VUE=')Y*'1O<'=I9'1H
M*0HK(" @(&9R86UE("YT9BYH:7-T9G)A;64**R @("!P86YE9'=I;F1O=R N
M=&8N:&ES=&9R86UE+G!W8VQI<W0@+6]R:65N="!H;W)I>F]N=&%L("US87-H
M<&%D(# @+6AA;F1L97-I>F4@- HK"BL@(" @(R!C<F5A=&4@=&AR964@8V%N
M=F%S97,**R @("!S970@8W-C<F]L;" N=&8N:&ES=&9R86UE+F-S8@HK(" @
M('-E="!C86YV("YT9BYH:7-T9G)A;64N<'=C;&ES="YC86YV"BL@(" @8V%N
M=F%S("1C86YV("UW:61T:" D9V5O;65T<GDH8V%N=BD@7 H@"2UB86-K9W)O
M=6YD("1B9V-O;&]R("UB9" P(%P*( DM>7-C<F]L;&EN8W(@)&QI;F5S<&,@
M+7ES8W)O;&QC;VUM86YD(")S8W)O;&QC86YV("1C<V-R;VQL(@HM(" @("YC
M=&]P+G1O<"YC;&ES="!A9&0@)&-A;G8*+2 @("!S970@8V%N=C(@+F-T;W N
M=&]P+F-L:7-T+F-A;G8R"BT@(" @8V%N=F%S("1C86YV,B M:&5I9VAT("1G
M96]M971R>2AC86YV:"D@+7=I9'1H("1G96]M971R>2AC86YV,BD@7 HK(" @
M("YT9BYH:7-T9G)A;64N<'=C;&ES="!A9&0@)&-A;G8**R @("!S970@8V%N
M=C(@+G1F+FAI<W1F<F%M92YP=V-L:7-T+F-A;G8R"BL@(" @8V%N=F%S("1C
M86YV,B M=VED=&@@)&=E;VUE=')Y*&-A;G8R*2!<"B )+6)A8VMG<F]U;F0@
M)&)G8V]L;W(@+6)D(# @+7ES8W)O;&QI;F-R("1L:6YE<W!C"BT@(" @+F-T
M;W N=&]P+F-L:7-T(&%D9" D8V%N=C(*+2 @("!S970@8V%N=C,@+F-T;W N
M=&]P+F-L:7-T+F-A;G8S"BT@(" @8V%N=F%S("1C86YV,R M:&5I9VAT("1G
M96]M971R>2AC86YV:"D@+7=I9'1H("1G96]M971R>2AC86YV,RD@7 HK(" @
M("YT9BYH:7-T9G)A;64N<'=C;&ES="!A9&0@)&-A;G8R"BL@(" @<V5T(&-A
M;G8S("YT9BYH:7-T9G)A;64N<'=C;&ES="YC86YV,PHK(" @(&-A;G9A<R D
M8V%N=C,@+7=I9'1H("1G96]M971R>2AC86YV,RD@7 H@"2UB86-K9W)O=6YD
M("1B9V-O;&]R("UB9" P("UY<V-R;VQL:6YC<B D;&EN97-P8PHM(" @("YC
M=&]P+G1O<"YC;&ES="!A9&0@)&-A;G8S"BT@(" @8FEN9" N8W1O<"YT;W N
M8VQI<W0@/$-O;F9I9W5R93X@>W)E<VEZ96-L:7-T<&%N97,@)5<@)7=]"BL@
M(" @+G1F+FAI<W1F<F%M92YP=V-L:7-T(&%D9" D8V%N=C,**PHK(" @(",@
M82!S8W)O;&P@8F%R('1O(')U;&4@=&AE;0HK(" @('-C<F]L;&)A<B D8W-C
M<F]L;" M8V]M;6%N9"![86QL8V%N=G,@>79I97=]("UH:6=H;&EG:'1T:&EC
M:VYE<W,@, HK(" @('!A8VL@)&-S8W)O;&P@+7-I9&4@<FEG:'0@+69I;&P@
M>0HK(" @(&)I;F0@+G1F+FAI<W1F<F%M92YP=V-L:7-T(#Q#;VYF:6=U<F4^
M('MR97-I>F5C;&ES='!A;F5S("57("5W?0H@(" @(&QA<'!E;F0@8F=L:7-T
M("1C86YV("1C86YV,B D8V%N=C,**R @("!P86-K("YT9BYH:7-T9G)A;64N
M<'=C;&ES=" M9FEL;"!B;W1H("UE>'!A;F0@,2 M<VED92!L969T"B *+2 @
M("!S970@<VAA,65N=')Y("YC=&]P+G1O<"YB87(N<VAA,0HK(" @(",@=V4@
M:&%V92!T=V\@8G5T=&]N(&)A<G,@870@8F]T=&]M(&]F('1O<"!F<F%M92X@
M0F%R(#$**R @("!F<F%M92 N=&8N8F%R"BL@(" @9G)A;64@+G1F+FQB87(@
M+6AE:6=H=" Q-0HK"BL@(" @<V5T('-H83%E;G1R>2 N=&8N8F%R+G-H83$*
M(" @("!S970@96YT<FEE<R D<VAA,65N=')Y"BT@(" @<V5T('-H83%B=70@
M+F-T;W N=&]P+F)A<BYS:&$Q;&%B96P**R @("!S970@<VAA,6)U=" N=&8N
M8F%R+G-H83%L86)E; H@(" @(&)U='1O;B D<VAA,6)U=" M=&5X=" B4TA!
M,2!)1#H@(B M<W1A=&4@9&ES86)L960@+7)E;&EE9B!F;&%T(%P*( DM8V]M
M;6%N9"!G;W1O8V]M;6ET("UW:61T:" X("UF;VYT("1U:69O;G0*(" @(" D
M<VAA,6)U="!C;VYF("UD:7-A8FQE9&9O<F5G<F]U;F0@6R1S:&$Q8G5T(&-G
M970@+69O<F5G<F]U;F1="BT@(" @<&%C:R N8W1O<"YT;W N8F%R+G-H83%L
M86)E;" M<VED92!L969T"BL@(" @<&%C:R N=&8N8F%R+G-H83%L86)E;" M
M<VED92!L969T"B @(" @96YT<GD@)'-H83%E;G1R>2 M=VED=&@@-# @+69O
M;G0@)'1E>'1F;VYT("UT97AT=F%R:6%B;&4@<VAA,7-T<FEN9PH@(" @('1R
M86-E(&%D9"!V87)I86)L92!S:&$Q<W1R:6YG('=R:71E('-H83%C:&%N9V4*
M(" @("!P86-K("1S:&$Q96YT<GD@+7-I9&4@;&5F=" M<&%D>2 R"D! ("TU
M,#4L.3$@*S4P."PQ,#4@0$ @<')O8R!M86ME=VEN9&]W('M]('L*( DP># P
M+" P>#,X+" P>&9F+" P>#=F+" P>&9F+" P>#=F+" P>&9F+" P>#=F+" P
M># P+" P>#,X+" P># P+" P>#%C+ H@"3!X,# L(#!X,&4L(#!X,# L(#!X
M,#<L(#!X.# L(#!X,#,L(#!X8S L(#!X,#%].PH@(" @('T*+2 @("!B=71T
M;VX@+F-T;W N=&]P+F)A<BYL969T8G5T("UI;6%G92!B;2UL969T("UC;VUM
M86YD(&=O8F%C:R!<"BL@(" @8G5T=&]N("YT9BYB87(N;&5F=&)U=" M:6UA
M9V4@8FTM;&5F=" M8V]M;6%N9"!G;V)A8VL@7 H@"2US=&%T92!D:7-A8FQE
M9" M=VED=&@@,C8*+2 @("!P86-K("YC=&]P+G1O<"YB87(N;&5F=&)U=" M
M<VED92!L969T("UF:6QL('D*+2 @("!B=71T;VX@+F-T;W N=&]P+F)A<BYR
M:6=H=&)U=" M:6UA9V4@8FTM<FEG:'0@+6-O;6UA;F0@9V]F;W)W(%P**R @
M("!P86-K("YT9BYB87(N;&5F=&)U=" M<VED92!L969T("UF:6QL('D**R @
M("!B=71T;VX@+G1F+F)A<BYR:6=H=&)U=" M:6UA9V4@8FTM<FEG:'0@+6-O
M;6UA;F0@9V]F;W)W(%P*( DM<W1A=&4@9&ES86)L960@+7=I9'1H(#(V"BT@
M(" @<&%C:R N8W1O<"YT;W N8F%R+G)I9VAT8G5T("US:61E(&QE9G0@+69I
M;&P@>0HK(" @('!A8VL@+G1F+F)A<BYR:6=H=&)U=" M<VED92!L969T("UF
M:6QL('D*( HM(" @(&)U='1O;B N8W1O<"YT;W N8F%R+F9I;F1B=70@+71E
M>'0@(D9I;F0B("UC;VUM86YD(&1O9FEN9" M9F]N=" D=6EF;VYT"BT@(" @
M<&%C:R N8W1O<"YT;W N8F%R+F9I;F1B=70@+7-I9&4@;&5F= HK(" @(&)U
M='1O;B N=&8N8F%R+F9I;F1B=70@+71E>'0@(D9I;F0B("UC;VUM86YD(&1O
M9FEN9" M9F]N=" D=6EF;VYT"BL@(" @<&%C:R N=&8N8F%R+F9I;F1B=70@
M+7-I9&4@;&5F= H@(" @('-E="!F:6YD<W1R:6YG('M]"BT@(" @<V5T(&9S
M=')I;F<@+F-T;W N=&]P+F)A<BYF:6YD<W1R:6YG"BL@(" @<V5T(&9S=')I
M;F<@+G1F+F)A<BYF:6YD<W1R:6YG"B @(" @;&%P<&5N9"!E;G1R:65S("1F
M<W1R:6YG"B @(" @96YT<GD@)&9S=')I;F<@+7=I9'1H(#,P("UF;VYT("1T
M97AT9F]N=" M=&5X='9A<FEA8FQE(&9I;F1S=')I;F<*(" @("!T<F%C92!A
M9&0@=F%R:6%B;&4@9FEN9'-T<FEN9R!W<FET92!F:6YD7V-H86YG90HM(" @
M('!A8VL@)&9S=')I;F<@+7-I9&4@;&5F=" M97AP86YD(#$@+69I;&P@> HK
M(" @('!A8VL@)&9S=')I;F<@+7-I9&4@;&5F=" M97AP86YD(#$@+69I;&P@
M>" M:6X@+G1F+F)A<@H@(" @('-E="!F:6YD='EP92!%>&%C= HM(" @('-E
M="!F:6YD='EP96UE;G4@6W1K7V]P=&EO;DUE;G4@+F-T;W N=&]P+F)A<BYF
M:6YD='EP92!<"BT)"0D@(&9I;F1T>7!E($5X86-T($EG;D-A<V4@4F5G97AP
M70HK(" @('-E="!F:6YD='EP96UE;G4@6W1K7V]P=&EO;DUE;G4@+G1F+F)A
M<BYF:6YD='EP92!<"BL)"2 @(" @(&9I;F1T>7!E($5X86-T($EG;D-A<V4@
M4F5G97AP70H@(" @('1R86-E(&%D9"!V87)I86)L92!F:6YD='EP92!W<FET
M92!F:6YD7V-H86YG90HM(" @("YC=&]P+G1O<"YB87(N9FEN9'1Y<&4@8V]N
M9FEG=7)E("UF;VYT("1U:69O;G0*+2 @(" N8W1O<"YT;W N8F%R+F9I;F1T
M>7!E+FUE;G4@8V]N9FEG=7)E("UF;VYT("1U:69O;G0**R @(" N=&8N8F%R
M+F9I;F1T>7!E(&-O;F9I9W5R92 M9F]N=" D=6EF;VYT"BL@(" @+G1F+F)A
M<BYF:6YD='EP92YM96YU(&-O;F9I9W5R92 M9F]N=" D=6EF;VYT"B @(" @
M<V5T(&9I;F1L;V,@(D%L;"!F:65L9',B"BT@(" @=&M?;W!T:6]N365N=2 N
M8W1O<"YT;W N8F%R+F9I;F1L;V,@9FEN9&QO8R B06QL(&9I96QD<R(@2&5A
M9&QI;F4@7 HK(" @('1K7V]P=&EO;DUE;G4@+G1F+F)A<BYF:6YD;&]C(&9I
M;F1L;V,@(D%L;"!F:65L9',B($AE861L:6YE(%P*( E#;VUM96YT<R!!=71H
M;W(@0V]M;6ET=&5R"B @(" @=')A8V4@861D('9A<FEA8FQE(&9I;F1L;V,@
M=W)I=&4@9FEN9%]C:&%N9V4*+2 @(" N8W1O<"YT;W N8F%R+F9I;F1L;V,@
M8V]N9FEG=7)E("UF;VYT("1U:69O;G0*+2 @(" N8W1O<"YT;W N8F%R+F9I
M;F1L;V,N;65N=2!C;VYF:6=U<F4@+69O;G0@)'5I9F]N= HM(" @('!A8VL@
M+F-T;W N=&]P+F)A<BYF:6YD;&]C("US:61E(')I9VAT"BT@(" @<&%C:R N
M8W1O<"YT;W N8F%R+F9I;F1T>7!E("US:61E(')I9VAT"BT*+2 @("!L86)E
M;" N8W1O<"YT;W N;&)A<BYF;&%B96P@+71E>'0@(DAI9VAL:6=H=#H@($-O
M;6UI=',@(B!<"BT)+69O;G0@)'5I9F]N= HM(" @('!A8VL@+F-T;W N=&]P
M+FQB87(N9FQA8F5L("US:61E(&QE9G0@+69I;&P@>0HK(" @("YT9BYB87(N
M9FEN9&QO8R!C;VYF:6=U<F4@+69O;G0@)'5I9F]N= HK(" @("YT9BYB87(N
M9FEN9&QO8RYM96YU(&-O;F9I9W5R92 M9F]N=" D=6EF;VYT"BL@(" @<&%C
M:R N=&8N8F%R+F9I;F1L;V,@+7-I9&4@<FEG:'0**R @("!P86-K("YT9BYB
M87(N9FEN9'1Y<&4@+7-I9&4@<FEG:'0**PHK(" @(",@8G5I;&0@=7 @=&AE
M(&)O='1O;2!B87(@;V8@=7!P97(@=VEN9&]W"BL@(" @;&%B96P@+G1F+FQB
M87(N9FQA8F5L("UT97AT(")(:6=H;&EG:'0Z("!#;VUM:71S("(@7 HK(" @
M("UF;VYT("1U:69O;G0**R @("!P86-K("YT9BYL8F%R+F9L86)E;" M<VED
M92!L969T("UF:6QL('D*(" @("!S970@9V1T='EP92 B=&]U8VAI;F<@<&%T
M:',Z(@HM(" @('-E="!G;2!;=&M?;W!T:6]N365N=2 N8W1O<"YT;W N;&)A
M<BYG9'1T>7!E(&=D='1Y<&4@(G1O=6-H:6YG('!A=&AS.B(@7 HM"0DB861D
M:6YG+W)E;6]V:6YG('-T<FEN9SHB70HK(" @('-E="!G;2!;=&M?;W!T:6]N
M365N=2 N=&8N;&)A<BYG9'1T>7!E(&=D='1Y<&4@(G1O=6-H:6YG('!A=&AS
M.B(@7 HK"2)A9&1I;F<O<F5M;W9I;F<@<W1R:6YG.B)="B @(" @=')A8V4@
M861D('9A<FEA8FQE(&=D='1Y<&4@=W)I=&4@:&9I;&5S7V-H86YG90H@(" @
M("1G;2!C;VYF("UF;VYT("1U:69O;G0*+2 @(" N8W1O<"YT;W N;&)A<BYG
M9'1T>7!E(&-O;F8@+69O;G0@)'5I9F]N= HM(" @('!A8VL@+F-T;W N=&]P
M+FQB87(N9V1T='EP92 M<VED92!L969T("UF:6QL('D*+2 @("!E;G1R>2 N
M8W1O<"YT;W N;&)A<BYF96YT("UW:61T:" R-2 M9F]N=" D=&5X=&9O;G0@
M7 HK(" @("YT9BYL8F%R+F=D='1Y<&4@8V]N9B M9F]N=" D=6EF;VYT"BL@
M(" @<&%C:R N=&8N;&)A<BYG9'1T>7!E("US:61E(&QE9G0@+69I;&P@>0HK
M(" @(&5N=')Y("YT9BYL8F%R+F9E;G0@+7=I9'1H(#(U("UF;VYT("1T97AT
M9F]N="!<"B )+71E>'1V87)I86)L92!H:6=H;&EG:'1?9FEL97,*(" @("!T
M<F%C92!A9&0@=F%R:6%B;&4@:&EG:&QI9VAT7V9I;&5S('=R:71E(&AF:6QE
M<U]C:&%N9V4*+2 @("!L87!P96YD(&5N=')I97,@+F-T;W N=&]P+FQB87(N
M9F5N= HM(" @('!A8VL@+F-T;W N=&]P+FQB87(N9F5N=" M<VED92!L969T
M("UF:6QL('@@+65X<&%N9" Q"BT@(" @;&%B96P@+F-T;W N=&]P+FQB87(N
M=FQA8F5L("UT97AT("(@3U(@:6X@=FEE=R(@+69O;G0@)'5I9F]N= HM(" @
M('!A8VL@+F-T;W N=&]P+FQB87(N=FQA8F5L("US:61E(&QE9G0@+69I;&P@
M>0HK(" @(&QA<'!E;F0@96YT<FEE<R N=&8N;&)A<BYF96YT"BL@(" @<&%C
M:R N=&8N;&)A<BYF96YT("US:61E(&QE9G0@+69I;&P@>" M97AP86YD(#$*
M*R @("!L86)E;" N=&8N;&)A<BYV;&%B96P@+71E>'0@(B!/4B!I;B!V:65W
M(B M9F]N=" D=6EF;VYT"BL@(" @<&%C:R N=&8N;&)A<BYV;&%B96P@+7-I
M9&4@;&5F=" M9FEL;"!Y"B @(" @9VQO8F%L('9I97=H;&UE;G4@<V5L96-T
M961H;'9I97<*+2 @("!S970@=FEE=VAL;65N=2!;=&M?;W!T:6]N365N=2 N
M8W1O<"YT;W N;&)A<BYV:&P@<V5L96-T961H;'9I97<@3F]N95T**R @("!S
M970@=FEE=VAL;65N=2!;=&M?;W!T:6]N365N=2 N=&8N;&)A<BYV:&P@<V5L
M96-T961H;'9I97<@3F]N95T*(" @(" D=FEE=VAL;65N=2!E;G1R>6-O;F8@
M3F]N92 M8V]M;6%N9"!D96QV:&EG:&QI9VAT"B @(" @)'9I97=H;&UE;G4@
M8V]N9B M9F]N=" D=6EF;VYT"BT@(" @+F-T;W N=&]P+FQB87(N=FAL(&-O
M;F8@+69O;G0@)'5I9F]N= HM(" @('!A8VL@+F-T;W N=&]P+FQB87(N=FAL
M("US:61E(&QE9G0@+69I;&P@>0HM(" @(&QA8F5L("YC=&]P+G1O<"YL8F%R
M+G)L86)E;" M=&5X=" B($]2("(@+69O;G0@)'5I9F]N= HM(" @('!A8VL@
M+F-T;W N=&]P+FQB87(N<FQA8F5L("US:61E(&QE9G0@+69I;&P@>0HK(" @
M("YT9BYL8F%R+G9H;"!C;VYF("UF;VYT("1U:69O;G0**R @("!P86-K("YT
M9BYL8F%R+G9H;" M<VED92!L969T("UF:6QL('D**R @("!L86)E;" N=&8N
M;&)A<BYR;&%B96P@+71E>'0@(B!/4B B("UF;VYT("1U:69O;G0**R @("!P
M86-K("YT9BYL8F%R+G)L86)E;" M<VED92!L969T("UF:6QL('D*(" @("!G
M;&]B86P@:&EG:&QI9VAT7W)E;&%T960*+2 @("!S970@;2!;=&M?;W!T:6]N
M365N=2 N8W1O<"YT;W N;&)A<BYR96QM(&AI9VAL:6=H=%]R96QA=&5D($YO
M;F4@7 HM"2 @(" @(" B1&5S8V5N9&5N="(@(DYO="!D97-C96YD96YT(B B
M06YC97-T;W(B(").;W0@86YC97-T;W(B70HK(" @('-E="!M(%MT:U]O<'1I
M;VY-96YU("YT9BYL8F%R+G)E;&T@:&EG:&QI9VAT7W)E;&%T960@3F]N92!<
M"BL)(D1E<V-E;F1E;G0B(").;W0@9&5S8V5N9&5N="(@(D%N8V5S=&]R(B B
M3F]T(&%N8V5S=&]R(ET*(" @(" D;2!C;VYF("UF;VYT("1U:69O;G0*+2 @
M(" N8W1O<"YT;W N;&)A<BYR96QM(&-O;F8@+69O;G0@)'5I9F]N= HK(" @
M("YT9BYL8F%R+G)E;&T@8V]N9B M9F]N=" D=6EF;VYT"B @(" @=')A8V4@
M861D('9A<FEA8FQE(&AI9VAL:6=H=%]R96QA=&5D('=R:71E('9R96Q?8VAA
M;F=E"BT@(" @<&%C:R N8W1O<"YT;W N;&)A<BYR96QM("US:61E(&QE9G0@
M+69I;&P@>0HM"BT@(" @<&%N961W:6YD;W<@+F-T;W N8V1E=" M;W)I96YT
M(&AO<FEZ;VYT86P*+2 @(" N8W1O<"!A9&0@+F-T;W N8V1E= HM(" @(&9R
M86UE("YC=&]P+F-D970N;&5F= HM(" @(&9R86UE("YC=&]P+F-D970N;&5F
M="YB;W0*+2 @("!P86-K("YC=&]P+F-D970N;&5F="YB;W0@+7-I9&4@8F]T
M=&]M("UF:6QL('@*+2 @("!B=71T;VX@+F-T;W N8V1E="YL969T+F)O="YS
M96%R8V@@+71E>'0@(E-E87)C:"(@+6-O;6UA;F0@9&]S96%R8V@@7 HK(" @
M('!A8VL@+G1F+FQB87(N<F5L;2 M<VED92!L969T("UF:6QL('D**PHK(" @
M(",@1FEN:7-H('!U='1I;F<@=&AE('5P<&5R(&AA;&8@;V8@=&AE('9I97=E
M<B!T;V=E=&AE<@HK(" @('!A8VL@+G1F+FQB87(@+6EN("YT9B M<VED92!B
M;W1T;VT@+69I;&P@> HK(" @('!A8VL@+G1F+F)A<B M:6X@+G1F("US:61E
M(&)O='1O;2 M9FEL;"!X"BL@(" @<&%C:R N=&8N:&ES=&9R86UE("UF:6QL
M(&)O=&@@+7-I9&4@=&]P("UE>'!A;F0@,0HK(" @("YC=&]P(&%D9" N=&8*
M*PHK(" @(",@;F]W(&)U:6QD('5P('1H92!B;W1T;VT**R @("!P86YE9'=I
M;F1O=R N<'=B;W1T;VT@+6]R:65N="!H;W)I>F]N=&%L"BL**R @(" C(&QO
M=V5R(&QE9G0L(&$@=&5X="!B;W@@;W9E<B!S96%R8V@@8F%R+"!S8W)O;&P@
M8F%R('1O('1H92!R:6=H= HK(" @(",@:68@=V4@:VYO=R!W:6YD;W<@:&5I
M9VAT+"!T:&5N('1H870@=VEL;"!S970@=&AE(&QO=V5R('1E>'0@:&5I9VAT
M+"!O=&AE<G=I<V4**R @(" C('=E('-E="!L;W=E<B!T97AT(&AE:6=H="!W
M:&EC:"!W:6QL(&1R:79E('=I;F1O=R!H96EG:'0**R @("!I9B![6VEN9F\@
M97AI<W1S(&=E;VUE=')Y*&UA:6XI77T@>PHK(" @(" @("!F<F%M92 N8FQE
M9G0@+7=I9'1H("1G96]M971R>2AB;W1W:61T:"D**R @("!](&5L<V4@>PHK
M(" @(" @("!F<F%M92 N8FQE9G0@+7=I9'1H("1G96]M971R>2AB;W1W:61T
M:"D@+6AE:6=H=" D9V5O;65T<GDH8F]T:&5I9VAT*0HK(" @('T**R @("!F
M<F%M92 N8FQE9G0N=&]P"BL**R @("!B=71T;VX@+F)L969T+G1O<"YS96%R
M8V@@+71E>'0@(E-E87)C:"(@+6-O;6UA;F0@9&]S96%R8V@@7 H@"2UF;VYT
M("1U:69O;G0*+2 @("!P86-K("YC=&]P+F-D970N;&5F="YB;W0N<V5A<F-H
M("US:61E(&QE9G0@+7!A9'@@-0HM(" @('-E="!S<W1R:6YG("YC=&]P+F-D
M970N;&5F="YB;W0N<W-T<FEN9PHK(" @('!A8VL@+F)L969T+G1O<"YS96%R
M8V@@+7-I9&4@;&5F=" M<&%D>" U"BL@(" @<V5T('-S=')I;F<@+F)L969T
M+G1O<"YS<W1R:6YG"B @(" @96YT<GD@)'-S=')I;F<@+7=I9'1H(#(P("UF
M;VYT("1T97AT9F]N=" M=&5X='9A<FEA8FQE('-E87)C:'-T<FEN9PH@(" @
M(&QA<'!E;F0@96YT<FEE<R D<W-T<FEN9PH@(" @('1R86-E(&%D9"!V87)I
M86)L92!S96%R8VAS=')I;F<@=W)I=&4@:6YC<G-E87)C: H@(" @('!A8VL@
M)'-S=')I;F<@+7-I9&4@;&5F=" M97AP86YD(#$@+69I;&P@> HM(" @('-E
M="!C=&5X=" N8W1O<"YC9&5T+FQE9G0N8W1E>'0**R @("!S970@8W1E>'0@
M+F)L969T+F-T97AT"B @(" @=&5X=" D8W1E>'0@+6)A8VMG<F]U;F0@)&)G
M8V]L;W(@+69O<F5G<F]U;F0@)&9G8V]L;W(@7 H@"2US=&%T92!D:7-A8FQE
M9" M9F]N=" D=&5X=&9O;G0@7 HM"2UW:61T:" D9V5O;65T<GDH8W1E>'1W
M*2 M:&5I9VAT("1G96]M971R>2AC=&5X=&@I(%P*( DM>7-C<F]L;&-O;6UA
M;F0@<V-R;VQL=&5X=" M=W)A<"!N;VYE"BT@(" @<V-R;VQL8F%R("YC=&]P
M+F-D970N;&5F="YS8B M8V]M;6%N9" B)&-T97AT('EV:65W(@HM(" @('!A
M8VL@+F-T;W N8V1E="YL969T+G-B("US:61E(')I9VAT("UF:6QL('D**R @
M("!S8W)O;&QB87(@+F)L969T+G-B("UC;VUM86YD("(D8W1E>'0@>79I97<B
M"BL@(" @<&%C:R N8FQE9G0N=&]P("US:61E('1O<" M9FEL;"!X"BL@(" @
M<&%C:R N8FQE9G0N<V(@+7-I9&4@<FEG:'0@+69I;&P@>0H@(" @('!A8VL@
M)&-T97AT("US:61E(&QE9G0@+69I;&P@8F]T:" M97AP86YD(#$*+2 @(" N
M8W1O<"YC9&5T(&%D9" N8W1O<"YC9&5T+FQE9G0*(" @("!L87!P96YD(&)G
M;&ES=" D8W1E>'0*(" @("!L87!P96YD(&9G;&ES=" D8W1E>'0*( I 0" M
M-C(P+#,V("LV,S<L-#4@0$ @<')O8R!M86ME=VEN9&]W('M]('L*(" @(" D
M8W1E>'0@=&%G(&-O;F8@;7-E<" M9F]N="!;8V]N8V%T("1T97AT9F]N="!B
M;VQD70H@(" @("1C=&5X="!T86<@8V]N9B!F;W5N9" M8F%C:R!Y96QL;W<*
M( HM(" @(&9R86UE("YC=&]P+F-D970N<FEG:'0*+2 @("!F<F%M92 N8W1O
M<"YC9&5T+G)I9VAT+FUO9&4*+2 @("!R861I;V)U='1O;B N8W1O<"YC9&5T
M+G)I9VAT+FUO9&4N<&%T8V@@+71E>'0@(E!A=&-H(B!<"BL@(" @+G!W8F]T
M=&]M(&%D9" N8FQE9G0**PHK(" @(",@;&]W97(@<FEG:'0**R @("!F<F%M
M92 N8G)I9VAT"BL@(" @9G)A;64@+F)R:6=H="YM;V1E"BL@(" @<F%D:6]B
M=71T;VX@+F)R:6=H="YM;V1E+G!A=&-H("UT97AT(")0871C:"(@7 H@"2UC
M;VUM86YD(')E<V5L96-T;&EN92 M=F%R:6%B;&4@8VUI=&UO9&4@+79A;'5E
M(")P871C:"(*+2 @("!R861I;V)U='1O;B N8W1O<"YC9&5T+G)I9VAT+FUO
M9&4N=')E92 M=&5X=" B5')E92(@7 HK(" @(')A9&EO8G5T=&]N("YB<FEG
M:'0N;6]D92YT<F5E("UT97AT(")4<F5E(B!<"B )+6-O;6UA;F0@<F5S96QE
M8W1L:6YE("UV87)I86)L92!C;6ET;6]D92 M=F%L=64@(G1R964B"BT@(" @
M9W)I9" N8W1O<"YC9&5T+G)I9VAT+FUO9&4N<&%T8V@@+F-T;W N8V1E="YR
M:6=H="YM;V1E+G1R964@+7-T:6-K>2!E=PHM(" @('!A8VL@+F-T;W N8V1E
M="YR:6=H="YM;V1E("US:61E('1O<" M9FEL;"!X"BT@(" @<V5T(&-F;&ES
M=" N8W1O<"YC9&5T+G)I9VAT+F-F:6QE<PHK(" @(&=R:60@+F)R:6=H="YM
M;V1E+G!A=&-H("YB<FEG:'0N;6]D92YT<F5E("US=&EC:WD@97<**R @("!P
M86-K("YB<FEG:'0N;6]D92 M<VED92!T;W @+69I;&P@> HK(" @('-E="!C
M9FQI<W0@+F)R:6=H="YC9FEL97,*(" @("!S970@:6YD96YT(%MF;VYT(&UE
M87-U<F4@)&UA:6YF;VYT(")N;B)="BT@(" @=&5X=" D8V9L:7-T("UW:61T
M:" D9V5O;65T<GDH8V9L:7-T=RD@7 HK(" @('1E>'0@)&-F;&ES="!<"B )
M+6)A8VMG<F]U;F0@)&)G8V]L;W(@+69O<F5G<F]U;F0@)&9G8V]L;W(@7 H@
M"2UF;VYT("1M86EN9F]N="!<"B )+71A8G,@6VQI<W0@)&EN9&5N="!;97AP
M<B![,B J("1I;F1E;G1]75T@7 HM"2UY<V-R;VQL8V]M;6%N9" B+F-T;W N
M8V1E="YR:6=H="YS8B!S970B(%P**PDM>7-C<F]L;&-O;6UA;F0@(BYB<FEG
M:'0N<V(@<V5T(B!<"B )+6-U<G-O<B!;+B!C9V5T("UC=7)S;W)=(%P*( DM
M<W!A8VEN9S$@,2 M<W!A8VEN9S,@,0H@(" @(&QA<'!E;F0@8F=L:7-T("1C
M9FQI<W0*(" @("!L87!P96YD(&9G;&ES=" D8V9L:7-T"BT@(" @<V-R;VQL
M8F%R("YC=&]P+F-D970N<FEG:'0N<V(@+6-O;6UA;F0@(B1C9FQI<W0@>79I
M97<B"BT@(" @<&%C:R N8W1O<"YC9&5T+G)I9VAT+G-B("US:61E(')I9VAT
M("UF:6QL('D**R @("!S8W)O;&QB87(@+F)R:6=H="YS8B M8V]M;6%N9" B
M)&-F;&ES="!Y=FEE=R(**R @("!P86-K("YB<FEG:'0N<V(@+7-I9&4@<FEG
M:'0@+69I;&P@>0H@(" @('!A8VL@)&-F;&ES=" M<VED92!L969T("UF:6QL
M(&)O=&@@+65X<&%N9" Q"B @(" @)&-F;&ES="!T86<@8V]N9FEG=7)E(&AI
M9VAL:6=H="!<"B )+6)A8VMG<F]U;F0@6R1C9FQI<W0@8V=E=" M<V5L96-T
M8F%C:V=R;W5N9%T*(" @(" D8V9L:7-T('1A9R!C;VYF:6=U<F4@8F]L9" M
M9F]N="!;8V]N8V%T("1M86EN9F]N="!B;VQD70HM(" @("YC=&]P+F-D970@
M861D("YC=&]P+F-D970N<FEG:'0*+2 @("!B:6YD("YC=&]P+F-D970@/$-O
M;F9I9W5R93X@>W)E<VEZ96-D971P86YE<R E5R E=WT*( HM(" @('!A8VL@
M+F-T;W @+7-I9&4@=&]P("UF:6QL(&)O=&@@+65X<&%N9" Q"BL@(" @+G!W
M8F]T=&]M(&%D9" N8G)I9VAT"BL@(" @+F-T;W @861D("YP=V)O='1O;0H@
M"BL@(" @(R!R97-T;W)E('=I;F1O=R!P;W-I=&EO;B!I9B!K;F]W;@HK(" @
M(&EF('M;:6YF;R!E>&ES=',@9V5O;65T<GDH;6%I;BE=?2!["BL@(" @(" @
M('=M(&=E;VUE=')Y("X@(B1G96]M971R>2AM86EN*2(**R @("!]"BL**R @
M("!B:6YD("YP=V)O='1O;2 \0V]N9FEG=7)E/B![<F5S:7IE8V1E='!A;F5S
M("57("5W?0HK(" @('!A8VL@+F-T;W @+69I;&P@8F]T:" M97AP86YD(#$*
M(" @("!B:6YD86QL(#PQ/B![<V5L8V%N=FQI;F4@)5<@)7@@)7E]"B @(" @
M(V)I;F1A;&P@/$(Q+4UO=&EO;CX@>W-E;&-A;G9L:6YE("57("5X("5Y?0H@
M(" @(&)I;F1A;&P@/$)U='1O;E)E;&5A<V4M-#X@(F%L;&-A;G9S('EV:65W
M('-C<F]L;" M-2!U;FET<R(*0$ @+3@P,BPQ." K.#(X+#$V($! ('!R;V,@
M<V%V97-T=69F('MW?2!["B )<'5T<R D9B!;;&ES="!S970@9F=C;VQO<B D
M9F=C;VQO<ET*( EP=71S("1F(%ML:7-T('-E="!C;VQO<G,@)&-O;&]R<UT*
M( EP=71S("1F(%ML:7-T('-E="!D:69F8V]L;W)S("1D:69F8V]L;W)S70HM
M"7!U=',@)&8@(G-E="!G96]M971R>2AW:61T:"D@6W=I;F9O('=I9'1H("YC
M=&]P72(*+0EP=71S("1F(")S970@9V5O;65T<GDH:&5I9VAT*2!;=VEN9F\@
M:&5I9VAT("YC=&]P72(*+0EP=71S("1F(")S970@9V5O;65T<GDH8V%N=C$I
M(%ME>'!R('M;=VEN9F\@=VED=&@@)&-A;G9=+3)]72(*+0EP=71S("1F(")S
M970@9V5O;65T<GDH8V%N=C(I(%ME>'!R('M;=VEN9F\@=VED=&@@)&-A;G8R
M72TR?5TB"BT)<'5T<R D9B B<V5T(&=E;VUE=')Y*&-A;G8S*2!;97AP<B![
M6W=I;F9O('=I9'1H("1C86YV,UTM,GU=(@HM"7!U=',@)&8@(G-E="!G96]M
M971R>2AC86YV:"D@6V5X<'(@>UMW:6YF;R!H96EG:'0@)&-A;G9=+3)]72(*
M+0ES970@=VED(%ME>'!R('LH6W=I;F9O('=I9'1H("1C=&5X=%T@+2 X*2!<
M"BT)"0D@(" O(%MF;VYT(&UE87-U<F4@)'1E>'1F;VYT("(P(EU]70HM"7!U
M=',@)&8@(G-E="!G96]M971R>2AC=&5X='<I("1W:60B"BT)<V5T('=I9"!;
M97AP<B![*%MW:6YF;R!W:61T:" D8V9L:7-T72 M(#$Q*2!<"BT)"0D@(" O
M(%MF;VYT(&UE87-U<F4@6R1C9FQI<W0@8V=E=" M9F]N=%T@(C B77U="BT)
M<'5T<R D9B B<V5T(&=E;VUE=')Y*&-F;&ES='<I("1W:60B"BL**R @(" @
M(" @<'5T<R D9B B<V5T(&=E;VUE=')Y*&UA:6XI(%MW:6YF;R!G96]M971R
M>2 N72(**PEP=71S("1F(")S970@9V5O;65T<GDH=&]P=VED=&@I(%MW:6YF
M;R!W:61T:" N=&9=(@HK"7!U=',@)&8@(G-E="!G96]M971R>2AT;W!H96EG
M:'0I(%MW:6YF;R!H96EG:'0@+G1F72(**PEP=71S("1F(")S970@9V5O;65T
M<GDH8V%N=BD@6V5X<'(@>UMW:6YF;R!W:61T:" D8V%N=ETM,'U=(@HK"7!U
M=',@)&8@(G-E="!G96]M971R>2AC86YV,BD@6V5X<'(@>UMW:6YF;R!W:61T
M:" D8V%N=C)=+3!]72(**PEP=71S("1F(")S970@9V5O;65T<GDH8V%N=C,I
M(%ME>'!R('M;=VEN9F\@=VED=&@@)&-A;G8S72TP?5TB"BL)<'5T<R D9B B
M<V5T(&=E;VUE=')Y*&)O='=I9'1H*2!;=VEN9F\@=VED=&@@+F)L969T72(*
M*PEP=71S("1F(")S970@9V5O;65T<GDH8F]T:&5I9VAT*2!;=VEN9F\@:&5I
M9VAT("YB;&5F=%TB"BL*( EP=71S("UN;VYE=VQI;F4@)&8@(G-E="!P97)M
M=FEE=W,@>R(*( EF;W(@>W-E="!V(#!]('LD=B \("1N97AT=FEE=VYU;7T@
M>VEN8W(@=GT@>PH@"2 @("!I9B![)'9I97=P97)M*"1V*7T@>PI 0" M-# T
M,RPQ,2 K-# V-RPQ,2! 0"!P<F]C(&%D9'1O:&ES=&]R>2![8VUD?2!["B @
M(" @?0H@(" @(&EN8W(@:&ES=&]R>6EN9&5X"B @(" @:68@>R1H:7-T;W)Y
M:6YD97@@/B Q?2!["BT)+F-T;W N=&]P+F)A<BYL969T8G5T(&-O;F8@+7-T
M871E(&YO<FUA; HK"2YT9BYB87(N;&5F=&)U="!C;VYF("US=&%T92!N;W)M
M86P*(" @("!](&5L<V4@>PHM"2YC=&]P+G1O<"YB87(N;&5F=&)U="!C;VYF
M("US=&%T92!D:7-A8FQE9 HK"2YT9BYB87(N;&5F=&)U="!C;VYF("US=&%T
M92!D:7-A8FQE9 H@(" @('T*+2 @(" N8W1O<"YT;W N8F%R+G)I9VAT8G5T
M(&-O;F8@+7-T871E(&1I<V%B;&5D"BL@(" @+G1F+F)A<BYR:6=H=&)U="!C
M;VYF("US=&%T92!D:7-A8FQE9 H@?0H@"B!P<F]C(&=O9&\@>V5L='T@>PI 
M0" M-# V-RPQ," K-# Y,2PQ,"! 0"!P<F]C(&=O8F%C:R![?2!["B @(" @
M:68@>R1H:7-T;W)Y:6YD97@@/B Q?2!["B ):6YC<B!H:7-T;W)Y:6YD97@@
M+3$*( EG;V1O(%ML:6YD97@@)&AI<W1O<GD@6V5X<'(@>R1H:7-T;W)Y:6YD
M97@@+2 Q?5U="BT)+F-T;W N=&]P+F)A<BYR:6=H=&)U="!C;VYF("US=&%T
M92!N;W)M86P**PDN=&8N8F%R+G)I9VAT8G5T(&-O;F8@+7-T871E(&YO<FUA
M; H@(" @('T*(" @("!I9B![)&AI<W1O<GEI;F1E>" \/2 Q?2!["BT)+F-T
M;W N=&]P+F)A<BYL969T8G5T(&-O;F8@+7-T871E(&1I<V%B;&5D"BL)+G1F
M+F)A<BYL969T8G5T(&-O;F8@+7-T871E(&1I<V%B;&5D"B @(" @?0H@?0H@
M"D! ("TT,#@Q+#$P("LT,3 U+#$P($! ('!R;V,@9V]F;W)W('M]('L*( ES
M970@8VUD(%ML:6YD97@@)&AI<W1O<GD@)&AI<W1O<GEI;F1E>%T*( EI;F-R
M(&AI<W1O<GEI;F1E> H@"6=O9&\@)&-M9 HM"2YC=&]P+G1O<"YB87(N;&5F
M=&)U="!C;VYF("US=&%T92!N;W)M86P**PDN=&8N8F%R+FQE9G1B=70@8V]N
M9B M<W1A=&4@;F]R;6%L"B @(" @?0H@(" @(&EF('LD:&ES=&]R>6EN9&5X
M(#X](%ML;&5N9W1H("1H:7-T;W)Y77T@>PHM"2YC=&]P+G1O<"YB87(N<FEG
M:'1B=70@8V]N9B M<W1A=&4@9&ES86)L960**PDN=&8N8F%R+G)I9VAT8G5T
M(&-O;F8@+7-T871E(&1I<V%B;&5D"B @(" @?0H@?0H@"D! ("TT-3DQ+#<@
M*S0V,34L-R! 0"!P<F]C('-E87)C:&UA<FMV:7-I8FQE('MD;V%L;'T@>PH@
M<')O8R!S8W)O;&QT97AT('MF,"!F,7T@>PH@(" @(&=L;V)A;"!S96%R8VAS
M=')I;F<*( HM(" @("YC=&]P+F-D970N;&5F="YS8B!S970@)&8P("1F,0HK
M(" @("YB;&5F="YS8B!S970@)&8P("1F,0H@(" @(&EF('LD<V5A<F-H<W1R
M:6YG(&YE('M]?2!["B )<V5A<F-H;6%R:W9I<VEB;&4@, H@(" @('T*+2T@
;"C$N-2XP+G)C,BXW-BYG-&9C,"UD:7)T>0H*
`
end

begin 666 0001-gitk-remove-trailing-whitespace-from-a-few-lines.patch
M1G)O;2 S9F,P93@S8C$X9#4R.&%C-65C96(U8V,U8C4T,#1F830W9F$V.6$U
M($UO;B!397 @,3<@,# Z,# Z,# @,C P,0I&<F]M.B!-87)K($QE=F5D86AL
M(#QM9&PQ,C- =F5R:7IO;BYN970^"D1A=&4Z(%1H=2P@,2!&96(@,C P-R P
M.#HT-#HT-B M,#4P, I3=6)J96-T.B!;4$%40TA=(&=I=&L@+2!R96UO=F4@
M=')A:6QI;F<@=VAI=&5S<&%C92!F<F]M(&$@9F5W(&QI;F5S+@H*4VEG;F5D
M+6]F9BUB>3H@36%R:R!,979E9&%H;" \;61L,3(S0'9E<FEZ;VXN;F5T/@HM
M+2T*(&=I=&L@?" @(" X("LK*RLM+2TM"B Q(&9I;&5S(&-H86YG960L(#0@
M:6YS97)T:6]N<R@K*2P@-"!D96QE=&EO;G,H+2D*"F1I9F8@+2UG:70@82]G
M:71K(&(O9VET:PII;F1E>" S,60P86%D+BXV-3 T,S5E(#$P,#<U-0HM+2T@
M82]G:71K"BLK*R!B+V=I=&L*0$ @+30R-RPW("LT,C<L-R! 0"!P<F]C(&UA
M:V5W:6YD;W<@>WT@>PH@(" @("YB87(N=FEE=R!A9&0@<V5P87)A=&]R"B @
M(" @+F)A<BYV:65W(&%D9"!R861I;V)U='1O;B M;&%B96P@(D%L;"!F:6QE
M<R(@+6-O;6UA;F0@>W-H;W=V:65W(#!](%P*( DM=F%R:6%B;&4@<V5L96-T
M961V:65W("UV86QU92 P"BT@(" @"BL*(" @("!M96YU("YB87(N:&5L< H@
M(" @("YB87(@861D(&-A<V-A9&4@+6QA8F5L(")(96QP(B M;65N=2 N8F%R
M+FAE;' *(" @(" N8F%R+FAE;' @861D(&-O;6UA;F0@+6QA8F5L(")!8F]U
M="!G:71K(B M8V]M;6%N9"!A8F]U= I 0" M,30P,BPW("LQ-# R+#<@0$ @
M<')O8R!N97=V:65W('MI<VAI9VAL:6=H='T@>PH@(" @('-E="!N97=V:65W
M;F%M92@D;F5X='9I97=N=6TI(")6:65W("1N97AT=FEE=VYU;2(*(" @("!S
M970@;F5W=FEE=W!E<FTH)&YE>'1V:65W;G5M*2 P"B @(" @<V5T(&YE=W9I
M97=A<F=S*"1N97AT=FEE=VYU;2D@6W-H96QL87)G;&ES=" D<F5V=')E96%R
M9W-="BT@(" @=FEE=V5D:71O<B D=&]P("1N97AT=FEE=VYU;2 B1VET:R!V
M:65W(&1E9FEN:71I;VXB( HK(" @('9I97=E9&ET;W(@)'1O<" D;F5X='9I
M97=N=6T@(D=I=&L@=FEE=R!D969I;FET:6]N(@H@?0H@"B!P<F]C(&5D:71V
M:65W('M]('L*0$ @+3,X.3<L-R K,S@Y-RPW($! ('!R;V,@<V5L96-T;&EN
M92![;"!I<VYE=WT@>PH@"7T*( DD8W1E>'0@:6YS97)T(&5N9" B7&XB"B @
M(" @?0HM( HK"B @(" @<V5T(&AE861E<G,@>WT*(" @("!S970@;VQD<R!;
M;&EN9&5X("1P87)E;G1L:7-T("1L70H@(" @(&EF('M;;&QE;F=T:" D;VQD
M<UT@/B Q?2!["D! ("TT,# V+#<@*S0P,#8L-R! 0"!P<F]C('-E;&YE>'1P
M86=E('MD:7)]('L*(" @(" @(" @<V5T(&P@6V5X<'(@)&YU;6-O;6UI=',@
M+2 Q70H@(" @('T*(" @("!U;FUA<FMM871C:&5S"BT@(" @<V5L96-T;&EN
M92 D;" Q(" @( HK(" @('-E;&5C=&QI;F4@)&P@,0H@?0H@"B!P<F]C('5N
M<V5L96-T;&EN92![?2!["BTM( HQ+C4N,"YR8S(N-S8N9S1F8S M9&ER='D*
!"@``
`
end

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01  8:03         ` Alex Riesen
@ 2007-02-01 14:03           ` Mark Levedahl
  2007-02-01 19:24           ` Shawn O. Pearce
  1 sibling, 0 replies; 23+ messages in thread
From: Mark Levedahl @ 2007-02-01 14:03 UTC (permalink / raw)
  To: git

"Alex Riesen" <raa.lkml@gmail.com> wrote in message news:81b0412b0702010003t7becddf3x8fe6b36b0d84599b@mail.gmail.com...
> On 2/1/07, Seth Falcon <sethfalcon@gmail.com> wrote:
>>
>> > I am not in X right now and won't be able to look at it myself
>> > tonight.  Could folks on MacOS comment on Mark's patch?
>>
>> I gave it a quick spin on OS X.  gitk loads with a different geometry
>> than it had before, but seems to work the same.  If this fixes things
>> elsewhere, it seems fine here.
>>
>
> FWIW, I confirm that. Much better. Mouse selection still does not
> work in patch pane, but broken layout was the most annoying.
> Thanks, Mark!

You are welcome.
We can deal with other annoyances later assuming the layout change gets accepted. (the patch is already big) 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01 13:56       ` Mark Levedahl
@ 2007-02-01 14:05         ` Johannes Schindelin
  2007-02-01 15:04           ` Mark Levedahl
  0 siblings, 1 reply; 23+ messages in thread
From: Johannes Schindelin @ 2007-02-01 14:05 UTC (permalink / raw)
  To: Mark Levedahl; +Cc: git

Hi,

On Thu, 1 Feb 2007, Mark Levedahl wrote:

> "Johannes Schindelin" <Johannes.Schindelin@gmx.de> wrote in message 
> news:Pine.LNX.4.63.0702011016430.22628@wbgn013.biozentrum.uni-wuerzburg.de...
> >
> > And then I find that you also fixed whitespace breakage, which does not
> > belong in this patch.
>
> My editor simply will not write out trailing whitespace so I do not 
> notice when such breakage is fixed.

Fair enough.

> In the attached, I split out the four whitespace fixes in a separate 
> patch.
> 
> Mark 
> 
> 
> begin 666 0002-Make-gitk-work-reasonably-well-on-Cygwin.patch
> [lots of uuencoded lines]

;-)

Thanks a lot. It's way easier to review now, except for the lines 
beginning with "M" ;-)

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01 14:05         ` Johannes Schindelin
@ 2007-02-01 15:04           ` Mark Levedahl
  2007-02-01 15:28             ` Christian MICHON
  2007-02-01 15:39             ` Johannes Sixt
  0 siblings, 2 replies; 23+ messages in thread
From: Mark Levedahl @ 2007-02-01 15:04 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

"Johannes Schindelin" <Johannes.Schindelin@gmx.de> wrote in message 
news:Pine.LNX.4.63.0702011503230.22628@wbgn013.biozentrum.uni-wuerzburg.de...

> Thanks a lot. It's way easier to review now, except for the lines
> beginning with "M" ;-)
>
> Ciao,
> Dscho
>

Maybe this works better?


[-- Attachment #2: 0002-Make-gitk-work-reasonably-well-on-Cygwin.patch --]
[-- Type: application/octet-stream, Size: 18190 bytes --]

>From 3c04250616f0deed881ce1690e8c1950b1643b07 Mon Sep 17 00:00:00 2001
From: Mark Levedahl <mdl123@verizon.net>
Date: Thu, 1 Feb 2007 08:46:38 -0500
Subject: [PATCH] Make gitk work reasonably well on Cygwin.

The gitk gui layout was completely broken on Cygwin. If gitk was started
without previous geometry in ~/.gitk, the user could drag the window sashes
to get a useable layout. However, if ~/.gitk existed, this was not possible
at all.

The fix was to rewrite makewindow, changing the toplevel containers and
the particular geometry information saved between sessions. Numerous bugs
in both the Cygwin and the Linux Tk versions make this a delicate
balancing act: the version here works in both but many subtle variants
are competely broken in one or the other environment.

Three user visible changes result:
1 - The viewer is fully functional under Cygwin.
2 - The search bar moves from the bottom to the top of the lower left
    pane. This was necessary to get around a layout problem on Cygwin.
3 - The window size and position is saved and restored between sessions.
    Again, this is necessary to get around a layout problem on Cygwin.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
---
 gitk |  276 ++++++++++++++++++++++++++++++++++++------------------------------
 1 files changed, 150 insertions(+), 126 deletions(-)

diff --git a/gitk b/gitk
index 650435e..8132812 100755
--- a/gitk
+++ b/gitk
@@ -435,56 +435,59 @@ proc makewindow {} {
     .bar.help configure -font $uifont
     . configure -menu .bar
 
-    if {![info exists geometry(canv1)]} {
-	set geometry(canv1) [expr {45 * $charspc}]
-	set geometry(canv2) [expr {30 * $charspc}]
-	set geometry(canv3) [expr {15 * $charspc}]
-	set geometry(canvh) [expr {25 * $linespc + 4}]
-	set geometry(ctextw) 80
-	set geometry(ctexth) 30
-	set geometry(cflistw) 30
-    }
+    # the gui has upper and lower half, parts of a paned window.
     panedwindow .ctop -orient vertical
-    if {[info exists geometry(width)]} {
-	.ctop conf -width $geometry(width) -height $geometry(height)
-	set texth [expr {$geometry(height) - $geometry(canvh) - 56}]
-	set geometry(ctexth) [expr {($texth - 8) /
-				    [font metrics $textfont -linespace]}]
-    }
-    frame .ctop.top
-    frame .ctop.top.bar
-    frame .ctop.top.lbar
-    pack .ctop.top.lbar -side bottom -fill x
-    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
-    pack .ctop.top.clist -side top -fill both -expand 1
-    .ctop add .ctop.top
-    set canv .ctop.top.clist.canv
-    canvas $canv -height $geometry(canvh) -width $geometry(canv1) \
+
+    # possibly use assumed geometry
+    if {![info exists geometry(topheight)]} {
+        set geometry(topheight) [expr {15 * $linespc}]
+        set geometry(topwidth) [expr {80 * $charspc}]
+        set geometry(botheight) [expr {15 * $linespc}]
+        set geometry(botwidth) [expr {50 * $charspc}]
+        set geometry(canv) [expr {40 * $charspc}]
+        set geometry(canv2) [expr {20 * $charspc}]
+        set geometry(canv3) [expr {20 * $charspc}]
+    }
+
+    # the upper half will have a paned window, a scroll bar to the right, and some stuff below
+    frame .tf -height $geometry(topheight) -width $geometry(topwidth)
+    frame .tf.histframe
+    panedwindow .tf.histframe.pwclist -orient horizontal -sashpad 0 -handlesize 4
+
+    # create three canvases
+    set cscroll .tf.histframe.csb
+    set canv .tf.histframe.pwclist.canv
+    canvas $canv -width $geometry(canv) \
 	-background $bgcolor -bd 0 \
 	-yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
-    .ctop.top.clist add $canv
-    set canv2 .ctop.top.clist.canv2
-    canvas $canv2 -height $geometry(canvh) -width $geometry(canv2) \
+    .tf.histframe.pwclist add $canv
+    set canv2 .tf.histframe.pwclist.canv2
+    canvas $canv2 -width $geometry(canv2) \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv2
-    set canv3 .ctop.top.clist.canv3
-    canvas $canv3 -height $geometry(canvh) -width $geometry(canv3) \
+    .tf.histframe.pwclist add $canv2
+    set canv3 .tf.histframe.pwclist.canv3
+    canvas $canv3 -width $geometry(canv3) \
 	-background $bgcolor -bd 0 -yscrollincr $linespc
-    .ctop.top.clist add $canv3
-    bind .ctop.top.clist <Configure> {resizeclistpanes %W %w}
+    .tf.histframe.pwclist add $canv3
+
+    # a scroll bar to rule them
+    scrollbar $cscroll -command {allcanvs yview} -highlightthickness 0
+    pack $cscroll -side right -fill y
+    bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w}
     lappend bglist $canv $canv2 $canv3
+    pack .tf.histframe.pwclist -fill both -expand 1 -side left
 
-    set sha1entry .ctop.top.bar.sha1
+    # we have two button bars at bottom of top frame. Bar 1
+    frame .tf.bar
+    frame .tf.lbar -height 15
+
+    set sha1entry .tf.bar.sha1
     set entries $sha1entry
-    set sha1but .ctop.top.bar.sha1label
+    set sha1but .tf.bar.sha1label
     button $sha1but -text "SHA1 ID: " -state disabled -relief flat \
 	-command gotocommit -width 8 -font $uifont
     $sha1but conf -disabledforeground [$sha1but cget -foreground]
-    pack .ctop.top.bar.sha1label -side left
+    pack .tf.bar.sha1label -side left
     entry $sha1entry -width 40 -font $textfont -textvariable sha1string
     trace add variable sha1string write sha1change
     pack $sha1entry -side left -pady 2
@@ -505,91 +508,105 @@ proc makewindow {} {
 	0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c,
 	0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01};
     }
-    button .ctop.top.bar.leftbut -image bm-left -command goback \
+    button .tf.bar.leftbut -image bm-left -command goback \
 	-state disabled -width 26
-    pack .ctop.top.bar.leftbut -side left -fill y
-    button .ctop.top.bar.rightbut -image bm-right -command goforw \
+    pack .tf.bar.leftbut -side left -fill y
+    button .tf.bar.rightbut -image bm-right -command goforw \
 	-state disabled -width 26
-    pack .ctop.top.bar.rightbut -side left -fill y
+    pack .tf.bar.rightbut -side left -fill y
 
-    button .ctop.top.bar.findbut -text "Find" -command dofind -font $uifont
-    pack .ctop.top.bar.findbut -side left
+    button .tf.bar.findbut -text "Find" -command dofind -font $uifont
+    pack .tf.bar.findbut -side left
     set findstring {}
-    set fstring .ctop.top.bar.findstring
+    set fstring .tf.bar.findstring
     lappend entries $fstring
     entry $fstring -width 30 -font $textfont -textvariable findstring
     trace add variable findstring write find_change
-    pack $fstring -side left -expand 1 -fill x
+    pack $fstring -side left -expand 1 -fill x -in .tf.bar
     set findtype Exact
-    set findtypemenu [tk_optionMenu .ctop.top.bar.findtype \
-			  findtype Exact IgnCase Regexp]
+    set findtypemenu [tk_optionMenu .tf.bar.findtype \
+		      findtype Exact IgnCase Regexp]
     trace add variable findtype write find_change
-    .ctop.top.bar.findtype configure -font $uifont
-    .ctop.top.bar.findtype.menu configure -font $uifont
+    .tf.bar.findtype configure -font $uifont
+    .tf.bar.findtype.menu configure -font $uifont
     set findloc "All fields"
-    tk_optionMenu .ctop.top.bar.findloc findloc "All fields" Headline \
+    tk_optionMenu .tf.bar.findloc findloc "All fields" Headline \
 	Comments Author Committer
     trace add variable findloc write find_change
-    .ctop.top.bar.findloc configure -font $uifont
-    .ctop.top.bar.findloc.menu configure -font $uifont
-    pack .ctop.top.bar.findloc -side right
-    pack .ctop.top.bar.findtype -side right
-
-    label .ctop.top.lbar.flabel -text "Highlight:  Commits " \
-	-font $uifont
-    pack .ctop.top.lbar.flabel -side left -fill y
+    .tf.bar.findloc configure -font $uifont
+    .tf.bar.findloc.menu configure -font $uifont
+    pack .tf.bar.findloc -side right
+    pack .tf.bar.findtype -side right
+
+    # build up the bottom bar of upper window
+    label .tf.lbar.flabel -text "Highlight:  Commits " \
+    -font $uifont
+    pack .tf.lbar.flabel -side left -fill y
     set gdttype "touching paths:"
-    set gm [tk_optionMenu .ctop.top.lbar.gdttype gdttype "touching paths:" \
-		"adding/removing string:"]
+    set gm [tk_optionMenu .tf.lbar.gdttype gdttype "touching paths:" \
+	"adding/removing string:"]
     trace add variable gdttype write hfiles_change
     $gm conf -font $uifont
-    .ctop.top.lbar.gdttype conf -font $uifont
-    pack .ctop.top.lbar.gdttype -side left -fill y
-    entry .ctop.top.lbar.fent -width 25 -font $textfont \
+    .tf.lbar.gdttype conf -font $uifont
+    pack .tf.lbar.gdttype -side left -fill y
+    entry .tf.lbar.fent -width 25 -font $textfont \
 	-textvariable highlight_files
     trace add variable highlight_files write hfiles_change
-    lappend entries .ctop.top.lbar.fent
-    pack .ctop.top.lbar.fent -side left -fill x -expand 1
-    label .ctop.top.lbar.vlabel -text " OR in view" -font $uifont
-    pack .ctop.top.lbar.vlabel -side left -fill y
+    lappend entries .tf.lbar.fent
+    pack .tf.lbar.fent -side left -fill x -expand 1
+    label .tf.lbar.vlabel -text " OR in view" -font $uifont
+    pack .tf.lbar.vlabel -side left -fill y
     global viewhlmenu selectedhlview
-    set viewhlmenu [tk_optionMenu .ctop.top.lbar.vhl selectedhlview None]
+    set viewhlmenu [tk_optionMenu .tf.lbar.vhl selectedhlview None]
     $viewhlmenu entryconf None -command delvhighlight
     $viewhlmenu conf -font $uifont
-    .ctop.top.lbar.vhl conf -font $uifont
-    pack .ctop.top.lbar.vhl -side left -fill y
-    label .ctop.top.lbar.rlabel -text " OR " -font $uifont
-    pack .ctop.top.lbar.rlabel -side left -fill y
+    .tf.lbar.vhl conf -font $uifont
+    pack .tf.lbar.vhl -side left -fill y
+    label .tf.lbar.rlabel -text " OR " -font $uifont
+    pack .tf.lbar.rlabel -side left -fill y
     global highlight_related
-    set m [tk_optionMenu .ctop.top.lbar.relm highlight_related None \
-	       "Descendent" "Not descendent" "Ancestor" "Not ancestor"]
+    set m [tk_optionMenu .tf.lbar.relm highlight_related None \
+	"Descendent" "Not descendent" "Ancestor" "Not ancestor"]
     $m conf -font $uifont
-    .ctop.top.lbar.relm conf -font $uifont
+    .tf.lbar.relm conf -font $uifont
     trace add variable highlight_related write vrel_change
-    pack .ctop.top.lbar.relm -side left -fill y
-
-    panedwindow .ctop.cdet -orient horizontal
-    .ctop add .ctop.cdet
-    frame .ctop.cdet.left
-    frame .ctop.cdet.left.bot
-    pack .ctop.cdet.left.bot -side bottom -fill x
-    button .ctop.cdet.left.bot.search -text "Search" -command dosearch \
+    pack .tf.lbar.relm -side left -fill y
+
+    # Finish putting the upper half of the viewer together
+    pack .tf.lbar -in .tf -side bottom -fill x
+    pack .tf.bar -in .tf -side bottom -fill x
+    pack .tf.histframe -fill both -side top -expand 1
+    .ctop add .tf
+
+    # now build up the bottom
+    panedwindow .pwbottom -orient horizontal
+
+    # lower left, a text box over search bar, scroll bar to the right
+    # if we know window height, then that will set the lower text height, otherwise
+    # we set lower text height which will drive window height
+    if {[info exists geometry(main)]} {
+        frame .bleft -width $geometry(botwidth)
+    } else {
+        frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
+    }
+    frame .bleft.top
+
+    button .bleft.top.search -text "Search" -command dosearch \
 	-font $uifont
-    pack .ctop.cdet.left.bot.search -side left -padx 5
-    set sstring .ctop.cdet.left.bot.sstring
+    pack .bleft.top.search -side left -padx 5
+    set sstring .bleft.top.sstring
     entry $sstring -width 20 -font $textfont -textvariable searchstring
     lappend entries $sstring
     trace add variable searchstring write incrsearch
     pack $sstring -side left -expand 1 -fill x
-    set ctext .ctop.cdet.left.ctext
+    set ctext .bleft.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
 	-state disabled -font $textfont \
-	-width $geometry(ctextw) -height $geometry(ctexth) \
 	-yscrollcommand scrolltext -wrap none
-    scrollbar .ctop.cdet.left.sb -command "$ctext yview"
-    pack .ctop.cdet.left.sb -side right -fill y
+    scrollbar .bleft.sb -command "$ctext yview"
+    pack .bleft.top -side top -fill x
+    pack .bleft.sb -side right -fill y
     pack $ctext -side left -fill both -expand 1
-    .ctop.cdet add .ctop.cdet.left
     lappend bglist $ctext
     lappend fglist $ctext
 
@@ -620,36 +637,45 @@ proc makewindow {} {
     $ctext tag conf msep -font [concat $textfont bold]
     $ctext tag conf found -back yellow
 
-    frame .ctop.cdet.right
-    frame .ctop.cdet.right.mode
-    radiobutton .ctop.cdet.right.mode.patch -text "Patch" \
+    .pwbottom add .bleft
+
+    # lower right
+    frame .bright
+    frame .bright.mode
+    radiobutton .bright.mode.patch -text "Patch" \
 	-command reselectline -variable cmitmode -value "patch"
-    radiobutton .ctop.cdet.right.mode.tree -text "Tree" \
+    radiobutton .bright.mode.tree -text "Tree" \
 	-command reselectline -variable cmitmode -value "tree"
-    grid .ctop.cdet.right.mode.patch .ctop.cdet.right.mode.tree -sticky ew
-    pack .ctop.cdet.right.mode -side top -fill x
-    set cflist .ctop.cdet.right.cfiles
+    grid .bright.mode.patch .bright.mode.tree -sticky ew
+    pack .bright.mode -side top -fill x
+    set cflist .bright.cfiles
     set indent [font measure $mainfont "nn"]
-    text $cflist -width $geometry(cflistw) \
+    text $cflist \
 	-background $bgcolor -foreground $fgcolor \
 	-font $mainfont \
 	-tabs [list $indent [expr {2 * $indent}]] \
-	-yscrollcommand ".ctop.cdet.right.sb set" \
+	-yscrollcommand ".bright.sb set" \
 	-cursor [. cget -cursor] \
 	-spacing1 1 -spacing3 1
     lappend bglist $cflist
     lappend fglist $cflist
-    scrollbar .ctop.cdet.right.sb -command "$cflist yview"
-    pack .ctop.cdet.right.sb -side right -fill y
+    scrollbar .bright.sb -command "$cflist yview"
+    pack .bright.sb -side right -fill y
     pack $cflist -side left -fill both -expand 1
     $cflist tag configure highlight \
 	-background [$cflist cget -selectbackground]
     $cflist tag configure bold -font [concat $mainfont bold]
-    .ctop.cdet add .ctop.cdet.right
-    bind .ctop.cdet <Configure> {resizecdetpanes %W %w}
 
-    pack .ctop -side top -fill both -expand 1
+    .pwbottom add .bright
+    .ctop add .pwbottom
 
+    # restore window position if known
+    if {[info exists geometry(main)]} {
+        wm geometry . "$geometry(main)"
+    }
+
+    bind .pwbottom <Configure> {resizecdetpanes %W %w}
+    pack .ctop -fill both -expand 1
     bindall <1> {selcanvline %W %x %y}
     #bindall <B1-Motion> {selcanvline %W %x %y}
     bindall <ButtonRelease-4> "allcanvs yview scroll -5 units"
@@ -802,18 +828,16 @@ proc savestuff {w} {
 	puts $f [list set fgcolor $fgcolor]
 	puts $f [list set colors $colors]
 	puts $f [list set diffcolors $diffcolors]
-	puts $f "set geometry(width) [winfo width .ctop]"
-	puts $f "set geometry(height) [winfo height .ctop]"
-	puts $f "set geometry(canv1) [expr {[winfo width $canv]-2}]"
-	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-2}]"
-	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-2}]"
-	puts $f "set geometry(canvh) [expr {[winfo height $canv]-2}]"
-	set wid [expr {([winfo width $ctext] - 8) \
-			   / [font measure $textfont "0"]}]
-	puts $f "set geometry(ctextw) $wid"
-	set wid [expr {([winfo width $cflist] - 11) \
-			   / [font measure [$cflist cget -font] "0"]}]
-	puts $f "set geometry(cflistw) $wid"
+
+        puts $f "set geometry(main) [winfo geometry .]"
+	puts $f "set geometry(topwidth) [winfo width .tf]"
+	puts $f "set geometry(topheight) [winfo height .tf]"
+	puts $f "set geometry(canv) [expr {[winfo width $canv]-0}]"
+	puts $f "set geometry(canv2) [expr {[winfo width $canv2]-0}]"
+	puts $f "set geometry(canv3) [expr {[winfo width $canv3]-0}]"
+	puts $f "set geometry(botwidth) [winfo width .bleft]"
+	puts $f "set geometry(botheight) [winfo height .bleft]"
+
 	puts -nonewline $f "set permviews {"
 	for {set v 0} {$v < $nextviewnum} {incr v} {
 	    if {$viewperm($v)} {
@@ -4043,11 +4067,11 @@ proc addtohistory {cmd} {
     }
     incr historyindex
     if {$historyindex > 1} {
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     } else {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
-    .ctop.top.bar.rightbut conf -state disabled
+    .tf.bar.rightbut conf -state disabled
 }
 
 proc godo {elt} {
@@ -4067,10 +4091,10 @@ proc goback {} {
     if {$historyindex > 1} {
 	incr historyindex -1
 	godo [lindex $history [expr {$historyindex - 1}]]
-	.ctop.top.bar.rightbut conf -state normal
+	.tf.bar.rightbut conf -state normal
     }
     if {$historyindex <= 1} {
-	.ctop.top.bar.leftbut conf -state disabled
+	.tf.bar.leftbut conf -state disabled
     }
 }
 
@@ -4081,10 +4105,10 @@ proc goforw {} {
 	set cmd [lindex $history $historyindex]
 	incr historyindex
 	godo $cmd
-	.ctop.top.bar.leftbut conf -state normal
+	.tf.bar.leftbut conf -state normal
     }
     if {$historyindex >= [llength $history]} {
-	.ctop.top.bar.rightbut conf -state disabled
+	.tf.bar.rightbut conf -state disabled
     }
 }
 
@@ -4591,7 +4615,7 @@ proc searchmarkvisible {doall} {
 proc scrolltext {f0 f1} {
     global searchstring
 
-    .ctop.cdet.left.sb set $f0 $f1
+    .bleft.sb set $f0 $f1
     if {$searchstring ne {}} {
 	searchmarkvisible 0
     }
-- 
1.5.0.rc2.76.g4fc0-dirty


[-- Attachment #3: 0001-gitk-remove-trailing-whitespace-from-a-few-lines.patch --]
[-- Type: application/octet-stream, Size: 1540 bytes --]

>From 3fc0e83b18d528ac5eceb5cc5b5404fa47fa69a5 Mon Sep 17 00:00:00 2001
From: Mark Levedahl <mdl123@verizon.net>
Date: Thu, 1 Feb 2007 08:44:46 -0500
Subject: [PATCH] gitk - remove trailing whitespace from a few lines.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
---
 gitk |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gitk b/gitk
index 31d0aad..650435e 100755
--- a/gitk
+++ b/gitk
@@ -427,7 +427,7 @@ proc makewindow {} {
     .bar.view add separator
     .bar.view add radiobutton -label "All files" -command {showview 0} \
 	-variable selectedview -value 0
-    
+
     menu .bar.help
     .bar add cascade -label "Help" -menu .bar.help
     .bar.help add command -label "About gitk" -command about
@@ -1402,7 +1402,7 @@ proc newview {ishighlight} {
     set newviewname($nextviewnum) "View $nextviewnum"
     set newviewperm($nextviewnum) 0
     set newviewargs($nextviewnum) [shellarglist $revtreeargs]
-    vieweditor $top $nextviewnum "Gitk view definition" 
+    vieweditor $top $nextviewnum "Gitk view definition"
 }
 
 proc editview {} {
@@ -3897,7 +3897,7 @@ proc selectline {l isnew} {
 	}
 	$ctext insert end "\n"
     }
- 
+
     set headers {}
     set olds [lindex $parentlist $l]
     if {[llength $olds] > 1} {
@@ -4006,7 +4006,7 @@ proc selnextpage {dir} {
         set l [expr $numcommits - 1]
     }
     unmarkmatches
-    selectline $l 1    
+    selectline $l 1
 }
 
 proc unselectline {} {
-- 
1.5.0.rc2.76.g4fc0-dirty


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01 15:04           ` Mark Levedahl
@ 2007-02-01 15:28             ` Christian MICHON
  2007-02-01 15:39             ` Johannes Sixt
  1 sibling, 0 replies; 23+ messages in thread
From: Christian MICHON @ 2007-02-01 15:28 UTC (permalink / raw)
  To: Mark Levedahl; +Cc: git

On 2/1/07, Mark Levedahl <mdl123@verizon.net> wrote:
> Maybe this works better?
>

yes. thanks: it helps on msys/mingw.

-- 
Christian

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01 15:04           ` Mark Levedahl
  2007-02-01 15:28             ` Christian MICHON
@ 2007-02-01 15:39             ` Johannes Sixt
  2007-02-01 16:00               ` Johannes Schindelin
  1 sibling, 1 reply; 23+ messages in thread
From: Johannes Sixt @ 2007-02-01 15:39 UTC (permalink / raw)
  To: git

Mark Levedahl wrote:
> 
> "Johannes Schindelin" <Johannes.Schindelin@gmx.de> wrote in message
> news:Pine.LNX.4.63.0702011503230.22628@wbgn013.biozentrum.uni-wuerzburg.de...
> 
> > Thanks a lot. It's way easier to review now, except for the lines
> > beginning with "M" ;-)
> >
> > Ciao,
> > Dscho
> >
> 
> Maybe this works better?

Isn't this the same patch that Mike Nefari posted yesterday?

-- Hannes

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01 15:39             ` Johannes Sixt
@ 2007-02-01 16:00               ` Johannes Schindelin
  2007-02-01 17:33                 ` Mark Levedahl
  0 siblings, 1 reply; 23+ messages in thread
From: Johannes Schindelin @ 2007-02-01 16:00 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git

Hi,

On Thu, 1 Feb 2007, Johannes Sixt wrote:

> Isn't this the same patch that Mike Nefari posted yesterday?

Judging by the email address, Mike Nefari and Mark Levedahl are one and 
the same.

BTW with the short patch _I_ sent, MinGW gitk works quite well, too. But 
then, I am not really interested in discussion about gitk, I already 
wasted to many cycles arguing with Paulus that he should accept my patch.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01 16:00               ` Johannes Schindelin
@ 2007-02-01 17:33                 ` Mark Levedahl
  0 siblings, 0 replies; 23+ messages in thread
From: Mark Levedahl @ 2007-02-01 17:33 UTC (permalink / raw)
  To: git

"Johannes Schindelin" <Johannes.Schindelin@gmx.de> wrote in message 
news:Pine.LNX.4.63.0702011659210.22628@wbgn013.biozentrum.uni-wuerzburg.de...
> Hi,
>
> On Thu, 1 Feb 2007, Johannes Sixt wrote:
>
>> Isn't this the same patch that Mike Nefari posted yesterday?
>
> Judging by the email address, Mike Nefari and Mark Levedahl are one and
> the same.

I have no idea how the name "Mike Nefari" got on my hotmail account, but this patch is from me. I apologize for all of the email 
system related confusion.

Mark Levedahl 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] Make gitk work reasonably well on Cygwin.
  2007-02-01  8:03         ` Alex Riesen
  2007-02-01 14:03           ` Mark Levedahl
@ 2007-02-01 19:24           ` Shawn O. Pearce
  1 sibling, 0 replies; 23+ messages in thread
From: Shawn O. Pearce @ 2007-02-01 19:24 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Seth Falcon, Junio C Hamano, git, Mark Levedahl

Alex Riesen <raa.lkml@gmail.com> wrote:
> On 2/1/07, Seth Falcon <sethfalcon@gmail.com> wrote:
> >
> >> I am not in X right now and won't be able to look at it myself
> >> tonight.  Could folks on MacOS comment on Mark's patch?
> >
> >I gave it a quick spin on OS X.  gitk loads with a different geometry
> >than it had before, but seems to work the same.  If this fixes things
> >elsewhere, it seems fine here.
> >
> 
> FWIW, I confirm that. Much better. Mouse selection still does not
> work in patch pane, but broken layout was the most annoying.

The trick to getting mouse selection to work on Mac OS X on a
disabled text field (which is what that patch pane is):

	bind $damn_text_widget <Button-1> [list focus $damn_text_widget]

Apparently the disabled text widgets on Mac OS X don't receive
focus unless its forced by the application.  :-(

This trick doesn't harm a Tk application running on Windows, its
safe to just always setup the binding.  I'm using it in git-gui
for the diff pane.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2007-02-01 19:24 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31 14:50 [PATCH] Make gitk work reasonably well on Cygwin Mike Nefari
2007-01-31 15:17 ` Johannes Schindelin
2007-01-31 16:00   ` Mark Levedahl
2007-01-31 16:33   ` Johannes Sixt
2007-01-31 16:44     ` Johannes Schindelin
2007-02-01  1:41   ` Mark Levedahl
2007-02-01  3:22     ` Junio C Hamano
2007-02-01  5:24       ` Seth Falcon
2007-02-01  8:03         ` Alex Riesen
2007-02-01 14:03           ` Mark Levedahl
2007-02-01 19:24           ` Shawn O. Pearce
2007-02-01  9:20     ` Johannes Schindelin
2007-02-01 13:56       ` Mark Levedahl
2007-02-01 14:05         ` Johannes Schindelin
2007-02-01 15:04           ` Mark Levedahl
2007-02-01 15:28             ` Christian MICHON
2007-02-01 15:39             ` Johannes Sixt
2007-02-01 16:00               ` Johannes Schindelin
2007-02-01 17:33                 ` Mark Levedahl
2007-02-01  2:09   ` Mark Levedahl
2007-01-31 16:28 ` Johannes Sixt
2007-01-31 16:36 ` Alex Riesen
2007-01-31 16:39   ` Mark Levedahl

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.