Fixed AutoComplite precedure for TCL/TK-projects
Added colored icon for main window Fixed "Close all" procedure if opened files from projects and file browser
This commit is contained in:
parent
91fa85203b
commit
b3da4421d8
52
CHANGELOG
52
CHANGELOG
|
@ -8,6 +8,9 @@
|
||||||
0.4.5
|
0.4.5
|
||||||
14.02.2018
|
14.02.2018
|
||||||
- Added saving main window geometry into projman.conf file when close programm
|
- Added saving main window geometry into projman.conf file when close programm
|
||||||
|
- Fixed AutoComplite precedure for TCL/TK-projects
|
||||||
|
- Added colored icon for main window
|
||||||
|
- Fixed "Close all" procedure if opened files from projects and file browser
|
||||||
|
|
||||||
13.02.2018
|
13.02.2018
|
||||||
- Added gray theme
|
- Added gray theme
|
||||||
|
@ -358,52 +361,3 @@ Fixed bug with PageRise function
|
||||||
- Fix error with select active project after creating new project
|
- Fix error with select active project after creating new project
|
||||||
- Fix small error with delete project procedure
|
- Fix small error with delete project procedure
|
||||||
- Fix uncorrect cursor position counter into editor
|
- Fix uncorrect cursor position counter into editor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
12
TODO
12
TODO
|
@ -6,16 +6,13 @@
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
1. GUI
|
1. GUI
|
||||||
- Запомнить размер и местоположение окна и при запуске соответсвенно устанавливать.
|
- Поиск процедуры по файлам проекта
|
||||||
|
|
||||||
- one click tree procedure
|
|
||||||
- added tcl-console
|
- added tcl-console
|
||||||
- added readline widget
|
- added readline widget
|
||||||
- into settings dialog
|
- into settings dialog
|
||||||
-- on/off highligttning
|
-- on/off highligttning
|
||||||
-- on/off
|
-- on/off
|
||||||
- Add color scheme
|
- Add color scheme
|
||||||
- Переключение закладок с помощью Alt+> Alt+<
|
|
||||||
- перед первой фукнцией возможность перейти в начало документа, а после последней на конец
|
- перед первой фукнцией возможность перейти в начало документа, а после последней на конец
|
||||||
документа
|
документа
|
||||||
- В статусбаре самый последнее поле (правое) где тест file saved уж
|
- В статусбаре самый последнее поле (правое) где тест file saved уж
|
||||||
|
@ -26,12 +23,7 @@
|
||||||
- rpm spec file
|
- rpm spec file
|
||||||
- deb
|
- deb
|
||||||
|
|
||||||
4. Working with release (distribute)
|
|
||||||
- ftp received
|
|
||||||
|
|
||||||
5. Working with files
|
5. Working with files
|
||||||
- open file dialog
|
|
||||||
- include internal cvs support
|
|
||||||
- search and replacement text into all projects files (ala grep)
|
- search and replacement text into all projects files (ala grep)
|
||||||
|
|
||||||
6. Working with projects
|
6. Working with projects
|
||||||
|
@ -68,5 +60,3 @@
|
||||||
поддержка frink (автоформаттер)
|
поддержка frink (автоформаттер)
|
||||||
нумерация строк
|
нумерация строк
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -383,3 +383,7 @@ proc SetVarLang {lang} {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@ proc auto_completition { widget } {
|
||||||
## by BanZaj ##
|
## by BanZaj ##
|
||||||
|
|
||||||
proc auto_completition_proc { widget } {
|
proc auto_completition_proc { widget } {
|
||||||
global procList activeProject noteBook varList
|
global procList activeProject noteBook varList wishOpList
|
||||||
set nodeEdit [$noteBook raise]
|
set nodeEdit [$noteBook raise]
|
||||||
if {$nodeEdit == "" || $nodeEdit == "newproj" || $nodeEdit == "about" || $nodeEdit == "debug"} {
|
if {$nodeEdit == "" || $nodeEdit == "newproj" || $nodeEdit == "about" || $nodeEdit == "debug"} {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
#puts $procList()
|
#puts $procList()
|
||||||
set start_word [$widget get "insert - 1 chars wordstart" insert]
|
set start_word [string tolower [$widget get "insert - 1 chars wordstart" insert]]
|
||||||
set box [$widget bbox insert]
|
set box [$widget bbox insert]
|
||||||
set box_x [expr [lindex $box 0] + [winfo rootx $widget] ]
|
set box_x [expr [lindex $box 0] + [winfo rootx $widget] ]
|
||||||
set box_y [expr [lindex $box 1] + [winfo rooty $widget] + [lindex $box 3] ]
|
set box_y [expr [lindex $box 1] + [winfo rooty $widget] + [lindex $box 3] ]
|
||||||
|
@ -55,23 +55,28 @@ proc auto_completition_proc { widget } {
|
||||||
#puts $word
|
#puts $word
|
||||||
#set list_word($start_word) 1
|
#set list_word($start_word) 1
|
||||||
#puts $varList($activeProject)
|
#puts $varList($activeProject)
|
||||||
puts $procList($activeProject)
|
#puts $procList($activeProject)
|
||||||
|
#puts [lindex $wishOpList 0]
|
||||||
if {[string index $start_word 0] == "\$"} {
|
if {[info exists procList($activeProject)]} {
|
||||||
set workList $varList($activeProject)
|
|
||||||
} else {
|
|
||||||
set workList $procList($activeProject)
|
set workList $procList($activeProject)
|
||||||
}
|
|
||||||
if [info exists workList] {
|
if [info exists workList] {
|
||||||
set len [llength $workList]
|
set len [llength $workList]
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
set i 0
|
set i 0
|
||||||
while {$len >=$i} {
|
while {$len >=$i} {
|
||||||
set line [lindex $ $i]
|
set line [lindex $workList $i]
|
||||||
scan $line "%s" word
|
scan $line "%s" word
|
||||||
if {[string match "$start_word*" $word]} {
|
if {[string match "$start_word*" [string tolower $word]]} {
|
||||||
|
set list_word($word) $i
|
||||||
|
}
|
||||||
|
incr i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set i 0
|
||||||
|
while {$i <= [llength $wishOpList]} {
|
||||||
|
set word [lindex $wishOpList $i]
|
||||||
|
if {[string match "$start_word*" [string tolower $word]]} {
|
||||||
set list_word($word) $i
|
set list_word($word) $i
|
||||||
}
|
}
|
||||||
incr i
|
incr i
|
||||||
|
@ -176,6 +181,9 @@ proc auto_completition_key { widget K A } {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,8 @@ proc Replace {text incr} {
|
||||||
}
|
}
|
||||||
## FILE OPERATION ##
|
## FILE OPERATION ##
|
||||||
proc FileDialog {tree operation} {
|
proc FileDialog {tree operation} {
|
||||||
global noteBook fontNormal fontBold fileList noteBook projDir activeProject imgDir editor
|
global noteBook noteBookFiles fontNormal fontBold
|
||||||
|
global fileList projDir activeProject imgDir editor
|
||||||
set dot "_"
|
set dot "_"
|
||||||
set types {
|
set types {
|
||||||
{"Tcl files" {.tcl}}
|
{"Tcl files" {.tcl}}
|
||||||
|
@ -565,6 +566,8 @@ proc FileDialog {tree operation} {
|
||||||
} else {
|
} else {
|
||||||
focus -force $noteBook.f$node
|
focus -force $noteBook.f$node
|
||||||
}
|
}
|
||||||
|
set tree [GetTreeForNode $node]
|
||||||
|
focus $tree
|
||||||
$tree selection set $node
|
$tree selection set $node
|
||||||
} else {
|
} else {
|
||||||
LabelUpdate .frmStatus.frmLine.lblLine ""
|
LabelUpdate .frmStatus.frmLine.lblLine ""
|
||||||
|
@ -577,6 +580,12 @@ proc FileDialog {tree operation} {
|
||||||
$noteBook raise [$noteBook page 0]
|
$noteBook raise [$noteBook page 0]
|
||||||
set nbNode [$noteBook raise]
|
set nbNode [$noteBook raise]
|
||||||
set tree [GetTreeForNode $nbNode]
|
set tree [GetTreeForNode $nbNode]
|
||||||
|
if {$tree eq ".frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles"} {
|
||||||
|
$noteBookFiles raise files
|
||||||
|
} elseif {$tree eq ".frmBody.frmCat.noteBook.fprojects.frmTree.tree"} {
|
||||||
|
$noteBookFiles raise projects
|
||||||
|
}
|
||||||
|
|
||||||
while {$nbNode != ""} {
|
while {$nbNode != ""} {
|
||||||
if {$nbNode == "newproj" || $nbNode == "settings" || $nbNode == "about" || $nbNode == "debug"} {
|
if {$nbNode == "newproj" || $nbNode == "settings" || $nbNode == "about" || $nbNode == "debug"} {
|
||||||
$noteBook delete $nbNode
|
$noteBook delete $nbNode
|
||||||
|
@ -600,6 +609,7 @@ proc FileDialog {tree operation} {
|
||||||
cancel {return cancel}
|
cancel {return cancel}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
set tree [GetTreeForNode $nbNode]
|
||||||
set nl [$tree nodes $nbNode 0 end]
|
set nl [$tree nodes $nbNode 0 end]
|
||||||
if {$nl != ""} {
|
if {$nl != ""} {
|
||||||
foreach n $nl {
|
foreach n $nl {
|
||||||
|
@ -729,15 +739,17 @@ proc _PageTab {} {
|
||||||
}
|
}
|
||||||
## RAISED NOTEBOOK TAB IF CLICK MOUSE BUTTON ##
|
## RAISED NOTEBOOK TAB IF CLICK MOUSE BUTTON ##
|
||||||
proc PageRaise {tree node} {
|
proc PageRaise {tree node} {
|
||||||
global noteBook fileList editor nodeEdit
|
global noteBook fileList editor nodeEdit noteBookFiles
|
||||||
#puts $node
|
#puts $node
|
||||||
$noteBook raise $node
|
$noteBook raise $node
|
||||||
set tree [GetTreeForNode $node]
|
set tree [GetTreeForNode $node]
|
||||||
|
if {$tree eq ".frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles"} {
|
||||||
|
$noteBookFiles raise files
|
||||||
|
} elseif {$tree eq ".frmBody.frmCat.noteBook.fprojects.frmTree.tree"} {
|
||||||
|
$noteBookFiles raise projects
|
||||||
|
}
|
||||||
|
|
||||||
set nodeEdit [$noteBook raise]
|
set nodeEdit [$noteBook raise]
|
||||||
#set nodeEdit $node
|
|
||||||
puts $node
|
|
||||||
puts $nodeEdit
|
|
||||||
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
@ -937,7 +949,7 @@ proc EditFile {tree node fileName} {
|
||||||
|
|
||||||
###################
|
###################
|
||||||
if {[regexp -nocase -all -line -- {proc (.*) \{(.*)\}} $line match procName params]} {
|
if {[regexp -nocase -all -line -- {proc (.*) \{(.*)\}} $line match procName params]} {
|
||||||
set procList($activeProject) [list $procName [string trim $params]]
|
lappend procList($activeProject) [list $procName [string trim $params]]
|
||||||
puts "proc $procName $params"
|
puts "proc $procName $params"
|
||||||
}
|
}
|
||||||
if {[regexp -nocase -all -line -- {set (\w+)} $line match varName]} {
|
if {[regexp -nocase -all -line -- {set (\w+)} $line match varName]} {
|
||||||
|
@ -1004,10 +1016,12 @@ proc EditFile {tree node fileName} {
|
||||||
bind $text <Control-igrave> "tk_textPaste $w.text;break"
|
bind $text <Control-igrave> "tk_textPaste $w.text;break"
|
||||||
bind $text <Control-v> {TextOperation paste; break}
|
bind $text <Control-v> {TextOperation paste; break}
|
||||||
|
|
||||||
bind $text <Control-adiaeresis> "auto_completition $text"
|
#bind $text <Control-adiaeresis> "auto_completition $text"
|
||||||
bind $text <Control-l> "auto_completition $text"
|
#bind $text <Control-l> "auto_completition $text"
|
||||||
bind $text <Control-icircumflex> "auto_completition_proc $text"
|
bind $text <Control-icircumflex> "auto_completition_proc $text"
|
||||||
bind $text <Control-j> "auto_completition_proc $text"
|
bind $text <Control-j> "auto_completition_proc $text"
|
||||||
|
#bind $text <Control-Tab> "auto_completition_proc $text"
|
||||||
|
|
||||||
bind $text <Control-q> Find
|
bind $text <Control-q> Find
|
||||||
bind $text <Control-comma> {TextOperation comment}
|
bind $text <Control-comma> {TextOperation comment}
|
||||||
bind $text <Control-period> {TextOperation uncomment}
|
bind $text <Control-period> {TextOperation uncomment}
|
||||||
|
@ -1256,6 +1270,13 @@ GetOp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
13
lib/main.tcl
13
lib/main.tcl
|
@ -16,6 +16,8 @@ if {[info exists topLevelGeometry]} {
|
||||||
|
|
||||||
wm title . "Tcl/Tk Project Manager $ver"
|
wm title . "Tcl/Tk Project Manager $ver"
|
||||||
wm iconname . "Tcl/Tk Project Manager $ver"
|
wm iconname . "Tcl/Tk Project Manager $ver"
|
||||||
|
image create photo icon -format png -file [file join $imgDir icons large projman.png]
|
||||||
|
wm iconphoto . icon
|
||||||
wm protocol . WM_DELETE_WINDOW Quit
|
wm protocol . WM_DELETE_WINDOW Quit
|
||||||
wm overrideredirect . 0
|
wm overrideredirect . 0
|
||||||
wm positionfrom . user
|
wm positionfrom . user
|
||||||
|
@ -393,14 +395,3 @@ $tree configure -redraw 1
|
||||||
set activeProject ""
|
set activeProject ""
|
||||||
focus -force $tree
|
focus -force $tree
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -99,3 +99,4 @@ namespace eval pane {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -906,3 +906,4 @@ proc InsertTitle {newFile type} {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -565,3 +565,4 @@ proc GetTreeForNode {node} {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ set ver "0.4.5"
|
||||||
package require BWidget
|
package require BWidget
|
||||||
package require msgcat
|
package require msgcat
|
||||||
|
|
||||||
|
set wishOpList [info commands]
|
||||||
## DO NOT EDIT THIS LINE! USE install.tcl SCRIPT ##
|
## DO NOT EDIT THIS LINE! USE install.tcl SCRIPT ##
|
||||||
set rootDir "/usr"
|
set rootDir "/usr"
|
||||||
set tclDir "/usr/bin"
|
set tclDir "/usr/bin"
|
||||||
|
@ -119,3 +120,6 @@ option add *NoteBook.fg $editor(fg) startupFile
|
||||||
option add *Listbox.foreground $editor(fg) startupFile
|
option add *Listbox.foreground $editor(fg) startupFile
|
||||||
option add *Listbox.background $editor(bg) startupFile
|
option add *Listbox.background $editor(bg) startupFile
|
||||||
option add *Scrollbar.background $editor(bg) startupFile
|
option add *Scrollbar.background $editor(bg) startupFile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user