@matheusbsbs / matheus-bagliano / commits / 6f6eed286f
Fork 0

git-gui: Fixed UI layout problems on Windows.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Nov 6, 2006 at 18:22 UTC 6f6eed286f6a056fab1f887871ba5287f609e1f1
1 file changed +12 -7
git-gui
+12 -7
@@ -229,7 +229,7 @@ proc show_diff {path} {
229 return
230 }
231
232 - fconfigure $fd -blocking 0 -translation binary
232 + fconfigure $fd -blocking 0 -translation auto
233 fileevent $fd readable [list read_diff $fd]
234 }
235
@@ -237,6 +237,10 @@ proc read_diff {fd} {
237 global ui_diff ui_status_value diff_3way diff_active
238
239 while {[gets $fd line] >= 0} {
240 + if {[string match {diff --git *} $line]} continue
241 + if {[string match {diff --combined *} $line]} continue
242 + if {[string match {--- *} $line]} continue
243 + if {[string match {+++ *} $line]} continue
244 if {[string match index* $line]} {
245 if {[string first , $line] >= 0} {
246 set diff_3way 1
@@ -584,8 +588,9 @@ proc show_msg {w top msg} {
588 ## ui commands
589
590 proc do_gitk {} {
587 - global tcl_platform
591 + global tcl_platform ui_status_value
592
593 + set ui_status_value "Please wait... Starting gitk..."
594 if {$tcl_platform(platform) == "windows"} {
595 exec sh -c gitk &
596 } else {
@@ -705,7 +710,7 @@ menu .mbar -tearoff 0
710
711 # -- Project Menu
712 menu .mbar.project
708 -.mbar.project add command -label Visulize \
713 +.mbar.project add command -label Visualize \
714 -command do_gitk \
715 -font $mainfont
716 .mbar.project add command -label Quit \
@@ -736,7 +741,7 @@ menu .mbar.pull
741 # -- Main Window Layout
742 panedwindow .vpane -orient vertical
743 panedwindow .vpane.files -orient horizontal
739 -.vpane add .vpane.files -sticky nsew
744 +.vpane add .vpane.files -sticky nsew -height 100 -width 400
745 pack .vpane -anchor n -side top -fill both -expand 1
746
747 # -- Index File List
@@ -781,7 +786,7 @@ $ui_other tag conf in_diff -font [concat $mainfont bold]
786 # -- Diff Header
787 set ui_fname_value {}
788 set ui_fstatus_value {}
784 -frame .vpane.diff -height 50 -width 400
789 +frame .vpane.diff -height 200 -width 400
790 frame .vpane.diff.header
791 label .vpane.diff.header.l1 -text {File:} -font $mainfont
792 label .vpane.diff.header.l2 -textvariable ui_fname_value \
@@ -803,7 +808,7 @@ pack .vpane.diff.header.l3 -side right
808 frame .vpane.diff.body
809 set ui_diff .vpane.diff.body.t
810 text $ui_diff -background white -borderwidth 0 \
806 - -width 80 -height 15 \
811 + -width 80 -height 15 -wrap none \
812 -font $difffont \
813 -xscrollcommand {.vpane.diff.body.sbx set} \
814 -yscrollcommand {.vpane.diff.body.sby set} \
@@ -828,7 +833,7 @@ $ui_diff tag conf dni -foreground "#a000a0"
833 $ui_diff tag conf bold -font [concat $difffont bold]
834
835 # -- Commit Area
831 -frame .vpane.commarea -height 50
836 +frame .vpane.commarea -height 150
837 .vpane add .vpane.commarea -stick nsew
838
839 # -- Commit Area Buttons