From: Shawn O. Pearce Date: Tue, 21 Nov 2006 04:55:51 +0000 (-0500) Subject: git-gui: Added about dialog box. X-Git-Tag: gitgui-0.6.0~171 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=82aa23545f84f01e83fb2164b5751b41fd449b62;p=git.git 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 --- diff --git a/git-gui b/git-gui index e770717b4..57120bd2b 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 "grab $w; focus $w" + bind $w "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