git-gui: remove unreachable Tk 8.4 code
git-gui has remnant code to allow some drawing with Tk 8.4 predating the addition of themed widgets. As git-gui requires Tk >= 8.6, this code can never trigger. Remove it. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Mark Levedahl committed
Feb 16, 2024 at 18:24 UTC
4e3369f0f6125ad58986170b92530e9eff9fbc97
4 files changed
+21
-38
git-gui.sh
+11
-23
@@ -1268,8 +1268,6 @@ citool {
1268
##
1269
## execution environment
1270
1271
-set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
1272
-
1271
# Suggest our implementation of askpass, if none is set
1272
if {![info exists env(SSH_ASKPASS)]} {
1273
set env(SSH_ASKPASS) [gitexec git-gui--askpass]
@@ -3363,28 +3361,18 @@ unset i
3361
3362
# -- Diff and Commit Area
3363
#
3366
-if {$have_tk85} {
3367
- ${NS}::panedwindow .vpane.lower -orient vertical
3368
- ${NS}::frame .vpane.lower.commarea
3369
- ${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500
3370
- .vpane.lower add .vpane.lower.diff
3371
- .vpane.lower add .vpane.lower.commarea
3372
- .vpane add .vpane.lower
3373
- if {$use_ttk} {
3374
- .vpane.lower pane .vpane.lower.diff -weight 1
3375
- .vpane.lower pane .vpane.lower.commarea -weight 0
3376
- } else {
3377
- .vpane.lower paneconfigure .vpane.lower.diff -stretch always
3378
- .vpane.lower paneconfigure .vpane.lower.commarea -stretch never
3379
- }
3364
+${NS}::panedwindow .vpane.lower -orient vertical
3365
+${NS}::frame .vpane.lower.commarea
3366
+${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500
3367
+.vpane.lower add .vpane.lower.diff
3368
+.vpane.lower add .vpane.lower.commarea
3369
+.vpane add .vpane.lower
3370
+if {$use_ttk} {
3371
+ .vpane.lower pane .vpane.lower.diff -weight 1
3372
+ .vpane.lower pane .vpane.lower.commarea -weight 0
3373
} else {
3381
- frame .vpane.lower -height 300 -width 400
3382
- frame .vpane.lower.commarea
3383
- frame .vpane.lower.diff -relief sunken -borderwidth 1
3384
- pack .vpane.lower.diff -fill both -expand 1
3385
- pack .vpane.lower.commarea -side bottom -fill x
3386
- .vpane add .vpane.lower
3387
- .vpane paneconfigure .vpane.lower -sticky nsew
3374
+ .vpane.lower paneconfigure .vpane.lower.diff -stretch always
3375
+ .vpane.lower paneconfigure .vpane.lower.commarea -stretch never
3376
}
3377
3378
# -- Commit Area Buttons
lib/blame.tcl
+3
-4
@@ -63,7 +63,7 @@ field tooltip_timer {} ; # Current timer event for our tooltip
63
field tooltip_commit {} ; # Commit(s) in tooltip
64
65
constructor new {i_commit i_path i_jump} {
66
- global cursor_ptr M1B M1T have_tk85 use_ttk NS
66
+ global cursor_ptr M1B M1T NS
67
variable active_color
68
variable group_colors
69
@@ -203,9 +203,8 @@ constructor new {i_commit i_path i_jump} {
203
-width 80 \
204
-xscrollcommand [list $w.file_pane.out.sbx set] \
205
-font font_diff
206
- if {$have_tk85} {
206
$w_file configure -inactiveselectbackground darkblue
208
- }
207
+
208
$w_file tag conf found \
209
-background yellow
210
@@ -1298,7 +1297,7 @@ method _open_tooltip {cur_w} {
1297
# On MacOS raising a window causes it to acquire focus.
1298
# Tk 8.5 on MacOS seems to properly support wm transient,
1299
# so we can safely counter the effect there.
1301
- if {$::have_tk85 && [is_MacOSX]} {
1300
+ if {[is_MacOSX]} {
1301
update
1302
if {$w eq {}} {
1303
raise .
lib/diff.tcl
+3
-5
@@ -2,15 +2,13 @@
2
# Copyright (C) 2006, 2007 Shawn Pearce
3
4
proc apply_tab_size {{firsttab {}}} {
5
- global have_tk85 repo_config ui_diff
5
+ global repo_config ui_diff
6
7
set w [font measure font_diff "0"]
8
- if {$have_tk85 && $firsttab != 0} {
8
+ if {$firsttab != 0} {
9
$ui_diff configure -tabs [list [expr {$firsttab * $w}] [expr {($firsttab + $repo_config(gui.tabsize)) * $w}]]
10
- } elseif {$have_tk85 || $repo_config(gui.tabsize) != 8} {
11
- $ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
10
} else {
13
- $ui_diff configure -tabs {}
11
+ $ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
12
}
13
}
14
lib/sshkey.tcl
+4
-6
@@ -18,7 +18,7 @@ proc find_ssh_key {} {
18
}
19
20
proc do_ssh_key {} {
21
- global sshkey_title have_tk85 sshkey_fd use_ttk NS
21
+ global sshkey_title sshkey_fd use_ttk NS
22
23
set w .sshkey_dialog
24
if {[winfo exists $w]} {
@@ -48,11 +48,9 @@ proc do_ssh_key {} {
48
49
text $w.contents -width 60 -height 10 -wrap char -relief sunken
50
pack $w.contents -fill both -expand 1
51
- if {$have_tk85} {
52
- set clr darkblue
53
- if {$use_ttk} { set clr [ttk::style lookup . -selectbackground] }
54
- $w.contents configure -inactiveselectbackground $clr
55
- }
51
+ set clr darkblue
52
+ if {$use_ttk} { set clr [ttk::style lookup . -selectbackground] }
53
+ $w.contents configure -inactiveselectbackground $clr
54
55
${NS}::frame $w.buttons
56
${NS}::button $w.buttons.close -text [mc Close] \