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}}} {
2052
2052
}
2053
2053
2054
2054
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
+
2055
2060
destroy .
2056
2061
}
2057
2062
Original file line number Diff line number Diff line change @@ -1245,6 +1245,18 @@ method _open_tooltip {cur_w} {
1245
1245
1246
1246
$tooltip_t conf -state disabled
1247
1247
_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
+ }
1248
1260
}
1249
1261
1250
1262
method _position_tooltip {} {
@@ -1268,7 +1280,9 @@ method _position_tooltip {} {
1268
1280
append g $pos_y
1269
1281
1270
1282
wm geometry $tooltip_wm $g
1271
- raise $tooltip_wm
1283
+ if {![is_MacOSX]} {
1284
+ raise $tooltip_wm
1285
+ }
1272
1286
}
1273
1287
1274
1288
method _hide_tooltip {} {
Original file line number Diff line number Diff line change @@ -89,27 +89,26 @@ proc do_fsck_objects {} {
89
89
}
90
90
91
91
proc hint_gc {} {
92
- set object_limit 8
92
+ set ndirs 1
93
+ set limit 8
93
94
if {[is_Windows]} {
94
- set object_limit 1
95
+ set ndirs 4
96
+ set limit 1
95
97
}
96
98
97
- set objects_current [llength [glob \
98
- -directory [gitdir objects 42] \
99
+ set count [llength [glob \
99
100
-nocomplain \
100
- -tails \
101
101
-- \
102
- * ]]
102
+ [gitdir objects 4 \[ 0-[ expr { $ndirs -1}] \] /*] ]]
103
103
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 }]
107
106
if {[ask_popup \
108
107
[mc " This repository currently has approximately %i loose objects.
109
108
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.
111
110
112
- Compress the database now?" $objects_current $object_limit ]] eq yes} {
111
+ Compress the database now?" $objects_current ]] eq yes} {
113
112
do_gc
114
113
}
115
114
}
Original file line number Diff line number Diff line change @@ -250,6 +250,8 @@ method _write_url {args} { set urltype url }
250
250
method _write_check_head {args} { set checktype head }
251
251
252
252
method _write_head_list {args} {
253
+ global current_branch
254
+
253
255
$head_m delete 0 end
254
256
foreach abr $head_list {
255
257
$head_m insert end radiobutton \
@@ -258,7 +260,11 @@ method _write_head_list {args} {
258
260
-variable @check_head
259
261
}
260
262
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
+ }
262
268
}
263
269
}
264
270
You can’t perform that action at this time.
0 commit comments