Compare commits

3 Commits

Author SHA1 Message Date
svk
3860db2c26 Новая сборка
All checks were successful
Build and Release / build (push) Successful in 20s
2026-01-30 14:10:22 +03:00
svk
bded0b22b1 Правка 2026-01-30 14:08:05 +03:00
svk
478f1d156f Добавил проверки в диалог FileOper::SaveFile 2026-01-30 14:07:14 +03:00
4 changed files with 12 additions and 5 deletions

2
debian/changelog vendored
View File

@@ -1,6 +1,7 @@
projman (2.0.0-beta3) stable; urgency=medium projman (2.0.0-beta3) stable; urgency=medium
* Добавил диалог вменю "Сохранить как" * Добавил диалог вменю "Сохранить как"
* Добавил проверки в диалог FileOper::SaveFile
* Вынес код связанный с обработкой подсказок при вводе переменных и процедур в отдельный модуль. * Вынес код связанный с обработкой подсказок при вводе переменных и процедур в отдельный модуль.
* Исправил работу со списком переменных из всплывающего окна. Теперь там можно выбрать из списка стрелками и вставить по Enter. Исправил обработку клавиш Вверх Вниз Ввод Отмена в окне со списком вариантов. * Исправил работу со списком переменных из всплывающего окна. Теперь там можно выбрать из списка стрелками и вставить по Enter. Исправил обработку клавиш Вверх Вниз Ввод Отмена в окне со списком вариантов.
@@ -495,3 +496,4 @@ projman (2.0.0-alfa0) stable; urgency=medium

View File

@@ -364,7 +364,7 @@ namespace eval FileOper {
set nbEditorWindow "[lindex $str 0].[lindex $str 1].[lindex $str 2]" set nbEditorWindow "[lindex $str 0].[lindex $str 1].[lindex $str 2]"
# puts "FileOper::Save: current window $nbEditorWindow" # puts "FileOper::Save: current window $nbEditorWindow"
} }
# puts "FileOper::Save: $nbEditorWindow"
set nbEditorItem [$nbEditorWindow select] set nbEditorItem [$nbEditorWindow select]
DebugPuts "Saved editor text: $nbEditorItem" DebugPuts "Saved editor text: $nbEditorItem"
if [string match "*untitled*" $nbEditorItem] { if [string match "*untitled*" $nbEditorItem] {
@@ -382,8 +382,13 @@ namespace eval FileOper {
set treeItem "file::[string range $nbEditorItem [expr [string last "." $nbEditorItem] +1] end ]" set treeItem "file::[string range $nbEditorItem [expr [string last "." $nbEditorItem] +1] end ]"
set filePath [Tree::GetItemID $tree $treeItem] set filePath [Tree::GetItemID $tree $treeItem]
} }
if {![winfo exists $nbEditorItem.frmText.t]} {
DebugPuts "winfo exists $nbEditorWindow.frmText.t equal [winfo exists $nbEditorWindow.frmText.t]"
return
}
set editedText [$nbEditorItem.frmText.t get 0.0 end] set editedText [$nbEditorItem.frmText.t get 0.0 end]
if {$type eq "saveas"} {set filePath [FileOper::SaveDialog]} if {$type eq "saveas"} {set filePath [FileOper::SaveDialog]}
if {$filePath eq "cancel"} {return}
DebugPuts "FileOper::Save $filePath" DebugPuts "FileOper::Save $filePath"
set f [open $filePath "w+"] set f [open $filePath "w+"]
puts -nonewline $f $editedText puts -nonewline $f $editedText
@@ -638,9 +643,10 @@ namespace eval FileOper {
set dir $env(HOME) set dir $env(HOME)
} }
set fileName [tk_getSaveFile -initialdir $dir -filetypes $::types -parent .] set fileName [tk_getSaveFile -initialdir $dir -filetypes $::types -parent .]
if {$fileName eq ""} {return "cancel"}
set fullPath [file join $dir $fileName] set fullPath [file join $dir $fileName]
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end] set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
DebugPuts "FileOper::SaveDialog $fullPath" DebugPuts "FileOper::SaveDialog $fileName $fullPath"
regsub -all "." $file "_" node regsub -all "." $file "_" node
set dir [file dirname $fullPath] set dir [file dirname $fullPath]
set file [file tail $fullPath] set file [file tail $fullPath]

View File

@@ -20,8 +20,7 @@ proc GetFileMenu {m} {
} }
$m add command -label [::msgcat::mc "Save file"] -command {FileOper::Save}\ $m add command -label [::msgcat::mc "Save file"] -command {FileOper::Save}\
-accelerator "Ctrl+S" -accelerator "Ctrl+S"
$m add command -label [::msgcat::mc "Save as"] -command {FileOper::Save saveas}\ $m add command -label [::msgcat::mc "Save as"] -command {FileOper::Save saveas}
-accelerator "Shift+Ctrl+S"
$m add command -label [::msgcat::mc "Close file"] -command {FileOper::Close}\ $m add command -label [::msgcat::mc "Close file"] -command {FileOper::Close}\
-accelerator "Ctrl+w" -accelerator "Ctrl+w"
$m add command -label [::msgcat::mc "Close all"] -command {FileOper::CloseAll} $m add command -label [::msgcat::mc "Close all"] -command {FileOper::CloseAll}

View File

@@ -10,7 +10,7 @@ exec wish8.6 "$0" -- "$@"
###################################################### ######################################################
# Version: 2.0.0 # Version: 2.0.0
# Release: beta3 # Release: beta3
# Build: 30012026134326 # Build: 30012026140811
###################################################### ######################################################
# определим текущую версию, релиз и т.д. # определим текущую версию, релиз и т.д.