2022-07-21 10:56:46 +03:00
|
|
|
######################################################
|
|
|
|
# ProjMan 2
|
|
|
|
# Distributed under GNU Public License
|
|
|
|
# Author: Sergey Kalinin svk@nuk-svk.ru
|
|
|
|
# Copyright (c) "", 2022, https://nuk-svk.ru
|
|
|
|
######################################################
|
|
|
|
#
|
|
|
|
# All procedures module
|
|
|
|
#
|
|
|
|
######################################################
|
2018-02-05 11:24:14 +03:00
|
|
|
|
|
|
|
proc Quit {} {
|
2022-07-21 10:56:46 +03:00
|
|
|
global dir
|
|
|
|
Config::write $dir(cfg)
|
|
|
|
exit
|
2018-02-05 11:24:14 +03:00
|
|
|
}
|
|
|
|
|
2022-07-21 10:56:46 +03:00
|
|
|
proc ViewFilesTree {} {
|
|
|
|
global cfgVariables
|
|
|
|
if {$cfgVariables(toolBarShow) eq "true"} {
|
|
|
|
.frmBody.panel forget .frmBody.frmTree
|
|
|
|
set cfgVariables(toolBarShow) false
|
2018-02-05 11:24:14 +03:00
|
|
|
} else {
|
2022-07-21 10:56:46 +03:00
|
|
|
.frmBody.panel insert 0 .frmBody.frmTree
|
|
|
|
set cfgVariables(toolBarShow) true
|
2018-02-05 11:24:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-21 10:56:46 +03:00
|
|
|
# Enable/Disabled line numbers in editor
|
|
|
|
proc ViewLineNumbers {} {
|
|
|
|
global cfgVariables nbEditor
|
|
|
|
# Changed global settigs
|
|
|
|
if {$cfgVariables(lineNumberShow) eq "true"} {
|
|
|
|
set cfgVariables(lineNumberShow) false
|
|
|
|
} else {
|
|
|
|
set cfgVariables(lineNumberShow) true
|
2018-02-05 11:24:14 +03:00
|
|
|
}
|
2022-07-21 10:56:46 +03:00
|
|
|
# apply changes for opened tabs
|
|
|
|
foreach node [$nbEditor tabs] {
|
|
|
|
$node.frmText.t configure -linemap $cfgVariables(lineNumberShow)
|
2018-02-05 11:24:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-21 10:56:46 +03:00
|
|
|
proc Del {} {
|
|
|
|
return
|
2018-02-05 11:24:14 +03:00
|
|
|
}
|
|
|
|
|
2022-07-21 10:56:46 +03:00
|
|
|
proc YScrollCommand {txt canv} {
|
|
|
|
$txt yview
|
|
|
|
$canv yview"
|
2018-02-05 11:24:14 +03:00
|
|
|
}
|
|
|
|
|
2022-07-21 10:56:46 +03:00
|
|
|
proc ResetModifiedFlag {w} {
|
|
|
|
global modified nbEditor
|
|
|
|
$w.frmText.t edit modified false
|
|
|
|
set modified($w) "false"
|
|
|
|
set lbl [string trimleft [$nbEditor tab $w -text] "* "]
|
|
|
|
puts "ResetModifiedFlag: $lbl"
|
|
|
|
$nbEditor tab $w -text $lbl
|
2018-02-05 11:24:14 +03:00
|
|
|
}
|
2022-07-21 10:56:46 +03:00
|
|
|
proc SetModifiedFlag {w} {
|
|
|
|
global modified nbEditor
|
|
|
|
#$w.frmText.t edit modified false
|
|
|
|
set modified($w) "true"
|
|
|
|
set lbl [$nbEditor tab $w -text]
|
|
|
|
puts "SetModifiedFlag: $w; $modified($w); >$lbl<"
|
|
|
|
if {[regexp -nocase -all -- {^\*} $lbl match] == 0} {
|
|
|
|
set lbl "* $lbl"
|
2022-07-21 10:37:19 +03:00
|
|
|
}
|
2022-07-21 10:56:46 +03:00
|
|
|
$nbEditor tab $w -text $lbl
|
2022-07-21 10:37:19 +03:00
|
|
|
}
|
2018-02-18 15:01:56 +03:00
|
|
|
|
2018-02-22 13:57:51 +03:00
|
|
|
|