Compare commits
16 Commits
tcltk9.0
...
78107b529f
| Author | SHA1 | Date | |
|---|---|---|---|
| 78107b529f | |||
| 781352b249 | |||
| 478a583c3a | |||
| 4f01a1fbd7 | |||
| 96dd7a1b4b | |||
|
|
4b2adb3299 | ||
|
|
0c4928c224 | ||
|
|
eb6b2c6f53 | ||
|
|
aa9bb03cc2 | ||
|
|
bcc3460e06 | ||
|
|
1385c91255 | ||
|
|
ead8267d61 | ||
|
|
45cbd7845b | ||
|
|
ef87b88156 | ||
| 264368c61f | |||
| c38dffeeb9 |
59
debian/changelog
vendored
59
debian/changelog
vendored
@@ -1,24 +1,61 @@
|
||||
projman (2.1.0-alpha0) stable; urgency=medium
|
||||
projman (2.0.0-alpha23) stable; urgency=medium
|
||||
|
||||
* Исправлен флаг модификации при открытии файла
|
||||
* Исправлена 'Отмена' до пустого файла. Внес исправления на основе изменений https://github.com/wandrien/projman
|
||||
* Исправлено поведение при сочетании клавиш Control-y (повторение последнего действия)
|
||||
|
||||
-- svk <svk@nuk-svk.ru> Mon, 19 Jan 2026 14:49:29 +0300
|
||||
|
||||
projman (2.0.0-alpha22) stable; urgency=medium
|
||||
|
||||
* Исправил закрытие вкладок редактора и сохранение файла при разделении экрана.
|
||||
* Новая сборка
|
||||
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 3 Dec 2025 18:06:32 +0300
|
||||
|
||||
projman (2.0.0-alpha21) stable; urgency=medium
|
||||
|
||||
* Исправил ошибку
|
||||
* Добавлены настройки путей к программам для выполнения редактируемых файлов для каждого поддержимаего типа. И использование этих настроек при выполнении файла.
|
||||
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 3 Dec 2025 17:59:31 +0300
|
||||
|
||||
projman (2.0.0-alpha20) stable; urgency=medium
|
||||
|
||||
* Добавил вывод информации о версиях tcl и tk
|
||||
* Добавил вывод номера версии tcl/tl в О Программе
|
||||
|
||||
-- Sergey Kalinin <svkalinin@samsonpost.ru> Mon, 10 Nov 2025 13:13:44 +0300
|
||||
|
||||
projman (2.1.0-alpha0) stable; urgency=medium
|
||||
|
||||
* Незначительные изменения
|
||||
|
||||
-- Sergey Kalinin <svkalinin@samsonpost.ru> Mon, 10 Nov 2025 13:00:43 +0300
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Mon, 03 Dec 2025 17:22:44 +0300
|
||||
|
||||
projman (2.0.0-alpha19) stable; urgency=medium
|
||||
|
||||
* Исправил сохранение и закрытие нового файла. Теперь при сохранении файл будет переоткрыт под новым именем.
|
||||
* Добавил проверку пакета Img. И поправил проверку типов изображений
|
||||
* Переделал сигналы и сочетания
|
||||
* Небольшие исправления
|
||||
* Добавлен перевод фокуса ввода на прежнее окно после закрытия диалога выполнения.
|
||||
* Добавлена передача сигналов для закрытия запущенного процесса
|
||||
* Изменил виджет текста в окне псевдо-терминала. Добавил подстановку имени файла к командную строку по шаблону %f
|
||||
* Добавлен диалог настроек
|
||||
* Добавил псевдо-терминал
|
||||
* Добавлен диалог при открытии файлов отличных от текстовых
|
||||
* Поправил тему оформления
|
||||
* Исправлена работа в windows
|
||||
* Уменьшил колдичество выводимой отладочной информации
|
||||
* Добавлено определение пути до git в зависимости от платформы.
|
||||
* Исправлено создание файла конфигурации
|
||||
* Исправлено создание файла конфигурации. Добавлены номера версий в вызов tclsh8.6 и wish8.6. Убрана зависимость на Threads.
|
||||
* Исправлено чтение структуры проекта при открытии из меню 'Открыть недавнее'
|
||||
* Bugfix release
|
||||
* Bug fix with varhelper
|
||||
* Added the "Open Recent" menu. The "recentlyEditedFolders" option in the configuration file contains a list of recently opened directories. The procedures for working with this list have also been added.
|
||||
* Косметические изменения.
|
||||
* Исправлены ошибки при вставке кавычек
|
||||
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Thu, 30 Oct 2025 14:47:05 +0300
|
||||
-- Калинин Сергей Валерьевич <svk@nuk-svk.ru> Thu, 30 Jan 2025 12:19:56 +0300
|
||||
|
||||
projman (2.0.0-alpha19) stable; urgency=medium
|
||||
|
||||
* Переделал сигналы и сочетния
|
||||
* Добавлен перевод фокуса ввода на прежнее окно после закрытия диалога выполнения.
|
||||
* Добавлена передача сигналов для закрытия запущенного процесса
|
||||
* Изменил виджет текста в окне псевдо-терминала. Добавил подстановку имени файла к командную строку по шаблону %f
|
||||
@@ -409,3 +446,5 @@ projman (2.0.0-alfa0) stable; urgency=medium
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -796,14 +796,15 @@ namespace eval Editor {
|
||||
bind $txt <Control-comma> "Editor::Comment $txt $fileType"
|
||||
bind $txt <Control-period> "Editor::Uncomment $txt $fileType"
|
||||
bind $txt <Control-eacute> Find
|
||||
bind $txt <Insert> {OverWrite}
|
||||
# bind $txt <Insert> {OverWrite}
|
||||
bind $txt <ButtonRelease-1> "Editor::SearchBrackets $txt"
|
||||
bind $txt <Button-1><ButtonRelease-1> "Editor::SelectionHighlight $txt"
|
||||
bind $txt <<Modified>> "SetModifiedFlag $w $nb"
|
||||
bind $txt <<Modified>> "SetModifiedFlag $w $nb auto"
|
||||
bind $txt <Control-u> "Editor::SearchBrackets %W"
|
||||
bind $txt <Control-Cyrillic_ghe> "Editor::SearchBrackets %W"
|
||||
bind $txt <Control-J> "catch {Editor::GoToFunction $txt}"
|
||||
bind $txt <Control-j> "catch {Editor::GoToFunction $txt}; break"
|
||||
bind $txt <Control-y> {Redo; break}
|
||||
bind $txt <Control-Cyrillic_o> "catch {Editor::GoToFunction $txt}; break"
|
||||
bind $txt <Alt-w> "$txt delete {insert wordstart} {insert wordend}"
|
||||
bind $txt <Alt-odiaeresis> "$txt delete {insert wordstart} {insert wordend}"
|
||||
@@ -965,7 +966,7 @@ namespace eval Editor {
|
||||
set nbEditorItem [NB::InsertItem $nbEditor $fileFullPath "file"]
|
||||
# puts "$nbEditorItem, $nbEditor"
|
||||
Editor $fileFullPath $nbEditor $nbEditorItem
|
||||
SetModifiedFlag $nbEditorItem $nbEditor
|
||||
SetModifiedFlag $nbEditorItem $nbEditor force
|
||||
focus -force $nbEditorItem.frmText.t.t
|
||||
}
|
||||
|
||||
@@ -1378,6 +1379,7 @@ namespace eval Editor {
|
||||
return
|
||||
}
|
||||
set frmText [Editor::EditorWidget $w $fileType $nb]
|
||||
# puts "Editor::SplitEditorH: w - $w"
|
||||
$frmText.t insert end [$w.frmText.t get 0.0 end]
|
||||
|
||||
# $w.panelTxt add $w.frmText -weight 0
|
||||
@@ -1392,7 +1394,7 @@ namespace eval Editor {
|
||||
global cfgVariables
|
||||
regsub -all {\.|/|\\|\s|:} $fileFullPath "_" itemName
|
||||
set itemName ".frmWork.nbEditor2.$itemName"
|
||||
# puts $itemName
|
||||
puts "Editor::SplitEditoprV: nb item - $itemName"
|
||||
if {[winfo exists $itemName] == 1} {
|
||||
.frmWork.nbEditor2 forget $itemName
|
||||
destroy $itemName
|
||||
|
||||
@@ -298,9 +298,13 @@ namespace eval FileOper {
|
||||
}
|
||||
}
|
||||
|
||||
proc Close {} {
|
||||
proc Close {{nbEditorWindow ""}} {
|
||||
global nbEditor modified tree editors
|
||||
set nbItem [$nbEditor select]
|
||||
if {$nbEditorWindow eq ""} {
|
||||
set nbEditorWindow $nbEditor
|
||||
}
|
||||
set nbItem [$nbEditorWindow select]
|
||||
# puts "Procedure FileOper::Close: item - $nbItem"
|
||||
# puts "close tab $nbItem"
|
||||
|
||||
if {$nbItem == ""} {return}
|
||||
@@ -310,14 +314,16 @@ namespace eval FileOper {
|
||||
-icon question -type yesnocancel \
|
||||
-detail [::msgcat::mc "Do you want to save it?"]]
|
||||
switch $answer {
|
||||
yes Save
|
||||
yes {Save close $nbEditorWindow}
|
||||
no {}
|
||||
cancel {return "cancel"}
|
||||
}
|
||||
}
|
||||
}
|
||||
$nbEditor forget $nbItem
|
||||
if {[$nbEditorWindow select] eq $nbItem} {
|
||||
$nbEditorWindow forget $nbItem
|
||||
destroy $nbItem
|
||||
}
|
||||
set treeItem "file::[string range $nbItem [expr [string last "." $nbItem] +1] end ]"
|
||||
if [$tree exists $treeItem] {
|
||||
# delete all functions from tree item
|
||||
@@ -339,10 +345,11 @@ namespace eval FileOper {
|
||||
.frmStatus.lblPosition configure -text ""
|
||||
.frmStatus.lblEncoding configure -text ""
|
||||
.frmStatus.lblSize configure -text ""
|
||||
NB::NextTab $nbEditor 0
|
||||
|
||||
NB::NextTab $nbEditorWindow 0
|
||||
}
|
||||
|
||||
proc Save {} {
|
||||
proc Save {{type ""} {nbEditorWindow ""}} {
|
||||
global nbEditor tree env activeProject dir
|
||||
|
||||
if [info exists activeProject] {
|
||||
@@ -351,8 +358,15 @@ namespace eval FileOper {
|
||||
set dirProject $env(HOME)
|
||||
}
|
||||
|
||||
set nbEditorItem [$nbEditor select]
|
||||
# puts "Saved editor text: $nbEditorItem"
|
||||
if {$nbEditorWindow eq ""} {
|
||||
set nbEditorWindow $nbEditor
|
||||
set str [split [focus] "."]
|
||||
set nbEditorWindow "[lindex $str 0].[lindex $str 1].[lindex $str 2]"
|
||||
# puts "FileOper::Save: current window $nbEditorWindow"
|
||||
}
|
||||
# puts "FileOper::Save: $nbEditorWindow"
|
||||
set nbEditorItem [$nbEditorWindow select]
|
||||
puts "Saved editor text: $nbEditorItem"
|
||||
if [string match "*untitled*" $nbEditorItem] {
|
||||
set filePath [tk_getSaveFile -initialdir $dirProject -filetypes $::types -parent .]
|
||||
if {$filePath eq ""} {
|
||||
@@ -360,7 +374,7 @@ namespace eval FileOper {
|
||||
}
|
||||
# set fileName [string range $filePath [expr [string last "/" $filePath]+1] end]
|
||||
set fileName [file tail $filePath]
|
||||
$nbEditor tab $nbEditorItem -text $fileName
|
||||
$nbEditorWindow tab $nbEditorItem -text $fileName
|
||||
# set treeitem [Tree::InsertItem $tree {} $filePath "file" $fileName]
|
||||
set lblName "lbl[string range $nbEditorItem [expr [string last "." $nbEditorItem] +1] end]"
|
||||
$nbEditorItem.header.$lblName configure -text $filePath
|
||||
@@ -373,10 +387,16 @@ namespace eval FileOper {
|
||||
puts -nonewline $f $editedText
|
||||
# puts "$f was saved"
|
||||
close $f
|
||||
ResetModifiedFlag $nbEditorItem $nbEditor
|
||||
ResetModifiedFlag $nbEditorItem $nbEditorWindow
|
||||
if {[file tail $filePath] eq "projman.ini"} {
|
||||
Config::read $dir(cfg)
|
||||
}
|
||||
if [string match "*untitled*" $nbEditorItem] {
|
||||
FileOper::Close
|
||||
if {$type ne "close"} {
|
||||
FileOper::Edit $filePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc SaveAll {} {
|
||||
@@ -477,6 +497,11 @@ namespace eval FileOper {
|
||||
$txt delete {end-1 line} end
|
||||
# puts ">[$txt get {end-1 line} end]<"
|
||||
}
|
||||
# ------------
|
||||
# Thanks https://github.com/wandrien/
|
||||
# https://github.com/wandrien/projman/commit/7d5539ac2031fbdcb0f4a97465ff19d0c348cf33
|
||||
$txt edit reset
|
||||
# -----------
|
||||
$txt see 1.0
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace eval Git {
|
||||
}
|
||||
if {[catch {exec {*}$cmd} git_path]} {
|
||||
puts "Git не найден в системе"
|
||||
set cfgVariables(gitCommand) "Git not found"
|
||||
set cfgVariables(gitCommand) ""
|
||||
return
|
||||
}
|
||||
set git_path [string trim $git_path]
|
||||
|
||||
19
lib/gui.tcl
19
lib/gui.tcl
@@ -25,8 +25,8 @@ bind . <Control-q> Quit
|
||||
bind . <Control-Q> Quit
|
||||
bind . <Control-Cyrillic_shorti> Quit
|
||||
bind . <Control-eacute> Quit
|
||||
bind . <Insert> Add
|
||||
bind . <Delete> Del
|
||||
# bind . <Insert> Add
|
||||
# bind . <Delete> Del
|
||||
bind . <F1> ShowHelpDialog
|
||||
bind . <Control-n> Editor::New
|
||||
bind . <Control-N> Editor::New
|
||||
@@ -62,6 +62,21 @@ bind . <Alt-Cyrillic_el> {
|
||||
}
|
||||
}
|
||||
|
||||
# -------------
|
||||
# Thanks https://github.com/wandrien/
|
||||
# https://github.com/wandrien/projman/commit/22f6e235c3532c20573d44ee7eaaaa1fb56ad544
|
||||
event add <<Copy>> <Control-Insert>
|
||||
event add <<Paste>> <Shift-Insert>
|
||||
event add <<Cut>> <Shift-Delete>
|
||||
|
||||
set latestTxtWidget {}
|
||||
bind all <FocusIn> {
|
||||
if {[winfo class %W] eq "Ctext"} {
|
||||
global latestTxtWidget
|
||||
set latestTxtWidget %W
|
||||
}
|
||||
}
|
||||
# ---------
|
||||
bind . <Control-s> {FileOper::Save}
|
||||
bind . <Control-S> {FileOper::Save}
|
||||
bind . <Control-Cyrillic_hardsign> {FileOper::Save}
|
||||
|
||||
@@ -51,7 +51,8 @@ namespace eval NB {
|
||||
return
|
||||
}
|
||||
if {[$w identify $x $y] == "close_button"} {
|
||||
FileOper::Close
|
||||
# puts "NB::PressTab: w - $w"
|
||||
FileOper::Close $w
|
||||
} else {
|
||||
set txt [$w select].frmText.t
|
||||
if [winfo exists $txt] {
|
||||
@@ -63,7 +64,12 @@ namespace eval NB {
|
||||
proc NextTab {w step} {
|
||||
global tree
|
||||
set i [expr [$w index end] - 1]
|
||||
# puts "NB::NextTab $w"
|
||||
if {[$w select] eq ""} {
|
||||
# puts "NB::NextTab no items availabels"
|
||||
if {$w eq ".frmWork.nbEditor2"} {
|
||||
.frmWork.panelNB forget .frmWork.nbEditor2
|
||||
}
|
||||
return
|
||||
}
|
||||
set nbItemIndex [$w index [$w select]]
|
||||
@@ -75,7 +81,6 @@ namespace eval NB {
|
||||
$w select [expr $nbItemIndex + $step]
|
||||
}
|
||||
set nbItem [string trimleft [$w select] "$w."]
|
||||
# puts $nbItem
|
||||
append treeItemName "file" "::" $nbItem
|
||||
Tree::SelectItem $treeItemName
|
||||
|
||||
|
||||
@@ -195,9 +195,19 @@ proc ResetModifiedFlag {w nbEditor} {
|
||||
# puts "ResetModifiedFlag: $lbl"
|
||||
$nbEditor tab $w -text $lbl
|
||||
}
|
||||
proc SetModifiedFlag {w nbEditor} {
|
||||
proc SetModifiedFlag {w nbEditor flag} {
|
||||
global modified
|
||||
#$w.frmText.t edit modified false
|
||||
# ------------
|
||||
# Thanks https://github.com/wandrien/
|
||||
# https://github.com/wandrien/projman/commit/04e5c892ae06d3e013472d292cd4435804184f6b
|
||||
if {$flag eq "force"} {
|
||||
$w.frmText.t edit modified true
|
||||
} else {
|
||||
if {![$w.frmText.t edit modified]} {
|
||||
return
|
||||
}
|
||||
}
|
||||
# ---------
|
||||
set modified($w) "true"
|
||||
set lbl [$nbEditor tab $w -text]
|
||||
# puts "SetModifiedFlag: $w; $modified($w); >$lbl<"
|
||||
@@ -828,6 +838,44 @@ proc MakeTGZ {} {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Процедура для проверки, находится ли редактирование в последней строке
|
||||
proc IsLastLine {widget} {
|
||||
set current_line [lindex [split [$widget index insert] .] 0]
|
||||
set last_line [lindex [split [$widget index end-1c] .] 0]
|
||||
return [expr {$current_line == $last_line}]
|
||||
}
|
||||
|
||||
# Процедура для проверки выделения в последней строке
|
||||
proc IsSelectionInLastLine {widget} {
|
||||
if {![$widget tag ranges sel]} {
|
||||
return 0
|
||||
}
|
||||
|
||||
set last_line [lindex [split [$widget index end-1c] .] 0]
|
||||
set sel_start_line [lindex [split [$widget index sel.first] .] 0]
|
||||
set sel_end_line [lindex [split [$widget index sel.last] .] 0]
|
||||
|
||||
return [expr {$sel_start_line == $last_line && $sel_end_line == $last_line}]
|
||||
}
|
||||
|
||||
# Процедура-обертка для проверки последней строки
|
||||
proc CheckLastLineAndRun {txt w filePath} {
|
||||
# Проверяем, находится ли курсор в последней строке
|
||||
set current_line [lindex [split [$txt index insert] .] 0]
|
||||
set last_line [lindex [split [$txt index end-1c] .] 0]
|
||||
|
||||
if {$current_line == $last_line} {
|
||||
# Разрешаем выполнение в последней строке
|
||||
$txt insert insert "\n"
|
||||
Run $w $filePath
|
||||
} else {
|
||||
# Запрещаем в других строках
|
||||
bell
|
||||
$txt mark set insert end
|
||||
}
|
||||
}
|
||||
|
||||
## MAKE PROJ PROCEDURE (RUNNING PROJECT) ##
|
||||
proc Execute {filePath w activeEditor} {
|
||||
global activeProject cfgVariables
|
||||
@@ -847,37 +895,38 @@ proc Execute {filePath w activeEditor} {
|
||||
frame $w.frame -borderwidth 2 -relief ridge -background $cfgVariables(backGround)
|
||||
pack $w.frame -side top -fill both -expand true
|
||||
|
||||
|
||||
ctext $w.frame.text -yscrollcommand "$w.frame.yscroll set" \
|
||||
set txt $w.frame.text
|
||||
ctext $txt -yscrollcommand "$w.frame.yscroll set" -linemap 0 \
|
||||
-bg $cfgVariables(backGround) -fg $cfgVariables(foreground) \
|
||||
-relief sunken -wrap word -highlightthickness 0 -font $cfgVariables(font)\
|
||||
-relief sunken -wrap word -highlightthickness 0 -font $cfgVariables(font) \
|
||||
-selectborderwidth 0 -selectbackground $cfgVariables(selectbg) -width 10 -height 10
|
||||
scrollbar $w.frame.yscroll -relief sunken -borderwidth {1} -width {10} -takefocus 0 \
|
||||
-command "$w.frame.text yview" -background $cfgVariables(backGround)
|
||||
Highlight::ExecuteColorized $w.frame.text
|
||||
|
||||
pack $w.frame.text -side left -fill both -expand true
|
||||
scrollbar $w.frame.yscroll -relief sunken -borderwidth {1} -width {10} -takefocus 0 \
|
||||
-command "$txt yview" -background $cfgVariables(backGround)
|
||||
Highlight::ExecuteColorized $txt
|
||||
|
||||
pack $txt -side left -fill both -expand true
|
||||
pack $w.frame.yscroll -side left -fill y
|
||||
|
||||
bind $w.frame.text <Return> [list Run $w $filePath]
|
||||
bind $w.frame.text <Control-r> [list CloseExecuteDialog $w $activeEditor]
|
||||
bind $w.frame.text <Control-Cyrillic_er> [list CloseExecuteDialog $w $activeEditor]
|
||||
bind $txt <Return> [list Run $w $filePath]
|
||||
bind $txt <Control-r> [list CloseExecuteDialog $w $activeEditor]
|
||||
bind $txt <Control-Cyrillic_er> [list CloseExecuteDialog $w $activeEditor]
|
||||
# focus -force $w.frmBtn.btnOk
|
||||
# $noteBook raise $node
|
||||
# insert debug data into text widget #
|
||||
$w.frame.text tag configure bold -font $cfgVariables(fontBold)
|
||||
$w.frame.text tag configure error -font $cfgVariables(fontBold) -foreground red
|
||||
$w.frame.text tag add bold 0.0 0.end
|
||||
$txt tag configure bold -font $cfgVariables(fontBold)
|
||||
$txt tag configure error -font $cfgVariables(fontBold) -foreground red
|
||||
$txt tag add bold 0.0 0.end
|
||||
|
||||
$w.frame.text insert end "[::msgcat::mc "Enter command for execute file"] $filePath >\n"
|
||||
$txt insert end "[::msgcat::mc "Enter command for execute file"] $filePath >\n"
|
||||
set pos [$w.frame.text index insert]
|
||||
set lineNum [lindex [split $pos "."] 0]
|
||||
$w.frame.text insert 0.0 "======================================================================================\n"
|
||||
|
||||
# Added executor from config
|
||||
set fileType [string toupper [string trimleft [file extension $filePath] "."]]
|
||||
if {[info exists cfgVariables(fileType)] == 0} {
|
||||
$w.frame.text insert end "$cfgVariables($fileType) "
|
||||
if {[info exists cfgVariables($fileType)] != 0 && $cfgVariables($fileType) ne ""} {
|
||||
$w.frame.text insert end "$cfgVariables($fileType) %f"
|
||||
}
|
||||
unset fileType
|
||||
# $w.frame.text insert end [string toupper [string trimleft [file extension $filePath] "."]]
|
||||
@@ -885,7 +934,70 @@ proc Execute {filePath w activeEditor} {
|
||||
|
||||
$w.frame.text tag add bold $lineNum.0 $lineNum.end
|
||||
Highlight::ExecuteColorized $w.frame.text
|
||||
|
||||
# focus -force $w.frame.text
|
||||
|
||||
# Привязки событий для защиты от редактирования
|
||||
# bind $txt <KeyPress> {
|
||||
# if {![IsLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# }
|
||||
# bind $txt <KeyPress-Return> {
|
||||
# # Разрешаем Enter только в последней строке
|
||||
# if {![IsLastLine %W]} {
|
||||
# break
|
||||
# } else {
|
||||
# list Run $w $filePath
|
||||
# }
|
||||
# }
|
||||
# bind $txt <KeyPress-Return> [list CheckLastLineAndRun $txt $w $filePath]
|
||||
#
|
||||
# bind $txt <BackSpace> {
|
||||
# if {[%W tag ranges sel] ne ""} {
|
||||
# if {![IsSelectionInLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# } else {
|
||||
# if {![IsLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# bind $txt <Delete> {
|
||||
# if {[%W tag ranges sel] ne ""} {
|
||||
# if {![IsSelectionInLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# } else {
|
||||
# if {![IsLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# # Защита от вставки
|
||||
# bind $txt <<Paste>> {
|
||||
# if {[%W tag ranges sel] ne ""} {
|
||||
# if {![IsSelectionInLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# } else {
|
||||
# if {![IsLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# # Защита от вырезания
|
||||
# bind $txt <<Cut>> {
|
||||
# if {[%W tag ranges sel] ne ""} {
|
||||
# if {![IsSelectionInLastLine %W]} {
|
||||
# break
|
||||
# }
|
||||
# } else {
|
||||
# break
|
||||
# }
|
||||
# }
|
||||
|
||||
focus -force $w.frame.text.t
|
||||
}
|
||||
|
||||
@@ -982,6 +1094,8 @@ proc SendSignal {pid signal} {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Правка файла настроек
|
||||
proc Settings {} {
|
||||
global dir
|
||||
@@ -1020,3 +1134,24 @@ proc ExecutorCommandPathSetting {fileType} {
|
||||
puts $cfgVariables($fileType)
|
||||
}
|
||||
}
|
||||
|
||||
# -----------
|
||||
# Thanks https://github.com/wandrien/
|
||||
# https://github.com/wandrien/projman/commit/22f6e235c3532c20573d44ee7eaaaa1fb56ad544
|
||||
proc SendEventToLatestTxtWidget {ev} {
|
||||
global latestTxtWidget
|
||||
if {$latestTxtWidget eq ""} {
|
||||
return
|
||||
} elseif {[winfo exists $latestTxtWidget] && [winfo class $latestTxtWidget] eq "Ctext"} {
|
||||
event generate ${latestTxtWidget}.t $ev
|
||||
} else {
|
||||
set latestTxtWidget ""
|
||||
}
|
||||
}
|
||||
|
||||
proc Cut {} { SendEventToLatestTxtWidget <<Cut>> }
|
||||
proc Copy {} { SendEventToLatestTxtWidget <<Copy>> }
|
||||
proc Paste {} { SendEventToLatestTxtWidget <<Paste>> }
|
||||
proc Undo {} { SendEventToLatestTxtWidget <<Undo>> }
|
||||
proc Redo {} { SendEventToLatestTxtWidget <<Redo>> }
|
||||
# ------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Tcl ignores the next line -*- tcl -*- \
|
||||
exec wish9.0 "$0" -- "$@"
|
||||
exec wish8.6 "$0" -- "$@"
|
||||
|
||||
######################################################
|
||||
# Tcl/Tk Project manager 2.0
|
||||
@@ -8,9 +8,9 @@ exec wish9.0 "$0" -- "$@"
|
||||
# Author: Sergey Kalinin svk@nuk-svk.ru
|
||||
# Home page: https://nuk-svk.ru
|
||||
######################################################
|
||||
# Version: 2.1.0
|
||||
# Release: alpha0
|
||||
# Build: 10112025132121
|
||||
# Version: 2.0.0
|
||||
# Release: alpha23
|
||||
# Build: 21012026130048
|
||||
######################################################
|
||||
|
||||
# определим текущую версию, релиз и т.д.
|
||||
@@ -34,7 +34,6 @@ while {[gets $f line] >=0} {
|
||||
}
|
||||
close $f
|
||||
|
||||
|
||||
package require msgcat
|
||||
package require inifile
|
||||
package require ctext
|
||||
|
||||
Reference in New Issue
Block a user