echo 'git-gui version @@GITGUI_VERSION@@'; \
exit; \
fi; \
- exec wish "$0" -- "$@"
+ argv0=$0; \
+ exec wish "$argv0" -- "$@"
set appvers {@@GITGUI_VERSION@@}
set copyright {
return [eval [list format $fmt] $args]
}
+proc strcat {args} {
+ return [join $args {}]
+}
+
::msgcat::mcload $oguimsg
unset oguimsg
return $m
}
+proc rmsel_tag {text} {
+ $text tag conf sel \
+ -background [$text cget -background] \
+ -foreground [$text cget -foreground] \
+ -borderwidth 0
+ $text tag conf in_sel -background lightgray
+ bind $text <Motion> break
+ return $text
+}
+
######################################################################
##
## find git
-icon error \
-type ok \
-title [mc "git-gui: fatal error"] \
- -message [append [mc "Cannot parse Git version string:"] "\n\n$_git_version"]
+ -message [strcat [mc "Cannot parse Git version string:"] "\n\n$_git_version"]
exit 1
}
set _prefix [git rev-parse --show-prefix]
} err]} {
catch {wm withdraw .}
- error_popup [append [mc "Cannot find the git directory:"] "\n\n$err"]
+ error_popup [strcat [mc "Cannot find the git directory:"] "\n\n$err"]
exit 1
}
if {![file isdirectory $_gitdir] && [is_Cygwin]} {
- catch {set _gitdir [exec cygpath --unix $_gitdir]}
+ catch {set _gitdir [exec cygpath --windows $_gitdir]}
}
if {![file isdirectory $_gitdir]} {
catch {wm withdraw .}
- error_popup [append [mc "Git directory not found:"] "\n\n$_gitdir"]
+ error_popup [strcat [mc "Git directory not found:"] "\n\n$_gitdir"]
exit 1
}
if {$_prefix ne {}} {
regsub -all {[^/]+/} $_prefix ../ cdup
if {[catch {cd $cdup} err]} {
catch {wm withdraw .}
- error_popup [append [mc "Cannot move to top of working directory:"] "\n\n$err"]
+ error_popup [strcat [mc "Cannot move to top of working directory:"] "\n\n$err"]
exit 1
}
unset cdup
} elseif {![is_enabled bare]} {
if {[lindex [file split $_gitdir] end] ne {.git}} {
catch {wm withdraw .}
- error_popup [append [mc "Cannot use funny .git directory:"] "\n\n$_gitdir"]
+ error_popup [strcat [mc "Cannot use funny .git directory:"] "\n\n$_gitdir"]
exit 1
}
if {[catch {cd [file dirname $_gitdir]} err]} {
catch {wm withdraw .}
- error_popup [append [mc "No working directory"] " [file dirname $_gitdir]:\n\n$err"]
+ error_popup [strcat [mc "No working directory"] " [file dirname $_gitdir]:\n\n$err"]
exit 1
}
}
set font [lindex $option 1]
if {[catch {
foreach {cn cv} $repo_config(gui.$name) {
- font configure $font $cn $cv
+ font configure $font $cn $cv -weight normal
}
} err]} {
- error_popup [append [mc "Invalid font specified in %s:" "gui.$name"] "\n\n$err"]
+ error_popup [strcat [mc "Invalid font specified in %s:" "gui.$name"] "\n\n$err"]
}
foreach {cn cv} [font configure $font] {
font configure ${font}bold $cn $cv
.vpane.files add .vpane.files.workdir -sticky nsew
foreach i [list $ui_index $ui_workdir] {
- $i tag conf in_diff -background lightgray
- $i tag conf in_sel -background lightgray
+ rmsel_tag $i
+ $i tag conf in_diff -background [$i tag cget in_sel -background]
}
unset i