Исправлено переключение вкладок при закрытии
This commit is contained in:
parent
8402409489
commit
dbb8c3f911
|
@ -233,10 +233,13 @@ namespace eval FileOper {
|
||||||
$tree delete $treeItem
|
$tree delete $treeItem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if [info exists modified($nbItem)] {
|
||||||
unset modified($nbItem)
|
unset modified($nbItem)
|
||||||
|
}
|
||||||
.frmStatus.lblPosition configure -text ""
|
.frmStatus.lblPosition configure -text ""
|
||||||
.frmStatus.lblEncoding configure -text ""
|
.frmStatus.lblEncoding configure -text ""
|
||||||
.frmStatus.lblSize configure -text ""
|
.frmStatus.lblSize configure -text ""
|
||||||
|
NB::NextTab $nbEditor 0
|
||||||
}
|
}
|
||||||
|
|
||||||
proc Save {} {
|
proc Save {} {
|
||||||
|
@ -439,10 +442,11 @@ namespace eval FileOper {
|
||||||
set res [SearchStringInFolder $str]
|
set res [SearchStringInFolder $str]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FindInFilesDialog $txt $res
|
if [FindInFilesDialog $txt $res] {
|
||||||
.find.entryFind delete 0 end
|
.find.entryFind delete 0 end
|
||||||
.find.entryFind insert end $str
|
.find.entryFind insert end $str
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
proc ReplaceInFiles {} {
|
proc ReplaceInFiles {} {
|
||||||
global nbEditor
|
global nbEditor
|
||||||
|
|
|
@ -188,6 +188,7 @@ ttk::style layout TNotebook.Tab {
|
||||||
bind TNotebook <Button-1> "catch {NB::PressTab %W %x %y}\;[bind TNotebook <Button-1>];break"
|
bind TNotebook <Button-1> "catch {NB::PressTab %W %x %y}\;[bind TNotebook <Button-1>];break"
|
||||||
# bind <<NotebookTabChanged>> "NB::PressTab %W %x %y"
|
# bind <<NotebookTabChanged>> "NB::PressTab %W %x %y"
|
||||||
bind TNotebook <ButtonRelease-1> "NB::PressTab %W %x %y"
|
bind TNotebook <ButtonRelease-1> "NB::PressTab %W %x %y"
|
||||||
|
# bind TNotebook <Control-w> FileOper::Close
|
||||||
# bind . <Control-Tab> "NB::NextTab $nbEditor"
|
# bind . <Control-Tab> "NB::NextTab $nbEditor"
|
||||||
bind . <Control-Next> "NB::NextTab $nbEditor 1"
|
bind . <Control-Next> "NB::NextTab $nbEditor 1"
|
||||||
bind . <Control-Prior> "NB::NextTab $nbEditor -1"
|
bind . <Control-Prior> "NB::NextTab $nbEditor -1"
|
||||||
|
|
|
@ -61,6 +61,9 @@ namespace eval NB {
|
||||||
proc NextTab {w step} {
|
proc NextTab {w step} {
|
||||||
global tree
|
global tree
|
||||||
set i [expr [$w index end] - 1]
|
set i [expr [$w index end] - 1]
|
||||||
|
if {[$w select] eq ""} {
|
||||||
|
return
|
||||||
|
}
|
||||||
set nbItemIndex [$w index [$w select]]
|
set nbItemIndex [$w index [$w select]]
|
||||||
if {$nbItemIndex eq 0 && $step eq "-1"} {
|
if {$nbItemIndex eq 0 && $step eq "-1"} {
|
||||||
$w select $i
|
$w select $i
|
||||||
|
|
|
@ -511,7 +511,7 @@ proc FindInFilesDialog {txt {args ""}} {
|
||||||
}
|
}
|
||||||
set win .find
|
set win .find
|
||||||
|
|
||||||
if { [winfo exists $win] } { destroy $win }
|
if { [winfo exists $win] } { destroy $win; return false}
|
||||||
toplevel $win
|
toplevel $win
|
||||||
wm transient $win .
|
wm transient $win .
|
||||||
wm overrideredirect $win 1
|
wm overrideredirect $win 1
|
||||||
|
@ -639,6 +639,7 @@ proc FindInFilesDialog {txt {args ""}} {
|
||||||
focus -force $win.entryFind
|
focus -force $win.entryFind
|
||||||
}
|
}
|
||||||
# $win.lBox focus I001
|
# $win.lBox focus I001
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
proc ShowMessage {title msg} {
|
proc ShowMessage {title msg} {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user