GoToLine procedure tuning

0.4.6
Sergey Kalinin 2018-02-24 20:08:03 +03:00
parent 823591ae92
commit ea76af25d6
5 changed files with 24 additions and 12 deletions

View File

@ -14,7 +14,7 @@
#######################################################################
proc balloon { widget action args } {
global BALLOON
global BALLOON fontNormal
switch -- $action {
set {
@ -34,7 +34,8 @@ proc balloon { widget action args } {
array set attrFont [font actual fixed]
set attrFont(-size) [expr $attrFont(-size) - 2]
eval pack [message .bubble.txt -aspect 5000 -bg lightyellow \
-font [array get attrFont] -text [lindex $args 0]]
-font $fontNormal -text [lindex $args 0]]
#-font [array get attrFont] -text [lindex $args 0]]
pack .bubble.txt
wm transient .bubble .
wm overrideredirect .bubble 1
@ -77,3 +78,4 @@ proc raise_balloon {widget text} {
update
} ;# proc raise_balloon

View File

@ -98,7 +98,13 @@ proc OverWrite {} {
## GOTO LINE DIALOG FORM ##
proc GoToLine {} {
global noteBook fileList fontNormal
# toolbar entry used #######
focus .frmTool.frmGoto.entGoTo
.frmTool.frmGoto.entGoTo delete 0 end
return
#############################
set node [$noteBook raise]
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == ""} {
return
}
@ -654,7 +660,7 @@ proc EditFile {tree node fileName} {
}
bind $text <Control-idiaeresis> GoToLine
#bind $text <Control-g> GoToLine
bind $text <Control-g> {focus .frmTool.frmGoto.entGoTo}
bind $text <Control-g> {focus .frmTool.frmGoto.entGoTo; .frmTool.frmGoto.entGoTo delete 0 end}
bind $text <Control-agrave> Find
bind $text <Control-f> Find
bind $text <F3> {FindNext $w.text 1}
@ -966,5 +972,3 @@ proc ReadFileStructure {mod line lineNumber tree node} {
GetOp

View File

@ -424,3 +424,4 @@ if {[info exists workingProject]} {
}

View File

@ -1,4 +1,4 @@
######################################################
######################################################
# Tcl/Tk Project Manager
# Distributed under GNU Public License
# Author: Sergey Kalinin banzaj28@yandex.ru
@ -79,16 +79,18 @@ proc GetMenu {m} {
-command {TextOperation uncomment}
$m add separator
$m add command -label [::msgcat::mc "Goto line"] -command GoToLine -font $fontNormal\
-accelerator "Ctrl+G"
$m add command -label [::msgcat::mc "Goto line"] -command GoToLine -font $fontNormal -accelerator "Ctrl+g"
$m add separator
$m add command -label [::msgcat::mc "Find"] -command Find -font $fontNormal -accelerator "Ctrl+F"
$m add command -label [::msgcat::mc "Replace"] -command ReplaceDialog -font $fontNormal\
-accelerator "Ctrl+R"
$m add cascade -label [::msgcat::mc "Encode"] -menu $m.encode -font $fontNormal
set me [menu $m.encode -bg $editor(bg) -fg $editor(fg)]
$me add command -label [::msgcat::mc "KOI8-R"] -command {TextEncode koi8-r} -font $fontNormal
$me add command -label [::msgcat::mc "CP1251"] -command {TextEncode cp1251} -font $fontNormal
$me add command -label [::msgcat::mc "CP866"] -command {TextEncode cp866} -font $fontNormal
set me [menu $m.encode -bg $editor(bg) -fg $editor(fg)]
$me add command -label [::msgcat::mc "KOI8-R"] -command {TextEncode koi8-r} -font $fontNormal
$me add command -label [::msgcat::mc "CP1251"] -command {TextEncode cp1251} -font $fontNormal
$me add command -label [::msgcat::mc "CP866"] -command {TextEncode cp866} -font $fontNormal
}

View File

@ -70,7 +70,10 @@ proc GoToLineButton {w} {
-bg $editor(bg) -fg $editor(fg)
pack $w.text $w.entGoTo -side left -anchor nw -padx 2 -pady 2
bind $w.entGoTo <Return> "+ToolBarGoToLineNumber $w"
balloon $w.entGoTo set [::msgcat::mc "Goto line"]
}