Skip to content

Commit 4e3369f

Browse files
committed
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 <[email protected]>
1 parent ed73388 commit 4e3369f

File tree

4 files changed

+21
-38
lines changed

4 files changed

+21
-38
lines changed

git-gui.sh

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,8 +1268,6 @@ citool {
12681268
##
12691269
## execution environment
12701270

1271-
set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
1272-
12731271
# Suggest our implementation of askpass, if none is set
12741272
if {![info exists env(SSH_ASKPASS)]} {
12751273
set env(SSH_ASKPASS) [gitexec git-gui--askpass]
@@ -3363,28 +3361,18 @@ unset i
33633361

33643362
# -- Diff and Commit Area
33653363
#
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
33803373
} 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
33883376
}
33893377

33903378
# -- Commit Area Buttons

lib/blame.tcl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ field tooltip_timer {} ; # Current timer event for our tooltip
6363
field tooltip_commit {} ; # Commit(s) in tooltip
6464

6565
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
6767
variable active_color
6868
variable group_colors
6969

@@ -203,9 +203,8 @@ constructor new {i_commit i_path i_jump} {
203203
-width 80 \
204204
-xscrollcommand [list $w.file_pane.out.sbx set] \
205205
-font font_diff
206-
if {$have_tk85} {
207206
$w_file configure -inactiveselectbackground darkblue
208-
}
207+
209208
$w_file tag conf found \
210209
-background yellow
211210

@@ -1298,7 +1297,7 @@ method _open_tooltip {cur_w} {
12981297
# On MacOS raising a window causes it to acquire focus.
12991298
# Tk 8.5 on MacOS seems to properly support wm transient,
13001299
# so we can safely counter the effect there.
1301-
if {$::have_tk85 && [is_MacOSX]} {
1300+
if {[is_MacOSX]} {
13021301
update
13031302
if {$w eq {}} {
13041303
raise .

lib/diff.tcl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
# Copyright (C) 2006, 2007 Shawn Pearce
33

44
proc apply_tab_size {{firsttab {}}} {
5-
global have_tk85 repo_config ui_diff
5+
global repo_config ui_diff
66

77
set w [font measure font_diff "0"]
8-
if {$have_tk85 && $firsttab != 0} {
8+
if {$firsttab != 0} {
99
$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}]
1210
} else {
13-
$ui_diff configure -tabs {}
11+
$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
1412
}
1513
}
1614

lib/sshkey.tcl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ proc find_ssh_key {} {
1818
}
1919

2020
proc do_ssh_key {} {
21-
global sshkey_title have_tk85 sshkey_fd use_ttk NS
21+
global sshkey_title sshkey_fd use_ttk NS
2222

2323
set w .sshkey_dialog
2424
if {[winfo exists $w]} {
@@ -48,11 +48,9 @@ proc do_ssh_key {} {
4848

4949
text $w.contents -width 60 -height 10 -wrap char -relief sunken
5050
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
5654

5755
${NS}::frame $w.buttons
5856
${NS}::button $w.buttons.close -text [mc Close] \

0 commit comments

Comments
 (0)