mirror of
https://github.com/git/git.git
synced 2026-01-10 18:20:27 +00:00
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>
This commit is contained in:
34
git-gui.sh
34
git-gui.sh
@@ -1268,8 +1268,6 @@ citool {
|
||||
##
|
||||
## execution environment
|
||||
|
||||
set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}]
|
||||
|
||||
# Suggest our implementation of askpass, if none is set
|
||||
if {![info exists env(SSH_ASKPASS)]} {
|
||||
set env(SSH_ASKPASS) [gitexec git-gui--askpass]
|
||||
@@ -3363,28 +3361,18 @@ unset i
|
||||
|
||||
# -- Diff and Commit Area
|
||||
#
|
||||
if {$have_tk85} {
|
||||
${NS}::panedwindow .vpane.lower -orient vertical
|
||||
${NS}::frame .vpane.lower.commarea
|
||||
${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500
|
||||
.vpane.lower add .vpane.lower.diff
|
||||
.vpane.lower add .vpane.lower.commarea
|
||||
.vpane add .vpane.lower
|
||||
if {$use_ttk} {
|
||||
.vpane.lower pane .vpane.lower.diff -weight 1
|
||||
.vpane.lower pane .vpane.lower.commarea -weight 0
|
||||
} else {
|
||||
.vpane.lower paneconfigure .vpane.lower.diff -stretch always
|
||||
.vpane.lower paneconfigure .vpane.lower.commarea -stretch never
|
||||
}
|
||||
${NS}::panedwindow .vpane.lower -orient vertical
|
||||
${NS}::frame .vpane.lower.commarea
|
||||
${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1 -height 500
|
||||
.vpane.lower add .vpane.lower.diff
|
||||
.vpane.lower add .vpane.lower.commarea
|
||||
.vpane add .vpane.lower
|
||||
if {$use_ttk} {
|
||||
.vpane.lower pane .vpane.lower.diff -weight 1
|
||||
.vpane.lower pane .vpane.lower.commarea -weight 0
|
||||
} else {
|
||||
frame .vpane.lower -height 300 -width 400
|
||||
frame .vpane.lower.commarea
|
||||
frame .vpane.lower.diff -relief sunken -borderwidth 1
|
||||
pack .vpane.lower.diff -fill both -expand 1
|
||||
pack .vpane.lower.commarea -side bottom -fill x
|
||||
.vpane add .vpane.lower
|
||||
.vpane paneconfigure .vpane.lower -sticky nsew
|
||||
.vpane.lower paneconfigure .vpane.lower.diff -stretch always
|
||||
.vpane.lower paneconfigure .vpane.lower.commarea -stretch never
|
||||
}
|
||||
|
||||
# -- Commit Area Buttons
|
||||
|
||||
@@ -63,7 +63,7 @@ field tooltip_timer {} ; # Current timer event for our tooltip
|
||||
field tooltip_commit {} ; # Commit(s) in tooltip
|
||||
|
||||
constructor new {i_commit i_path i_jump} {
|
||||
global cursor_ptr M1B M1T have_tk85 use_ttk NS
|
||||
global cursor_ptr M1B M1T NS
|
||||
variable active_color
|
||||
variable group_colors
|
||||
|
||||
@@ -203,9 +203,8 @@ constructor new {i_commit i_path i_jump} {
|
||||
-width 80 \
|
||||
-xscrollcommand [list $w.file_pane.out.sbx set] \
|
||||
-font font_diff
|
||||
if {$have_tk85} {
|
||||
$w_file configure -inactiveselectbackground darkblue
|
||||
}
|
||||
|
||||
$w_file tag conf found \
|
||||
-background yellow
|
||||
|
||||
@@ -1298,7 +1297,7 @@ method _open_tooltip {cur_w} {
|
||||
# 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]} {
|
||||
if {[is_MacOSX]} {
|
||||
update
|
||||
if {$w eq {}} {
|
||||
raise .
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
# Copyright (C) 2006, 2007 Shawn Pearce
|
||||
|
||||
proc apply_tab_size {{firsttab {}}} {
|
||||
global have_tk85 repo_config ui_diff
|
||||
global repo_config ui_diff
|
||||
|
||||
set w [font measure font_diff "0"]
|
||||
if {$have_tk85 && $firsttab != 0} {
|
||||
if {$firsttab != 0} {
|
||||
$ui_diff configure -tabs [list [expr {$firsttab * $w}] [expr {($firsttab + $repo_config(gui.tabsize)) * $w}]]
|
||||
} elseif {$have_tk85 || $repo_config(gui.tabsize) != 8} {
|
||||
$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
|
||||
} else {
|
||||
$ui_diff configure -tabs {}
|
||||
$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ proc find_ssh_key {} {
|
||||
}
|
||||
|
||||
proc do_ssh_key {} {
|
||||
global sshkey_title have_tk85 sshkey_fd use_ttk NS
|
||||
global sshkey_title sshkey_fd use_ttk NS
|
||||
|
||||
set w .sshkey_dialog
|
||||
if {[winfo exists $w]} {
|
||||
@@ -48,11 +48,9 @@ proc do_ssh_key {} {
|
||||
|
||||
text $w.contents -width 60 -height 10 -wrap char -relief sunken
|
||||
pack $w.contents -fill both -expand 1
|
||||
if {$have_tk85} {
|
||||
set clr darkblue
|
||||
if {$use_ttk} { set clr [ttk::style lookup . -selectbackground] }
|
||||
$w.contents configure -inactiveselectbackground $clr
|
||||
}
|
||||
set clr darkblue
|
||||
if {$use_ttk} { set clr [ttk::style lookup . -selectbackground] }
|
||||
$w.contents configure -inactiveselectbackground $clr
|
||||
|
||||
${NS}::frame $w.buttons
|
||||
${NS}::button $w.buttons.close -text [mc Close] \
|
||||
|
||||
Reference in New Issue
Block a user