diff --git a/lib/function.tcl b/lib/function.tcl index 3f59444..2181548 100644 --- a/lib/function.tcl +++ b/lib/function.tcl @@ -406,16 +406,21 @@ proc SetRacCommand {} { } proc ShowHelpDialog {} { - global default dir + global default dir racgui_version racgui_release set frm [AddToplevel [::msgcat::mc "About"] help_grey_64] wm title .add [::msgcat::mc "About"] + ttk::label $frm.lbl_version -text "[::msgcat::mc "Version"]: $racgui_version" + ttk::label $frm.lbl_release -text "[::msgcat::mc "Release"]: $racgui_release" + text $frm.txt -wrap word ttk::scrollbar $frm.hsb -orient horizontal -command [list $frm.t xview] ttk::scrollbar $frm.vsb -orient vertical -command [list $frm.t yview] text $frm.t -xscrollcommand [list $frm.hsb set] -yscrollcommand [list $frm.vsb set] - grid $frm.t -row 0 -column 0 -sticky nsew - grid $frm.vsb -row 0 -column 1 -sticky nsew - grid $frm.hsb -row 1 -column 0 -sticky nsew + grid $frm.lbl_version -row 0 -column 0 -sticky nsew -padx 5 -pady 2 + grid $frm.lbl_release -row 1 -column 0 -sticky nsew -padx 5 -pady 2 + grid $frm.t -row 2 -column 0 -sticky nsew + grid $frm.vsb -row 2 -column 1 -sticky nsew + grid $frm.hsb -row 3 -column 0 -sticky nsew grid columnconfigure $frm 0 -weight 1 grid rowconfigure $frm 0 -weight 1 @@ -2577,24 +2582,3 @@ proc Del::app {tree host profile_name} { proc Del::inet {tree host profile_name} { Del::acl $host inet [GetWorkTreeItems "name"] $profile_name } - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/gui.tcl b/lib/gui.tcl index 6fcacc0..a1a1200 100644 --- a/lib/gui.tcl +++ b/lib/gui.tcl @@ -123,4 +123,3 @@ pack $frm_tree $frm_work -side left -expand true -fill both .panel add $frm_tree -weight 1 .panel add $frm_work -weight 1 - diff --git a/lib/msg/ru.msg b/lib/msg/ru.msg index e086a05..d9567d8 100644 --- a/lib/msg/ru.msg +++ b/lib/msg/ru.msg @@ -146,3 +146,5 @@ ::msgcat::mcset ru "Connected at" "Подключено в" ::msgcat::mcset ru "Session number" "Номер сессии" ::msgcat::mcset ru "About" "О программе" +::msgcat::mcset ru "Version" "Версия" +::msgcat::mcset ru "Release" "Выпуск" diff --git a/rac_gui.tcl b/rac_gui.tcl index 89a2243..6c184ff 100755 --- a/rac_gui.tcl +++ b/rac_gui.tcl @@ -15,6 +15,19 @@ exec wish "$0" -- "$@" # ###################################################### + +# определим текущую версию и релиз +set f [open $argv0 "RDONLY"] +while {[gets $f line] >=0} { + if [regexp -nocase -all -- {version: ([0-9]+?.[0-9]+?.[0-9]+?)} $line match v1] { + set racgui_version $v1 + } + if [regexp -nocase -all -- {release: ([0-9]+?)} $line match v1] { + set racgui_release $v1 + } +} +close $f + package require msgcat # Устанавливаем текущий каталог @@ -112,5 +125,3 @@ if [file exists [file join $dir(work) 1c_srv_new.cfg]] { set servers_list "" } - -