diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-12-09 15:38:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-12-09 15:38:51 -0800 |
commit | 529f8c6ea6c13d85178d4ed10ed60ed8fd6f6c19 (patch) | |
tree | 4d4f9f8a8de0c0a3bc618873fc91d399dd1a712d | |
parent | 47344eee9b980a7cf2a08d040ff3dd38c6cd82ec (diff) | |
parent | 60204ddb99187dd329000864a618e57742372d74 (diff) | |
download | git-529f8c6ea6c13d85178d4ed10ed60ed8fd6f6c19.tar.gz git-529f8c6ea6c13d85178d4ed10ed60ed8fd6f6c19.tar.xz |
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
git-gui: suppress RenderBadPicture X error caused by Tk bug
git-gui: Increase blame viewer usability on MacOS.
git-gui: search 4 directories to improve statistic of gc hint
git gui: make current branch default in "remote delete branch" merge check
-rwxr-xr-x | git-gui/git-gui.sh | 5 | ||||
-rw-r--r-- | git-gui/lib/blame.tcl | 16 | ||||
-rw-r--r-- | git-gui/lib/database.tcl | 21 | ||||
-rw-r--r-- | git-gui/lib/remote_branch_delete.tcl | 8 |
4 files changed, 37 insertions, 13 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index 037a1f2c2..718277a65 100755 --- a/git-gui/git-gui.sh +++ b/git-gui/git-gui.sh @@ -2052,6 +2052,11 @@ proc do_quit {{rc {1}}} { } set ret_code $rc + + # Briefly enable send again, working around Tk bug + # http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997 + tk appname [appname] + destroy . } diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl index 1f3b08f9e..8525b79aa 100644 --- a/git-gui/lib/blame.tcl +++ b/git-gui/lib/blame.tcl @@ -1245,6 +1245,18 @@ method _open_tooltip {cur_w} { $tooltip_t conf -state disabled _position_tooltip $this + + # On MacOS raising a window causes it to acquire focus. + # Tk 8.5 on MacOS seems to properly support wm transient, + # so we can safely counter the effect there. + if {$::have_tk85 && [is_MacOSX]} { + update + if {$w eq {}} { + raise . + } else { + raise $w + } + } } method _position_tooltip {} { @@ -1268,7 +1280,9 @@ method _position_tooltip {} { append g $pos_y wm geometry $tooltip_wm $g - raise $tooltip_wm + if {![is_MacOSX]} { + raise $tooltip_wm + } } method _hide_tooltip {} { diff --git a/git-gui/lib/database.tcl b/git-gui/lib/database.tcl index a18ac8b43..d4e0bed0b 100644 --- a/git-gui/lib/database.tcl +++ b/git-gui/lib/database.tcl @@ -89,27 +89,26 @@ proc do_fsck_objects {} { } proc hint_gc {} { - set object_limit 8 + set ndirs 1 + set limit 8 if {[is_Windows]} { - set object_limit 1 + set ndirs 4 + set limit 1 } - set objects_current [llength [glob \ - -directory [gitdir objects 42] \ + set count [llength [glob \ -nocomplain \ - -tails \ -- \ - *]] + [gitdir objects 4\[0-[expr {$ndirs-1}]\]/*]]] - if {$objects_current >= $object_limit} { - set objects_current [expr {$objects_current * 250}] - set object_limit [expr {$object_limit * 250}] + if {$count >= $limit * $ndirs} { + set objects_current [expr {$count * 256/$ndirs}] if {[ask_popup \ [mc "This repository currently has approximately %i loose objects. -To maintain optimal performance it is strongly recommended that you compress the database when more than %i loose objects exist. +To maintain optimal performance it is strongly recommended that you compress the database. -Compress the database now?" $objects_current $object_limit]] eq yes} { +Compress the database now?" $objects_current]] eq yes} { do_gc } } diff --git a/git-gui/lib/remote_branch_delete.tcl b/git-gui/lib/remote_branch_delete.tcl index 31e094748..241642062 100644 --- a/git-gui/lib/remote_branch_delete.tcl +++ b/git-gui/lib/remote_branch_delete.tcl @@ -250,6 +250,8 @@ method _write_url {args} { set urltype url } method _write_check_head {args} { set checktype head } method _write_head_list {args} { + global current_branch + $head_m delete 0 end foreach abr $head_list { $head_m insert end radiobutton \ @@ -258,7 +260,11 @@ method _write_head_list {args} { -variable @check_head } if {[lsearch -exact -sorted $head_list $check_head] < 0} { - set check_head {} + if {[lsearch -exact -sorted $head_list $current_branch] < 0} { + set check_head {} + } else { + set check_head $current_branch + } } } |