##
## 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]
# -- 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
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
-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
# 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 .
# 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}]
}
}
}
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]} {
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] \