Добавил диалог 'Сохранить как'
All checks were successful
Build and Release / build (push) Successful in 24s
All checks were successful
Build and Release / build (push) Successful in 24s
This commit is contained in:
1
debian/changelog
vendored
1
debian/changelog
vendored
@@ -1,5 +1,6 @@
|
|||||||
projman (2.0.0-beta3) stable; urgency=medium
|
projman (2.0.0-beta3) stable; urgency=medium
|
||||||
|
|
||||||
|
* Добавил диалог вменю "Сохранить как"
|
||||||
* Вынес код связанный с обработкой подсказок при вводе переменных и процедур в отдельный модуль.
|
* Вынес код связанный с обработкой подсказок при вводе переменных и процедур в отдельный модуль.
|
||||||
* Исправил работу со списком переменных из всплывающего окна. Теперь там можно выбрать из списка стрелками и вставить по Enter. Исправил обработку клавиш Вверх Вниз Ввод Отмена в окне со списком вариантов.
|
* Исправил работу со списком переменных из всплывающего окна. Теперь там можно выбрать из списка стрелками и вставить по Enter. Исправил обработку клавиш Вверх Вниз Ввод Отмена в окне со списком вариантов.
|
||||||
|
|
||||||
|
|||||||
@@ -745,6 +745,8 @@ namespace eval Editor {
|
|||||||
}
|
}
|
||||||
bind $txt <Control-r> "Editor::SplitEditorForExecute $w $fileType $nb "
|
bind $txt <Control-r> "Editor::SplitEditorForExecute $w $fileType $nb "
|
||||||
bind $txt <Control-Cyrillic_ka> "Editor::SplitEditorForExecute $w $fileType $nb "
|
bind $txt <Control-Cyrillic_ka> "Editor::SplitEditorForExecute $w $fileType $nb "
|
||||||
|
# bind $txt <Shift-Control-s> FileOper::Close
|
||||||
|
# bind $txt <Shift-Control-Cyrillic_es> "FileOper::Close saveas"
|
||||||
|
|
||||||
# bind $txt.t <KeyRelease> "Editor::ReleaseKey %K $txt.t $fileType"
|
# bind $txt.t <KeyRelease> "Editor::ReleaseKey %K $txt.t $fileType"
|
||||||
# bind $txt.t <KeyPress> "Editor::PressKey %K $txt.t"
|
# bind $txt.t <KeyPress> "Editor::PressKey %K $txt.t"
|
||||||
|
|||||||
@@ -383,6 +383,8 @@ namespace eval FileOper {
|
|||||||
set filePath [Tree::GetItemID $tree $treeItem]
|
set filePath [Tree::GetItemID $tree $treeItem]
|
||||||
}
|
}
|
||||||
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]}
|
||||||
|
DebugPuts "FileOper::Save $filePath"
|
||||||
set f [open $filePath "w+"]
|
set f [open $filePath "w+"]
|
||||||
puts -nonewline $f $editedText
|
puts -nonewline $f $editedText
|
||||||
# puts "$f was saved"
|
# puts "$f was saved"
|
||||||
@@ -397,7 +399,7 @@ namespace eval FileOper {
|
|||||||
Tools::GetMenu .popup.tools
|
Tools::GetMenu .popup.tools
|
||||||
Tools::GetMenu .frmMenu.mnuTools.m
|
Tools::GetMenu .frmMenu.mnuTools.m
|
||||||
}
|
}
|
||||||
if [string match "*untitled*" $nbEditorItem] {
|
if {[string match "*untitled*" $nbEditorItem] || $type eq "saveas"} {
|
||||||
FileOper::Close
|
FileOper::Close
|
||||||
if {$type ne "close"} {
|
if {$type ne "close"} {
|
||||||
FileOper::Edit $filePath
|
FileOper::Edit $filePath
|
||||||
@@ -627,5 +629,28 @@ namespace eval FileOper {
|
|||||||
# set selEnd [lindex [$txt tag ranges sel] 1]
|
# set selEnd [lindex [$txt tag ranges sel] 1]
|
||||||
# puts [$txt get [$txt tag ranges sel]]
|
# puts [$txt get [$txt tag ranges sel]]
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
proc SaveDialog {} {
|
||||||
|
global env project activeProject
|
||||||
|
if [info exists activeProject] {
|
||||||
|
set dir $activeProject
|
||||||
|
} else {
|
||||||
|
set dir $env(HOME)
|
||||||
|
}
|
||||||
|
set fileName [tk_getSaveFile -initialdir $dir -filetypes $::types -parent .]
|
||||||
|
set fullPath [file join $dir $fileName]
|
||||||
|
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
|
||||||
|
DebugPuts "FileOper::SaveDialog $fullPath"
|
||||||
|
regsub -all "." $file "_" node
|
||||||
|
set dir [file dirname $fullPath]
|
||||||
|
set file [file tail $fullPath]
|
||||||
|
set name [file rootname $file]
|
||||||
|
set ext [string range [file extension $file] 1 end]
|
||||||
|
if {$fullPath != ""} {
|
||||||
|
# puts $fullPath
|
||||||
|
return $fullPath
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -337,4 +337,3 @@ namespace eval Helper {
|
|||||||
puts "DEBUG: $msg"
|
puts "DEBUG: $msg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ 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}\
|
||||||
|
-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}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ exec wish8.6 "$0" -- "$@"
|
|||||||
######################################################
|
######################################################
|
||||||
# Version: 2.0.0
|
# Version: 2.0.0
|
||||||
# Release: beta3
|
# Release: beta3
|
||||||
# Build: 29012026155729
|
# Build: 30012026134326
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
# определим текущую версию, релиз и т.д.
|
# определим текущую версию, релиз и т.д.
|
||||||
|
|||||||
Reference in New Issue
Block a user