summaryrefslogtreecommitdiff
path: root/git-gui
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-11-20 23:55:51 -0500
committerShawn O. Pearce <spearce@spearce.org>2006-11-21 00:22:35 -0500
commit82aa23545f84f01e83fb2164b5751b41fd449b62 (patch)
treef844ce0ab9a830fa84506ae029eb15622f463cc6 /git-gui
parenta4abfa62d69ff92e3159ca0fd41184f5b72e16a4 (diff)
downloadgit-82aa23545f84f01e83fb2164b5751b41fd449b62.tar.gz
git-gui: Added about dialog box.
Created a help menu with an about dialog box. This about dialog shows the copyright notice for the application, the fact that it is covered by the GPL v2.0 or later, the authors, and the current version of Git it is invoking when users perform actions within it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-xgit-gui58
1 files changed, 58 insertions, 0 deletions
diff --git a/git-gui b/git-gui
index e770717b4e..57120bd2b4 100755
--- a/git-gui
+++ b/git-gui
@@ -2159,6 +2159,55 @@ proc do_commit {} {
commit_tree
}
+proc do_about {} {
+ global appname
+
+ set w .about_dialog
+ toplevel $w
+ wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
+
+ label $w.header -text "About $appname" \
+ -font font_uibold
+ pack $w.header -side top -fill x
+
+ frame $w.buttons
+ button $w.buttons.close -text {Close} \
+ -font font_ui \
+ -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 "$appname - a commit creation tool for Git.
+
+Copyright © 2006 Shawn Pearce, Paul Mackerras
+
+Use and redistribute under the terms of the
+GNU General Public License, v. 2.0 or later." \
+ -padx 5 -pady 5 \
+ -justify left \
+ -anchor w \
+ -borderwidth 1 \
+ -relief solid \
+ -font font_ui
+ pack $w.desc -side top -fill x -padx 5 -pady 5
+
+ label $w.vers \
+ -text [exec git --version] \
+ -padx 5 -pady 5 \
+ -justify left \
+ -anchor w \
+ -borderwidth 1 \
+ -relief solid \
+ -font font_ui
+ pack $w.vers -side top -fill x -padx 5 -pady 5
+
+ bind $w <Visibility> "grab $w; focus $w"
+ bind $w <Key-Escape> "destroy $w"
+ wm title $w "About $appname"
+ tkwait window $w
+}
+
proc do_options {} {
global appname gitdir font_descs
global repo_config global_config
@@ -2610,6 +2659,7 @@ if {!$single_commit} {
.mbar add cascade -label Pull -menu .mbar.pull
.mbar add cascade -label Push -menu .mbar.push
}
+.mbar add cascade -label Help -menu .mbar.help
. configure -menu .mbar
# -- Repository Menu
@@ -2758,6 +2808,14 @@ if {!$single_commit} {
menu .mbar.push
}
+# -- Help Menm
+#
+menu .mbar.help
+
+.mbar.help add command -label "About $appname" \
+ -command do_about \
+ -font font_ui
+
# -- Main Window Layout
#
panedwindow .vpane -orient vertical