From e382546121c40daf9fa2581e06a00dc7fd9b0a9c Mon Sep 17 00:00:00 2001 From: svkalinin Date: Fri, 12 Aug 2022 15:19:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BC=D0=B5=D0=BD=D1=8E=20=D0=9F=D0=BE=D0=BC?= =?UTF-8?q?=D0=BE=D1=89=D1=8C=20->=20=D0=9E=20=D0=BF=D1=80=D0=BE=D0=B3?= =?UTF-8?q?=D1=80=D0=B0=D0=BC=D0=BC=D0=B5.=20=D0=94=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BE=D0=BA=D0=BD=D0=BE=20'?= =?UTF-8?q?=D0=9E=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=B5?= =?UTF-8?q?'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/gui.tcl | 3 ++- lib/menu.tcl | 4 ++++ lib/procedure.tcl | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) 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} + } + } +}