File tree Expand file tree Collapse file tree 4 files changed +37
-13
lines changed
Expand file tree Collapse file tree 4 files changed +37
-13
lines changed Original file line number Diff line number Diff line change @@ -2052,6 +2052,11 @@ proc do_quit {{rc {1}}} {
20522052 }
20532053
20542054 set ret_code $rc
2055+
2056+ # Briefly enable send again, working around Tk bug
2057+ # http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997
2058+ tk appname [ appname]
2059+
20552060 destroy .
20562061}
20572062
Original file line number Diff line number Diff line change @@ -1245,6 +1245,18 @@ method _open_tooltip {cur_w} {
12451245
12461246 $tooltip_t conf -state disabled
12471247 _position_tooltip $this
1248+
1249+ # On MacOS raising a window causes it to acquire focus.
1250+ # Tk 8.5 on MacOS seems to properly support wm transient,
1251+ # so we can safely counter the effect there.
1252+ if {$::have_tk85 && [is_MacOSX]} {
1253+ update
1254+ if {$w eq {}} {
1255+ raise .
1256+ } else {
1257+ raise $w
1258+ }
1259+ }
12481260}
12491261
12501262method _position_tooltip {} {
@@ -1268,7 +1280,9 @@ method _position_tooltip {} {
12681280 append g $pos_y
12691281
12701282 wm geometry $tooltip_wm $g
1271- raise $tooltip_wm
1283+ if {![is_MacOSX]} {
1284+ raise $tooltip_wm
1285+ }
12721286}
12731287
12741288method _hide_tooltip {} {
Original file line number Diff line number Diff line change @@ -89,27 +89,26 @@ proc do_fsck_objects {} {
8989}
9090
9191proc hint_gc {} {
92- set object_limit 8
92+ set ndirs 1
93+ set limit 8
9394 if {[is_Windows]} {
94- set object_limit 1
95+ set ndirs 4
96+ set limit 1
9597 }
9698
97- set objects_current [llength [glob \
98- -directory [gitdir objects 42] \
99+ set count [llength [glob \
99100 -nocomplain \
100- -tails \
101101 -- \
102- * ]]
102+ [gitdir objects 4 \[ 0-[ expr { $ndirs -1}] \] /*] ]]
103103
104- if {$objects_current >= $object_limit } {
105- set objects_current [expr {$objects_current * 250}]
106- set object_limit [expr {$object_limit * 250}]
104+ if {$count >= $limit * $ndirs } {
105+ set objects_current [expr {$count * 256/$ndirs }]
107106 if {[ask_popup \
108107 [mc " This repository currently has approximately %i loose objects.
109108
110- To maintain optimal performance it is strongly recommended that you compress the database when more than %i loose objects exist .
109+ To maintain optimal performance it is strongly recommended that you compress the database.
111110
112- Compress the database now?" $objects_current $object_limit ]] eq yes} {
111+ Compress the database now?" $objects_current ]] eq yes} {
113112 do_gc
114113 }
115114 }
Original file line number Diff line number Diff line change @@ -250,6 +250,8 @@ method _write_url {args} { set urltype url }
250250method _write_check_head {args} { set checktype head }
251251
252252method _write_head_list {args} {
253+ global current_branch
254+
253255 $head_m delete 0 end
254256 foreach abr $head_list {
255257 $head_m insert end radiobutton \
@@ -258,7 +260,11 @@ method _write_head_list {args} {
258260 -variable @check_head
259261 }
260262 if {[lsearch -exact -sorted $head_list $check_head ] < 0} {
261- set check_head {}
263+ if {[lsearch -exact -sorted $head_list $current_branch ] < 0} {
264+ set check_head {}
265+ } else {
266+ set check_head $current_branch
267+ }
262268 }
263269}
264270
You can’t perform that action at this time.
0 commit comments