Добавлено меню Помощь -> О программе. Добавлено окно 'О программе'
This commit is contained in:
parent
d7eef2b5f8
commit
e382546121
|
@ -13,7 +13,7 @@ if {[info exists cfgVariables(geometry)]} {
|
||||||
wm geometry . 1024x768
|
wm geometry . 1024x768
|
||||||
}
|
}
|
||||||
# Заголовок окна
|
# Заголовок окна
|
||||||
wm title . "ProjMan \($projmanVersion-$projmanRelease\)"
|
wm title . "ProjMan \($projman(Version)-$projman(Release)\)"
|
||||||
wm iconname . "ProjMan"
|
wm iconname . "ProjMan"
|
||||||
# иконка окна (берется из файла lib/imges.tcl)
|
# иконка окна (берется из файла lib/imges.tcl)
|
||||||
wm iconphoto . projman
|
wm iconphoto . projman
|
||||||
|
@ -90,6 +90,7 @@ GetViewMenu [menu .frmMenu.mnuView.m]
|
||||||
pack .frmMenu.mnuFile .frmMenu.mnuEdit .frmMenu.mnuView -side left
|
pack .frmMenu.mnuFile .frmMenu.mnuEdit .frmMenu.mnuView -side left
|
||||||
|
|
||||||
menubutton .frmMenu.mnuHelp -text [::msgcat::mc "Help"] -menu .frmMenu.mnuHelp.m
|
menubutton .frmMenu.mnuHelp -text [::msgcat::mc "Help"] -menu .frmMenu.mnuHelp.m
|
||||||
|
GetHelpMenu [menu .frmMenu.mnuHelp.m]
|
||||||
pack .frmMenu.mnuHelp -side right
|
pack .frmMenu.mnuHelp -side right
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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 files tree"] -command ViewFilesTree
|
||||||
$m add command -label [::msgcat::mc "View line numbers"] -command ViewLineNumbers
|
$m add command -label [::msgcat::mc "View line numbers"] -command ViewLineNumbers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc GetHelpMenu {m} {
|
||||||
|
$m add command -label [::msgcat::mc "About ..."] -command Help::About
|
||||||
|
}
|
||||||
|
|
|
@ -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}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user