Compare commits

...

5 Commits

4 changed files with 28 additions and 11 deletions

View File

@ -4,3 +4,6 @@
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################

4
TODO
View File

@ -20,4 +20,6 @@
- var1.yml
- var2.yml
3. Если используется роль и переменная не найдена в плэйбуке то искать в роли (не факт что требуется)
3. Если используется роль и переменная не найдена в плэйбуке то искать в роли (не факт что требуется)

View File

@ -299,11 +299,14 @@ namespace eval Git {
proc ListBoxPress {w} {
if {[$w.body.lBox curselection] ne ""} {
set fileName [$w.body.lBox get [$w.body.lBox curselection]]
if {[llength [$w.body.lBox curselection]] == 1} {
set fileName [$w.body.lBox get [$w.body.lBox curselection]]
} else {
set fileName [$w.body.lBox get [$w.body.lBox index active]]
}
} else {
return
}
# puts $values
$w.body.t delete 1.0 end
set i 0
foreach line [Git::Diff $fileName] {
@ -317,16 +320,22 @@ namespace eval Git {
}
proc CommitAdd {w} {
global activeProject cfgVariables
set fileName [$w.body.lBox get [$w.body.lBox curselection]]
# puts $values
set selectedItems [$w.body.lBox curselection]
set cmd exec
lappend cmd $cfgVariables(gitCommand)
lappend cmd "add"
lappend cmd [file join $activeProject $fileName]
foreach itemNumber [lsort -integer -increasing $selectedItems] {
set fileName [$w.body.lBox get $itemNumber]
lappend cmd [file join $activeProject $fileName]
$w.body.lCommit insert end $fileName
}
foreach itemNumber [lsort -integer -decreasing $selectedItems] {
$w.body.lBox delete $itemNumber
}
catch $cmd pipe
puts $cmd
$w.body.lCommit insert end $fileName
$w.body.lBox delete [$w.body.lBox curselection]
$w.body.t delete 1.0 end
}
proc Key {k fr} {
# puts [Editor::Key $k]
@ -531,7 +540,8 @@ namespace eval Git {
ttk::label $fr.body.lblUnindexed -justify left -padding {3 3} \
-text "[::msgcat::mc "Unindexed changes"]:"
listbox $fr.body.lBox -border 0 -yscrollcommand "$fr.body.yscroll set" -width 10
listbox $fr.body.lBox -selectmode extended -border 0 \
-yscrollcommand "$fr.body.yscroll set" -width 10
ttk::scrollbar $fr.body.yscroll -orient vertical -command "$fr.body.lBox yview"
# pack [ttk::scrollbar $fr.body.v -command "$fr.body.t yview"] -side right -fill y
@ -548,7 +558,8 @@ namespace eval Git {
ttk::label $fr.body.lblCommitText -padding {3 3} \
-text "[::msgcat::mc "Commit description"]:"
listbox $fr.body.lCommit -border 0 -yscrollcommand "$fr.body.vlCommit set"
listbox $fr.body.lCommit -selectmode multiple -border 0 \
-yscrollcommand "$fr.body.vlCommit set"
ttk::scrollbar $fr.body.vlCommit -orient vertical -command "$fr.body.lCommit yview"
ttk::scrollbar $fr.body.vCommit -command "$fr.body.tCommit yview"
# ttk::scrollbar $fr.body.hCommit -orient horizontal -command "$fr.body.tCommit xview"
@ -629,7 +640,8 @@ namespace eval Git {
bind $fr.body.lBox <Return> "Git::CommitAdd $fr"
bind $fr.body.lBox <Double-Button-1> \
"catch {Git::CommitAdd $fr; $fr.body.t delete 0.0 end; $fr.body.tCommit delete 0.0 end}"
bind $fr.body.lBox <Button-1><ButtonRelease-1> "Git::ListBoxPress $fr"
# bind $fr.body.lBox <Button-1><ButtonPress-1> "Git::ListBoxPress $fr"
bind $fr.body.lBox <<ListboxSelect>> "Git::ListBoxPress $fr"
bind $fr.body.lBox <KeyRelease> "Git::Key %K $fr"
bind $fr.body.lLog <Double-Button-1> "Git::Show $fr"

View File

@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
######################################################
# Version: 2.0.0
# Release: alpha
# Build: 15112022153646
# Build: 16112022162516
######################################################
# определим текущую версию, релиз и т.д.