1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-14 21:23:03 +01:00
git/git-gui/lib/about.tcl
Junio C Hamano d794d9e70e Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: (96 commits)
  git-gui 0.9.0
  git-gui: Bind Meta-T for "Stage To Commit" menu action
  git-gui: Allow users to set font weights to bold
  git-gui: Update Japanese strings (part 2)
  git-gui: Update Japanese strings
  Updated russian translation of git-gui
  po2msg: actually output statistics
  po2msg: ignore untranslated messages
  po2msg: ignore entries marked with "fuzzy"
  git-gui: Protect against bad translation strings
  git-gui: Make sure we get errors from git-update-index
  More updates and corrections to the russian translation of git-gui
  Updated Russian translation.
  git-gui: Update German translation
  git-gui: Add more terms to glossary.
  git-gui: Paper bag fix the global config parsing
  git-gui: Honor a config.mak in git-gui's top level
  git-gui: Collapse $env(HOME) to ~/ in recent repositories on Windows
  git-gui: Support cloning Cygwin based work-dirs
  git-gui: Use proper Windows shortcuts instead of bat files
  ...
2007-11-21 00:00:56 -08:00

81 lines
1.9 KiB
Tcl

# git-gui about git-gui dialog
# Copyright (C) 2006, 2007 Shawn Pearce
proc do_about {} {
global appvers copyright oguilib
global tcl_patchLevel tk_patchLevel
set w .about_dialog
toplevel $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
pack [git_logo $w.git_logo] -side left -fill y -padx 10 -pady 10
label $w.header -text [mc "About %s" [appname]] \
-font font_uibold
pack $w.header -side top -fill x
frame $w.buttons
button $w.buttons.close -text {Close} \
-default active \
-command [list destroy $w]
pack $w.buttons.close -side right
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
label $w.desc \
-text "[mc "git-gui - a graphical user interface for Git."]\n$copyright" \
-padx 5 -pady 5 \
-justify left \
-anchor w \
-borderwidth 1 \
-relief solid
pack $w.desc -side top -fill x -padx 5 -pady 5
set v {}
append v "git-gui version $appvers\n"
append v "[git version]\n"
append v "\n"
if {$tcl_patchLevel eq $tk_patchLevel} {
append v "Tcl/Tk version $tcl_patchLevel"
} else {
append v "Tcl version $tcl_patchLevel"
append v ", Tk version $tk_patchLevel"
}
set d {}
append d "git wrapper: $::_git\n"
append d "git exec dir: [gitexec]\n"
append d "git-gui lib: $oguilib"
label $w.vers \
-text $v \
-padx 5 -pady 5 \
-justify left \
-anchor w \
-borderwidth 1 \
-relief solid
pack $w.vers -side top -fill x -padx 5 -pady 5
label $w.dirs \
-text $d \
-padx 5 -pady 5 \
-justify left \
-anchor w \
-borderwidth 1 \
-relief solid
pack $w.dirs -side top -fill x -padx 5 -pady 5
menu $w.ctxm -tearoff 0
$w.ctxm add command \
-label {Copy} \
-command "
clipboard clear
clipboard append -format STRING -type STRING -- \[$w.vers cget -text\]
"
bind $w <Visibility> "grab $w; focus $w.buttons.close"
bind $w <Key-Escape> "destroy $w"
bind $w <Key-Return> "destroy $w"
bind_button3 $w.vers "tk_popup $w.ctxm %X %Y; grab $w; focus $w"
wm title $w "About [appname]"
tkwait window $w
}