From 26546dfe27818554e1430a065536d3c85a28afbc Mon Sep 17 00:00:00 2001 From: svk Date: Tue, 27 Jan 2026 17:31:39 +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=B0=20=D0=B4=D0=B8=D0=BD=D0=B0=D0=BC=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D1=81=D0=BA=D0=B0=D1=8F=20=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BC=D0=B5=D0=BD=D1=8E=20'=D0=98=D0=BD?= =?UTF-8?q?=D1=81=D1=82=D1=80=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D1=8B'.=20?= =?UTF-8?q?=D0=A2=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=BD=D0=BE=D0=B2=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=B2=D0=BD=D0=B5=D1=88=D0=BD=D0=B8=D0=B5=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=81=D1=82=D1=80=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D1=8B=20?= =?UTF-8?q?=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF=D0=BD=D1=8B=20=D1=81=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D1=83=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D1=81?= =?UTF-8?q?=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=84?= =?UTF-8?q?=D0=B0=D0=B9=D0=BB=D0=B0=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BA=20tools.ini=20=D0=B2=20=D1=80=D0=B5=D0=B4=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=BE=D1=80=D0=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/files.tcl | 6 ++++++ lib/tools.tcl | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/lib/files.tcl b/lib/files.tcl index fe4383b..df4cdb3 100644 --- a/lib/files.tcl +++ b/lib/files.tcl @@ -391,6 +391,12 @@ namespace eval FileOper { if {[file tail $filePath] eq "projman.ini"} { Config::read $dir(cfg) } + if {[file tail $filePath] eq "tools.ini"} { + Tools::Read $dir(cfg) + Tools::CheckVariables + Tools::GetMenu .popup.tools + Tools::GetMenu .frmMenu.mnuTools.m + } if [string match "*untitled*" $nbEditorItem] { FileOper::Close if {$type ne "close"} { diff --git a/lib/tools.tcl b/lib/tools.tcl index 23139a6..a15c9d1 100644 --- a/lib/tools.tcl +++ b/lib/tools.tcl @@ -29,6 +29,7 @@ proc Tools::Create {dir} { } proc Tools::Read {dir} { + set ::toolsVariables "" set toolsFile [ini::open [file join $dir tools.ini] "r"] foreach section [ini::sections $toolsFile] { foreach key [ini::keys $toolsFile $section] { @@ -104,6 +105,12 @@ proc Tools::CheckVariables {} { proc Tools::GetMenu {m} { global cfgVariables toolsVariables + set count [$m index end] + if {$count != "none"} { + for {set i $count} {$i >= 0} {incr i -1} { + $m delete $i + } + } foreach toolName [dict keys $toolsVariables] { dict for {key value} [dict get $toolsVariables $toolName] { DebugPuts "GetToolsMenu $key $value"