diff --git a/lib/gui.tcl b/lib/gui.tcl index 374739e..ed9e6d6 100644 --- a/lib/gui.tcl +++ b/lib/gui.tcl @@ -13,7 +13,7 @@ if {[info exists cfgVariables(geometry)]} { wm geometry . 1024x768 } # Заголовок окна -wm title . "ProjMan \($projmanVersion-$projmanRelease\)" +wm title . "ProjMan \($projman(Version)-$projman(Release)\)" wm iconname . "ProjMan" # иконка окна (берется из файла lib/imges.tcl) wm iconphoto . projman @@ -90,6 +90,7 @@ GetViewMenu [menu .frmMenu.mnuView.m] pack .frmMenu.mnuFile .frmMenu.mnuEdit .frmMenu.mnuView -side left menubutton .frmMenu.mnuHelp -text [::msgcat::mc "Help"] -menu .frmMenu.mnuHelp.m +GetHelpMenu [menu .frmMenu.mnuHelp.m] pack .frmMenu.mnuHelp -side right diff --git a/lib/menu.tcl b/lib/menu.tcl index b71910c..7dd0dbc 100644 --- a/lib/menu.tcl +++ b/lib/menu.tcl @@ -64,3 +64,7 @@ proc GetViewMenu {m} { $m add command -label [::msgcat::mc "View files tree"] -command ViewFilesTree $m add command -label [::msgcat::mc "View line numbers"] -command ViewLineNumbers } + +proc GetHelpMenu {m} { + $m add command -label [::msgcat::mc "About ..."] -command Help::About +} diff --git a/lib/procedure.tcl b/lib/procedure.tcl index 60d86ba..231d8d8 100644 --- a/lib/procedure.tcl +++ b/lib/procedure.tcl @@ -104,3 +104,24 @@ proc FindImage {ext} { } } +namespace eval Help { + proc About {} { + global projman + set msg "Tcl/Tk project Manager\n\n" + append msg "Version: " $projman(Version) "\n" \ + "Release: " $projman(Release) "\n" \ + "Build: " $projman(Build) "\n\n" \ + "Author: " $projman(Author) "\n" \ + "Home page: " $projman(Homepage) + # foreach name [array names projman] { + # append msg $name ": " $projman($name) "\n" + # } + set answer [ + tk_messageBox -message "[::msgcat::mc "About ..."] ProjMan" \ + -icon info -type ok -detail $msg + ] + switch $answer { + ok {return} + } + } +}