Изменения в диалоге поиска

master
svkalinin 2022-09-15 12:35:05 +03:00
parent e7c4d8c95e
commit d9d071092e
4 changed files with 25 additions and 21 deletions

5
TODO
View File

@ -9,8 +9,6 @@
--- Ansible ---
1. Определение всех переменных в отдельный список
- если открыт каталог с плэйбуками
подкаталоги vars, group_vars, host_vars, файл inventory
- внутри файла, конструкции вида:
set_fact:
varName: value
@ -22,7 +20,4 @@
- var1.yml
- var2.yml
2. Внутри редактора на переменных {{ var_name }} сделать либо по наведении мыши либо по щелчку,
либо добавить ссылку на файл и где эта переменная определена
3. Если используется роль и переменная не найдена в плэйбуке то искать в роли (не факт что требуется)

View File

@ -838,6 +838,7 @@ namespace eval Editor {
}
wm geom $win +$x+$y
}
proc FindReplaceText {findString replaceString regexp} {
global nbEditor
set txt [$nbEditor select].frmText.t
@ -884,11 +885,15 @@ namespace eval Editor {
$txt tag add sel $ind $endInd
incr i
}
.finddialog.lblCounter configure -text "[::msgcat::mc "Finded"]: $i"
# set pos [$txt search $options $findString $pos end]
# $txt mark set insert $pos
$txt see $pos
if {[lindex $lstFindIndex 0] ne "" } {
$txt see [lindex $lstFindIndex 0]
}
# puts $pos
# # highlight the found word
# set line [lindex [split $pos "."] 0]
@ -917,7 +922,7 @@ namespace eval Editor {
set txt $w.frmText.t
set win .finddialog
set regexpSet ""
# set nocaseSet "-nocase"
set searchAll "-all"
if { [winfo exists $win] } { destroy $win }
toplevel $win
@ -944,7 +949,7 @@ namespace eval Editor {
-command {
puts $Editor::show($Editor::win.entryReplace)
if {$Editor::show($Editor::win.entryReplace) eq "false"} {
grid $Editor::win.entryReplace -row 1 -column 0 -columnspan 2 -sticky nsew
grid $Editor::win.entryReplace -row 1 -column 0 -columnspan 3 -sticky nsew
grid $Editor::win.bDone -row 1 -column 3 -sticky e
grid $Editor::win.bDoneAll -row 1 -column 4 -sticky e
set Editor::show($Editor::win.entryReplace) "true"
@ -955,15 +960,17 @@ namespace eval Editor {
}
ttk::checkbutton $win.chkRegexp -text "Regexp" \
-variable regexpSet -onvalue "-regexp" -offvalue ""
# ttk::checkbutton $win.chkCase -text "Case Sensitive" \
# -variable nocaseSet -onvalue "" -offvalue "-nocase"
grid $win.entryFind -row 0 -column 0 -columnspan 2 -sticky nsew
ttk::checkbutton $win.chkAll -text "All" -state disable\
-variable searchAll -onvalue "-all" -offvalue ""
ttk::label $win.lblCounter -justify right -anchor e -text ""
grid $win.entryFind -row 0 -column 0 -columnspan 3 -sticky nsew
grid $win.bForward -row 0 -column 3 -sticky e
grid $win.bBackward -row 0 -column 4 -sticky e
grid $win.bReplace -row 0 -column 5 -sticky e
grid $win.chkRegexp -row 2 -column 0 -sticky w
# grid $win.chkCase -row 2 -column 1 -sticky w
# grid $win.chkAll -row 2 -column 1 -sticky w
grid $win.lblCounter -row 2 -column 2 -sticky we
# set reqWidth [winfo reqwidth $win]
set boxX [expr [winfo rootx $w] + [expr [winfo width $nbEditor] - 350]]
@ -998,6 +1005,7 @@ namespace eval Editor {
if [winfo exists $w.frmText2] {
$w.panelTxt forget $w.frmText2
destroy $w.frmText2
focus -force $w.frmText.t.t
return
}
set frmText [Editor::EditorWidget $w $fileType]

View File

@ -77,6 +77,7 @@
::msgcat::mcset ru "File modify" "Файл изменен"
::msgcat::mcset ru "File saved" "Файл сохранен"
::msgcat::mcset ru "Find" "Найти"
::msgcat::mcset ru "Finded" "Найдено"
::msgcat::mcset ru "Find in files" "Найти в файлах"
::msgcat::mcset ru "Font normal" "Нормальный шрифт"
::msgcat::mcset ru "Font bold" "Жирный шрифт"

View File

@ -60,15 +60,17 @@ namespace eval ttk::theme::dark {
# ttk widgets.
ttk::style configure TButton \
-width -8 -padding {5 1} -relief link
-width -8 -padding {5 1} -relief link
ttk::style configure TMenubutton -relief flat -arrowsize 0
ttk::style configure TCheckbutton \
-indicatorbackground "#ffffff" -indicatormargin {1 1 4 1}
-indicatorbackground $colors(-lighter) -indicatormargin {1 1 4 1}
ttk::style configure TRadiobutton \
-indicatorbackground "#ffffff" -indicatormargin {1 1 4 1}
-indicatorbackground "#ffffff" -indicatormargin {1 1 4 1}
ttk::style configure TFrame -relief flat -border -1
# ttk::style configure TEntry -fieldbackground #ffffff -foreground #000000 -padding {2 0}
ttk::style configure TEntry -fieldbackground $colors(-lightframe) -foreground #ffffff -padding {2 0}
ttk::style configure TEntry -fieldbackground $colors(-lightframe) \
-padding {2 0}
ttk::style configure TLabel -foreground $colors(-disabledfg) \
-background $colors(-frame) -padding {2 0}
ttk::style configure TCombobox \
-fieldbackground $colors(-lightframe) \
@ -105,9 +107,7 @@ namespace eval ttk::theme::dark {
-linemapfg [list active $colors(-linemapfg)]\
-background [list active $colors(-lighter)] \
-foreground [list disabled $colors(-disabledfg)]
ttk::style configure TLabel -foreground $colors(-disabledfg) -padding {2 0}
# ttk::style configure TreeCtrl \
# -background gray30 -itembackground {gray60 gray50} \
# -itemfill #ffffff -itemaccentfill yellow