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:
Sergey Kalinin 2018-02-15 16:00:22 +03:00
parent 91fa85203b
commit b3da4421d8
10 changed files with 182 additions and 207 deletions

258
CHANGELOG
View File

@ -8,6 +8,9 @@
0.4.5
14.02.2018
- 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
- Added gray theme
@ -215,195 +218,146 @@ Fixed bug with PageRise function
14/05/2002
- Fixed location help files
- Added menu support into spec
- Added menu support into spec
15/04/2002
- Changes highlight procedure - now all highlight files puts into /highlight directory and loaded automaticaly and now creation new highlight module so easy...
- Added TeX highlightning
15/04/2002
- Changes highlight procedure - now all highlight files puts into /highlight directory and loaded automaticaly and now creation new highlight module so easy...
- Added TeX highlightning
09/04/2002
- Added french localisation and Tcl help by Michel SALVAGNIAC
09/04/2002
- Added french localisation and Tcl help by Michel SALVAGNIAC
01/04/2002
- Added german localisation by Roman Schaller <r.schaller@gmx.ch>
01/04/2002
- Added german localisation by Roman Schaller <r.schaller@gmx.ch>
0.2.0 (26/03/2002)
- Added Close opened file procedure when Delete file
- Fix calling Ctags module if ctags package not installed
- Added paned windows (for changes Tree size)
- Added Close opened file procedure when Delete file
- Fix calling Ctags module if ctags package not installed
- Added paned windows (for changes Tree size)
22/03/2002
- Autocomplitition procedure (by Alexander Dederer (aka Korwin))
- Added procedure names and parameters complitition
- Changed Create New File dialog
- Fixed directory setings and created into Windows
- Added CTags support (*nix only)
- Fixed error with Pop-Up menu
- Added Edit pop-up menu into editor window
- Small fix with some keys binding
- Small fix with quit ProjMan and saved modifing files
22/03/2002
- Autocomplitition procedure (by Alexander Dederer (aka Korwin))
- Added procedure names and parameters complitition
- Changed Create New File dialog
- Fixed directory setings and created into Windows
- Added CTags support (*nix only)
- Fixed error with Pop-Up menu
- Added Edit pop-up menu into editor window
- Small fix with some keys binding
- Small fix with quit ProjMan and saved modifing files
0.1.5 (01/03/2002)
- Fix autoindent text procedure
- Include updated ducumenation (by Alex Danilov)
- Fix autoindent text procedure
- Include updated ducumenation (by Alex Danilov)
0.1.4 (20/02/2002)
- Fix some problem with Close/Open file
- Added bracket highlightning and corsor jumping for bracket!!! (by Korwin)
- Fix some problem with Close/Open file
- Added bracket highlightning and corsor jumping for bracket!!! (by Korwin)
07/02/2002
- Added refresh Tree procedure and ToolBar On/Off procedure
- Some changes menu structure
07/02/2002
- Added refresh Tree procedure and ToolBar On/Off procedure
- Some changes menu structure
05/02/2002
- Changed GUI for installiation dialog
- Added english ProjMan user manual
05/02/2002
- Changed GUI for installiation dialog
- Added english ProjMan user manual
04/02/2002
- Changes documentation structure, now documentation split by chapters and languages
- Changes Help procedure for working with new directory structure
- Include new Tcl documentation by Alexander Danilov
- Changes installiation procedure - added select Documentation language for install
- Fixed problem with encoding russian documentation in Windows OS
- Fixed problem with names like "proc::name" into Help system
- Added Tcl/Tk and BWidget english documentation
04/02/2002
- Changes documentation structure, now documentation split by chapters and languages
- Changes Help procedure for working with new directory structure
- Include new Tcl documentation by Alexander Danilov
- Changes installiation procedure - added select Documentation language for install
- Fixed problem with encoding russian documentation in Windows OS
- Fixed problem with names like "proc::name" into Help system
- Added Tcl/Tk and BWidget english documentation
0.1.3 (31/01/2002)
- Replase SelectDir on standart dialog tk_chooseDirectory
- Fixed error into TkDIFF+ with convert date procedure
- Added find history in Find dialog, and now used F3 for repeat searching
- Fixed hot keys bindings into Find (F3, Enter) and Replace (F4, Enter) dialogs
- Fixed changing "File modify" flag after successfully replaceing
- Replase SelectDir on standart dialog tk_chooseDirectory
- Fixed error into TkDIFF+ with convert date procedure
- Added find history in Find dialog, and now used F3 for repeat searching
- Fixed hot keys bindings into Find (F3, Enter) and Replace (F4, Enter) dialogs
- Fixed changing "File modify" flag after successfully replaceing
0.1.2 (29/01/2002)
- Fix error with "Close all" procedure if raised About (Debug, Settings e.t.c.) dialog
- Translate TODO on English
- Fix error with "Close all" procedure if raised About (Debug, Settings e.t.c.) dialog
- Translate TODO on English
24/01/2002
- Added mouse wheel support on Tree widget (by Korwin)
- Added "editor.conf" for change editor preferences and source highlightning colors
24/01/2002
- Added mouse wheel support on Tree widget (by Korwin)
- Added "editor.conf" for change editor preferences and source highlightning colors
0.1.1 (23/01/2002)
- Fix correct cursor position viewed
- Added highlightning comments like ";#" (by Korwin)
- Fix correct cursor position viewed
- Added highlightning comments like ";#" (by Korwin)
22/01/2002
- Added raised notebook tab when click mouse on opened file name
- Fix correct windows path to tcl interpritator into Project Setting dialog
- Added TkREGEXP module (aka VisualREGEXP) from Laurent Riesterer
- Added new diff'ing module TkDIFF+ (with compare dirrectoryes) from Laurent Riesterer
- Added TkREGEXP and TkDIFF+ documentation
22/01/2002
- Added raised notebook tab when click mouse on opened file name
- Fix correct windows path to tcl interpritator into Project Setting dialog
- Added TkREGEXP module (aka VisualREGEXP) from Laurent Riesterer
- Added new diff'ing module TkDIFF+ (with compare dirrectoryes) from Laurent Riesterer
- Added TkREGEXP and TkDIFF+ documentation
19/01/2002
- Fix callback links procedure into help system (thanks Dederer)
19/01/2002
- Fix callback links procedure into help system (thanks Dederer)
0.1.0 (17/01/2002)
- Added graphical installiation
- Corrected path for work in windows
- Added graphical installiation
- Corrected path for work in windows
16/01/2002
- Fix error with create and select directory into install.tcl
- Some Windows bugs fix
- Add invoke tkDiff for one or two selected files
- Add saved all files before run project
16/01/2002
- Fix error with create and select directory into install.tcl
- Some Windows bugs fix
- Add invoke tkDiff for one or two selected files
- Add saved all files before run project
0.0.19 (15/01/2002)
- Add "Select Directory" procedure into settings page
- Add "Open project" procedure for adding existing project
- Add invoke TkCVS for Active project
- Fix error with open files with names like "some.file.name"
- Code cleaning
- Add "Select Directory" procedure into settings page
- Add "Open project" procedure for adding existing project
- Add invoke TkCVS for Active project
- Fix error with open files with names like "some.file.name"
- Code cleaning
14/01/2001
- Add close window procedure into "Settings" and "Project Settings" dialog
after pushed "Save" button
14/01/2001
- Add close window procedure into "Settings" and "Project Settings" dialog
after pushed "Save" button
0.0.17 (11/01/2002)
- Fix error with "New file" in new project procedure
- Fix small errors
- Fix error with "New file" in new project procedure
- Fix small errors
10/01/2002
- Replaced hotkey "Ctrl-T" with "Ctrl-M". And now "Control-T" reverses the order of the two
characters to the right of the insertion cursor.
- Fix small bug
10/01/2002
- Replaced hotkey "Ctrl-T" with "Ctrl-M". And now "Control-T" reverses the order of the two
characters to the right of the insertion cursor.
- Fix small bug
09/01/2002
- Added "Interface Language" select procedure into "Settings" dialog
- Fix error with close opening and modifing file procedure
- Fix read procedure with names "Proc::Name" and "Proc_name"
- Fix Insert/Overwrite editor mode
09/01/2002
- Added "Interface Language" select procedure into "Settings" dialog
- Fix error with close opening and modifing file procedure
- Fix read procedure with names "Proc::Name" and "Proc_name"
- Fix Insert/Overwrite editor mode
08/01/2002
- Fix error in notebook with mouse button click
- Changes mouse click procedure in Tree widget
08/01/2002
- Fix error in notebook with mouse button click
- Changes mouse click procedure in Tree widget
07/01/2002
- Added "Print file" command
- Added "Print Selected text" command
- Fix error with "Save Setting" procedure (CheckBox verify)
- Fix error with "Find dialog" "Replace dialog", e.t.c. if no files opened
- Added "Editor font" option
07/01/2002
- Added "Print file" command
- Added "Print Selected text" command
- Fix error with "Save Setting" procedure (CheckBox verify)
- Fix error with "Find dialog" "Replace dialog", e.t.c. if no files opened
- Added "Editor font" option
04/01/2002
- Fixed many small bugs
- Fix error with Ctrl+T keys
- Fix error with "Save As" procedure
04/01/2002
- Fixed many small bugs
- Fix error with Ctrl+T keys
- Fix error with "Save As" procedure
03/01/2002
- Added THANKS file, and view this into About window
- Fix problem with execute external browser from About window
- Fix create new text file in "Add To Project" dialog
- Fix some errors in MakeRPM procedure, but not working yet :(
03/01/2002
- Added THANKS file, and view this into About window
- Fix problem with execute external browser from About window
- Fix create new text file in "Add To Project" dialog
- Fix some errors in MakeRPM procedure, but not working yet :(
- Fix error with select active project after creating new project
- Fix small error with delete project procedure
- Fix uncorrect cursor position counter into editor

12
TODO
View File

@ -6,16 +6,13 @@
##########################################################
1. GUI
- Запомнить размер и местоположение окна и при запуске соответсвенно устанавливать.
- one click tree procedure
- Поиск процедуры по файлам проекта
- added tcl-console
- added readline widget
- into settings dialog
-- on/off highligttning
-- on/off
- Add color scheme
- Переключение закладок с помощью Alt+> Alt+<
- перед первой фукнцией возможность перейти в начало документа, а после последней на конец
документа
- В статусбаре самый последнее поле (правое) где тест file saved уж
@ -26,12 +23,7 @@
- rpm spec file
- deb
4. Working with release (distribute)
- ftp received
5. Working with files
- open file dialog
- include internal cvs support
- search and replacement text into all projects files (ala grep)
6. Working with projects
@ -68,5 +60,3 @@
поддержка frink (автоформаттер)
нумерация строк

View File

@ -383,3 +383,7 @@ proc SetVarLang {lang} {

View File

@ -36,13 +36,13 @@ proc auto_completition { widget } {
## by BanZaj ##
proc auto_completition_proc { widget } {
global procList activeProject noteBook varList
global procList activeProject noteBook varList wishOpList
set nodeEdit [$noteBook raise]
if {$nodeEdit == "" || $nodeEdit == "newproj" || $nodeEdit == "about" || $nodeEdit == "debug"} {
return
}
#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_x [expr [lindex $box 0] + [winfo rootx $widget] ]
set box_y [expr [lindex $box 1] + [winfo rooty $widget] + [lindex $box 3] ]
@ -55,23 +55,28 @@ proc auto_completition_proc { widget } {
#puts $word
#set list_word($start_word) 1
#puts $varList($activeProject)
puts $procList($activeProject)
if {[string index $start_word 0] == "\$"} {
set workList $varList($activeProject)
} else {
#puts $procList($activeProject)
#puts [lindex $wishOpList 0]
if {[info exists procList($activeProject)]} {
set workList $procList($activeProject)
}
if [info exists workList] {
set len [llength $workList]
} else {
return
}
set i 0
while {$len >=$i} {
set line [lindex $ $i]
set line [lindex $workList $i]
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
}
incr i
@ -176,6 +181,9 @@ proc auto_completition_key { widget K A } {

View File

@ -366,7 +366,8 @@ proc Replace {text incr} {
}
## FILE 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 types {
{"Tcl files" {.tcl}}
@ -565,6 +566,8 @@ proc FileDialog {tree operation} {
} else {
focus -force $noteBook.f$node
}
set tree [GetTreeForNode $node]
focus $tree
$tree selection set $node
} else {
LabelUpdate .frmStatus.frmLine.lblLine ""
@ -577,6 +580,12 @@ proc FileDialog {tree operation} {
$noteBook raise [$noteBook page 0]
set nbNode [$noteBook raise]
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 != ""} {
if {$nbNode == "newproj" || $nbNode == "settings" || $nbNode == "about" || $nbNode == "debug"} {
$noteBook delete $nbNode
@ -600,6 +609,7 @@ proc FileDialog {tree operation} {
cancel {return cancel}
}
}
set tree [GetTreeForNode $nbNode]
set nl [$tree nodes $nbNode 0 end]
if {$nl != ""} {
foreach n $nl {
@ -729,15 +739,17 @@ proc _PageTab {} {
}
## RAISED NOTEBOOK TAB IF CLICK MOUSE BUTTON ##
proc PageRaise {tree node} {
global noteBook fileList editor nodeEdit
global noteBook fileList editor nodeEdit noteBookFiles
#puts $node
$noteBook raise $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 $node
puts $node
puts $nodeEdit
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
return
} else {
@ -937,7 +949,7 @@ proc EditFile {tree node fileName} {
###################
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"
}
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-v> {TextOperation paste; break}
bind $text <Control-adiaeresis> "auto_completition $text"
bind $text <Control-l> "auto_completition $text"
#bind $text <Control-adiaeresis> "auto_completition $text"
#bind $text <Control-l> "auto_completition $text"
bind $text <Control-icircumflex> "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-comma> {TextOperation comment}
bind $text <Control-period> {TextOperation uncomment}
@ -1256,6 +1270,13 @@ GetOp

View File

@ -16,6 +16,8 @@ if {[info exists topLevelGeometry]} {
wm title . "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 overrideredirect . 0
wm positionfrom . user
@ -393,14 +395,3 @@ $tree configure -redraw 1
set activeProject ""
focus -force $tree

View File

@ -99,3 +99,4 @@ namespace eval pane {

View File

@ -906,3 +906,4 @@ proc InsertTitle {newFile type} {

View File

@ -565,3 +565,4 @@ proc GetTreeForNode {node} {
}

View File

@ -15,6 +15,7 @@ set ver "0.4.5"
package require BWidget
package require msgcat
set wishOpList [info commands]
## DO NOT EDIT THIS LINE! USE install.tcl SCRIPT ##
set rootDir "/usr"
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.background $editor(bg) startupFile
option add *Scrollbar.background $editor(bg) startupFile