Добавлено меню Помощь -> О программе. Добавлено окно 'О программе'

This commit is contained in:
svkalinin 2022-08-12 15:19:57 +03:00
parent d7eef2b5f8
commit e382546121
3 changed files with 27 additions and 1 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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}
}
}
}