Refactoring "Add New Projects" "Project Settings" (e.t.c.) dialogs
Added "Add as new project" dialog for file browser Add popup menu for file browser Fixed some highlight bug
This commit is contained in:
parent
8d4b0c91a8
commit
75f9860f63
|
@ -6,6 +6,12 @@
|
|||
#########################################################
|
||||
|
||||
0.4.5
|
||||
17.02.2018
|
||||
- Refactoring "Add New Projects" "Project Settings" (e.t.c.) dialogs
|
||||
- Added "Add as new project" dialog for file browser
|
||||
- Add popup menu for file browser
|
||||
- Fixed some highlight bug
|
||||
|
||||
14.02.2018
|
||||
- Added saving main window geometry into projman.conf file when close programm
|
||||
- Fixed AutoComplite precedure for TCL/TK-projects
|
||||
|
@ -366,3 +372,4 @@ characters to the right of the insertion cursor.
|
|||
- Fix uncorrect cursor position counter into editor
|
||||
|
||||
|
||||
|
||||
|
|
291
lib/editor.tcl
291
lib/editor.tcl
|
@ -364,296 +364,6 @@ proc Replace {text incr} {
|
|||
}
|
||||
# focus -force .replace
|
||||
}
|
||||
## FILE OPERATION ##
|
||||
proc FileDialog {tree operation} {
|
||||
global noteBook noteBookFiles fontNormal fontBold
|
||||
global fileList projDir activeProject imgDir editor
|
||||
set dot "_"
|
||||
set types {
|
||||
{"Tcl files" {.tcl}}
|
||||
{"Tk files" {.tk}}
|
||||
{"Rivet files" {.rvt}}
|
||||
{"TclHttpd Template" {.tml}}
|
||||
{"Sql files" {.sql}}
|
||||
{"Html files" {.html}}
|
||||
{"Text files" {.txt}}
|
||||
{"JAVA files" {.java}}
|
||||
{"PERL files" {.pl}}
|
||||
{"PHP files" {.php}}
|
||||
{"FORTRAN files" {.for}}
|
||||
{"CAML or ML files" {.ml}}
|
||||
{"CAML or ML interface files" {.mli}}
|
||||
{"Ruby files" {.rb}}
|
||||
{"Text files" {} TEXT}
|
||||
{"All files" *}
|
||||
}
|
||||
|
||||
|
||||
if {$operation == "open"} {
|
||||
set dir $projDir
|
||||
set fullPath [tk_getOpenFile -initialdir $dir -filetypes $types -parent $noteBook]
|
||||
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
|
||||
regsub -all "." $file "_" node
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set name [file rootname $file]
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
set node "$name$dot$ext"
|
||||
EditFile $tree $node $fullPath
|
||||
return 1
|
||||
} elseif {$operation == "delete"} {
|
||||
set node [$tree selection get]
|
||||
set fullPath [$tree itemcget $node -data]
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set answer [tk_messageBox -message "[::msgcat::mc "Delete file"] \"$file\"?"\
|
||||
-type yesno -icon question -default yes]
|
||||
case $answer {
|
||||
yes {
|
||||
FileDialog $tree close
|
||||
file delete -force "$fullPath"
|
||||
$tree delete $node
|
||||
$tree configure -redraw 1
|
||||
return 0
|
||||
}
|
||||
}
|
||||
} elseif {$operation == "close"} {
|
||||
set node [$noteBook raise]
|
||||
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
||||
$noteBook delete $node
|
||||
set node [$noteBook raise]
|
||||
return
|
||||
} else {
|
||||
if {$node == ""} {return}
|
||||
if {[info exists fileList($node)] == 0} {return}
|
||||
set fullPath [lindex $fileList($node) 0]
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set text "$noteBook.f$node.text"
|
||||
}
|
||||
} elseif {$operation == "close" && [info exists files] == 0} {
|
||||
return
|
||||
} else {
|
||||
set node [$noteBook raise]
|
||||
puts $node
|
||||
if {$node == ""} {return}
|
||||
if {[info exists fileList($node)] == 0} {return}
|
||||
set fullPath [lindex $fileList($node) 0]
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set text "$noteBook.f$node.text"
|
||||
}
|
||||
set name [file rootname $file]
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
set treeSubNode "$name$dot$ext"
|
||||
|
||||
set img [GetImage $file]
|
||||
|
||||
if {$operation == "open"} {
|
||||
set fullPath [tk_getOpenFile -initialdir $dir -filetypes $types -parent $noteBook]
|
||||
puts $fullPath
|
||||
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
|
||||
|
||||
regsub -all "." $file "_" node
|
||||
$noteBook insert end $node -text "$file"
|
||||
EditFile $node $fullPath
|
||||
} elseif {$operation == "save"} {
|
||||
if {$name == "untitled"} {
|
||||
set file [tk_getSaveFile -initialdir $dir -filetypes \
|
||||
$types -parent $text -initialfile $file \
|
||||
-defaultextension .$ext]
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open "$file" "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
file delete [file join $dir $name.$ext]
|
||||
#$tree delete $treeSubNode
|
||||
unset fileList($node)
|
||||
# change data into tree and notebook
|
||||
set dir [file dirname $file]
|
||||
set file [file tail $file]
|
||||
set name [file rootname $file]
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
$tree itemconfigure $treeSubNode -text $name
|
||||
set treeSubNode "$activeProject$dot$name$dot$ext"
|
||||
|
||||
#$tree insert end $activeProject $treeSubNode -text "$file" \
|
||||
#-data "[file join $dir $file]" -open 1\
|
||||
#-image [Bitmap::get [file join $imgDir $img.gif]]\
|
||||
#-font $fontNormal
|
||||
set nbNode [$noteBook raise]
|
||||
$noteBook itemconfigure $nbNode -text $file
|
||||
set fileList($nbNode) [list $file 0]
|
||||
} else {
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open [file join $dir $file] "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
EditFlag $node [file join $dir $file] 0
|
||||
}
|
||||
} elseif {$operation == "save_all"} {
|
||||
set i 0
|
||||
set nodeList [$noteBook pages 0 end]
|
||||
set length [llength $nodeList]
|
||||
while {$i < $length} {
|
||||
set nbNode [lindex $nodeList $i]
|
||||
if {[info exists fileList($nbNode)] == 1} {
|
||||
set text "$noteBook.f$nbNode.text"
|
||||
set savedFile [lindex $fileList($nbNode) 0]
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open [file join $dir $savedFile] "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
EditFlag $nbNode [file join $dir $savedFile] 0
|
||||
}
|
||||
incr i
|
||||
}
|
||||
} elseif {$operation == "close"} {
|
||||
# delete file name from fileList array #
|
||||
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
||||
$noteBook delete $node
|
||||
set node [$noteBook raise]
|
||||
return
|
||||
}
|
||||
set tree [GetTreeForNode $node]
|
||||
set editFlag [lindex $fileList($node) 1]
|
||||
set closedFile [file tail [lindex $fileList($node) 0]]
|
||||
if {$editFlag == 1} {
|
||||
set answer [tk_messageBox\
|
||||
-message "$closedFile [::msgcat::mc "File was modifyed. Save?"]"\
|
||||
-type yesnocancel -icon warning\
|
||||
-title [::msgcat::mc "Warning"]]
|
||||
case $answer {
|
||||
yes {
|
||||
FileDialog $tree save
|
||||
# FileDialog close
|
||||
}
|
||||
no {
|
||||
set index 0
|
||||
|
||||
set nl [$tree nodes $node 0 end]
|
||||
if {$nl != ""} {
|
||||
foreach n $nl {
|
||||
$tree delete $n
|
||||
}
|
||||
}
|
||||
$noteBook delete $node
|
||||
unset fileList($node)
|
||||
$noteBook raise [$noteBook page $index]
|
||||
set node [$noteBook raise]
|
||||
}
|
||||
cancel {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
set index 0
|
||||
set nl [$tree nodes $node 0 end]
|
||||
if {$nl != ""} {
|
||||
foreach n $nl {
|
||||
$tree delete $n
|
||||
}
|
||||
}
|
||||
#puts $node
|
||||
$noteBook delete $node
|
||||
unset fileList($node)
|
||||
$noteBook raise [$noteBook page $index]
|
||||
set node [$noteBook raise]
|
||||
}
|
||||
if {$node != ""} {
|
||||
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
||||
$noteBook delete $node
|
||||
} else {
|
||||
focus -force $noteBook.f$node
|
||||
}
|
||||
set tree [GetTreeForNode $node]
|
||||
focus $tree
|
||||
$tree selection set $node
|
||||
} else {
|
||||
LabelUpdate .frmStatus.frmLine.lblLine ""
|
||||
LabelUpdate .frmStatus.frmFile.lblFile ""
|
||||
LabelUpdate .frmStatus.frmOvwrt.lblOvwrt ""
|
||||
LabelUpdate .frmStatus.frmProgress.lblProgress ""
|
||||
}
|
||||
} elseif {$operation == "close_all"} {
|
||||
set nodeList [$noteBook pages 0 end]
|
||||
$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
|
||||
$noteBook raise [$noteBook page 0]
|
||||
set nbNode [$noteBook raise]
|
||||
}
|
||||
if {[info exists fileList($nbNode)] == 1} {
|
||||
set editFlag [lindex $fileList($nbNode) 1]
|
||||
if {$editFlag == 1} {
|
||||
set f [lindex $fileList($nbNode) 0]
|
||||
set f [file tail $f]
|
||||
set answer [tk_messageBox\
|
||||
-message "$f [::msgcat::mc "File was modifyed. Save?"]"\
|
||||
-type yesnocancel -icon warning\
|
||||
-title [::msgcat::mc "Warning"]]
|
||||
case $answer {
|
||||
yes {
|
||||
FileDialog $tree save
|
||||
}
|
||||
no {}
|
||||
cancel {return cancel}
|
||||
}
|
||||
}
|
||||
set tree [GetTreeForNode $nbNode]
|
||||
set nl [$tree nodes $nbNode 0 end]
|
||||
if {$nl != ""} {
|
||||
foreach n $nl {
|
||||
$tree delete $n
|
||||
}
|
||||
}
|
||||
$noteBook delete $nbNode
|
||||
$noteBook raise [$noteBook page 0]
|
||||
unset fileList($nbNode)
|
||||
set nbNode [$noteBook raise]
|
||||
}
|
||||
}
|
||||
LabelUpdate .frmStatus.frmLine.lblLine ""
|
||||
LabelUpdate .frmStatus.frmFile.lblFile ""
|
||||
LabelUpdate .frmStatus.frmOvwrt.lblOvwrt ""
|
||||
|
||||
} elseif {$operation == "save_as"} {
|
||||
set file [tk_getSaveFile -initialdir $dir -filetypes \
|
||||
$types -parent $text -initialfile $file]
|
||||
if {$file != ""} {
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open $file "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
set dir [file dirname $file]
|
||||
set file [file tail $file]
|
||||
set name [string range $file 0 [expr [string last "." $file]-1]]
|
||||
if {[string last "." $file] == -1} {
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
} else {
|
||||
set ext ""
|
||||
}
|
||||
set treeSubNode "$activeProject$dot$name$dot$ext"
|
||||
$tree insert end $activeProject $treeSubNode -text "$file" \
|
||||
-data "[file join $dir $file]" -open 1\
|
||||
-image [Bitmap::get [file join $imgDir $img.gif]]\
|
||||
-font $fontNormal
|
||||
set nbNode [$noteBook raise]
|
||||
$noteBook itemconfigure $nbNode -text $file
|
||||
set fileList($nbNode) [list $file 0]
|
||||
}
|
||||
return 0
|
||||
}
|
||||
}
|
||||
## COMPLITE PRODEDURE AND OPERATOR ##
|
||||
proc OpComplite {text fileExt node} {
|
||||
global opList autoFormat fileList
|
||||
|
@ -1285,5 +995,6 @@ GetOp
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,303 @@
|
|||
# Author: Sergey Kalinin s.v.kalinin28@gmail.com
|
||||
# Copyright (c) "https://nuk-svk.ru", 2018, https://bitbucket.org/svk28/projman
|
||||
######################################################
|
||||
|
||||
## FILE OPERATION ##
|
||||
proc FileDialog {nbNode operation} {
|
||||
global noteBook noteBookFiles fontNormal fontBold
|
||||
global fileList projDir activeProject imgDir editor
|
||||
set dot "_"
|
||||
set types {
|
||||
{"Tcl files" {.tcl}}
|
||||
{"Tk files" {.tk}}
|
||||
{"Rivet files" {.rvt}}
|
||||
{"TclHttpd Template" {.tml}}
|
||||
{"Sql files" {.sql}}
|
||||
{"Html files" {.html}}
|
||||
{"Text files" {.txt}}
|
||||
{"JAVA files" {.java}}
|
||||
{"PERL files" {.pl}}
|
||||
{"PHP files" {.php}}
|
||||
{"FORTRAN files" {.for}}
|
||||
{"CAML or ML files" {.ml}}
|
||||
{"CAML or ML interface files" {.mli}}
|
||||
{"Ruby files" {.rb}}
|
||||
{"Text files" {} TEXT}
|
||||
{"All files" *}
|
||||
}
|
||||
if {$nbNode eq "files"} {
|
||||
set tree .frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles
|
||||
} elseif {$nbNode eq "projects"} {
|
||||
set tree .frmBody.frmCat.noteBook.fprojects.frmTree.tree
|
||||
}
|
||||
|
||||
if {$operation == "open"} {
|
||||
set dir $projDir
|
||||
set fullPath [tk_getOpenFile -initialdir $dir -filetypes $types -parent $noteBook]
|
||||
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
|
||||
regsub -all "." $file "_" node
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set name [file rootname $file]
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
set node "$name$dot$ext"
|
||||
EditFile $tree $node $fullPath
|
||||
return 1
|
||||
} elseif {$operation == "delete"} {
|
||||
set node [$tree selection get]
|
||||
set fullPath [$tree itemcget $node -data]
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set answer [tk_messageBox -message "[::msgcat::mc "Delete file"] \"$file\"?"\
|
||||
-type yesno -icon question -default yes]
|
||||
case $answer {
|
||||
yes {
|
||||
FileDialog $tree close
|
||||
file delete -force "$fullPath"
|
||||
$tree delete $node
|
||||
$tree configure -redraw 1
|
||||
return 0
|
||||
}
|
||||
}
|
||||
} elseif {$operation == "close"} {
|
||||
set node [$noteBook raise]
|
||||
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
||||
$noteBook delete $node
|
||||
set node [$noteBook raise]
|
||||
return
|
||||
} else {
|
||||
if {$node == ""} {return}
|
||||
if {[info exists fileList($node)] == 0} {return}
|
||||
set fullPath [lindex $fileList($node) 0]
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set text "$noteBook.f$node.text"
|
||||
}
|
||||
} elseif {$operation == "close" && [info exists files] == 0} {
|
||||
return
|
||||
} else {
|
||||
set node [$noteBook raise]
|
||||
puts $node
|
||||
if {$node == ""} {return}
|
||||
if {[info exists fileList($node)] == 0} {return}
|
||||
set fullPath [lindex $fileList($node) 0]
|
||||
set dir [file dirname $fullPath]
|
||||
set file [file tail $fullPath]
|
||||
set text "$noteBook.f$node.text"
|
||||
}
|
||||
set name [file rootname $file]
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
set treeSubNode "$name$dot$ext"
|
||||
|
||||
set img [GetImage $file]
|
||||
|
||||
if {$operation == "open"} {
|
||||
set fullPath [tk_getOpenFile -initialdir $dir -filetypes $types -parent $noteBook]
|
||||
puts $fullPath
|
||||
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
|
||||
|
||||
regsub -all "." $file "_" node
|
||||
$noteBook insert end $node -text "$file"
|
||||
EditFile $node $fullPath
|
||||
} elseif {$operation == "save"} {
|
||||
if {$name == "untitled"} {
|
||||
set file [tk_getSaveFile -initialdir $dir -filetypes \
|
||||
$types -parent $text -initialfile $file \
|
||||
-defaultextension .$ext]
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open "$file" "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
file delete [file join $dir $name.$ext]
|
||||
#$tree delete $treeSubNode
|
||||
unset fileList($node)
|
||||
# change data into tree and notebook
|
||||
set dir [file dirname $file]
|
||||
set file [file tail $file]
|
||||
set name [file rootname $file]
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
$tree itemconfigure $treeSubNode -text $name
|
||||
set treeSubNode "$activeProject$dot$name$dot$ext"
|
||||
|
||||
#$tree insert end $activeProject $treeSubNode -text "$file" \
|
||||
#-data "[file join $dir $file]" -open 1\
|
||||
#-image [Bitmap::get [file join $imgDir $img.gif]]\
|
||||
#-font $fontNormal
|
||||
set nbNode [$noteBook raise]
|
||||
$noteBook itemconfigure $nbNode -text $file
|
||||
set fileList($nbNode) [list $file 0]
|
||||
} else {
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open [file join $dir $file] "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
EditFlag $node [file join $dir $file] 0
|
||||
}
|
||||
} elseif {$operation == "save_all"} {
|
||||
set i 0
|
||||
set nodeList [$noteBook pages 0 end]
|
||||
set length [llength $nodeList]
|
||||
while {$i < $length} {
|
||||
set nbNode [lindex $nodeList $i]
|
||||
if {[info exists fileList($nbNode)] == 1} {
|
||||
set text "$noteBook.f$nbNode.text"
|
||||
set savedFile [lindex $fileList($nbNode) 0]
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open [file join $dir $savedFile] "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
EditFlag $nbNode [file join $dir $savedFile] 0
|
||||
}
|
||||
incr i
|
||||
}
|
||||
} elseif {$operation == "close"} {
|
||||
# delete file name from fileList array #
|
||||
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
||||
$noteBook delete $node
|
||||
set node [$noteBook raise]
|
||||
return
|
||||
}
|
||||
set tree [GetTreeForNode $node]
|
||||
set editFlag [lindex $fileList($node) 1]
|
||||
set closedFile [file tail [lindex $fileList($node) 0]]
|
||||
if {$editFlag == 1} {
|
||||
set answer [tk_messageBox\
|
||||
-message "$closedFile [::msgcat::mc "File was modifyed. Save?"]"\
|
||||
-type yesnocancel -icon warning\
|
||||
-title [::msgcat::mc "Warning"]]
|
||||
case $answer {
|
||||
yes {
|
||||
FileDialog $tree save
|
||||
# FileDialog close
|
||||
}
|
||||
no {
|
||||
set index 0
|
||||
|
||||
set nl [$tree nodes $node 0 end]
|
||||
if {$nl != ""} {
|
||||
foreach n $nl {
|
||||
$tree delete $n
|
||||
}
|
||||
}
|
||||
$noteBook delete $node
|
||||
unset fileList($node)
|
||||
$noteBook raise [$noteBook page $index]
|
||||
set node [$noteBook raise]
|
||||
}
|
||||
cancel {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
set index 0
|
||||
set nl [$tree nodes $node 0 end]
|
||||
if {$nl != ""} {
|
||||
foreach n $nl {
|
||||
$tree delete $n
|
||||
}
|
||||
}
|
||||
#puts $node
|
||||
$noteBook delete $node
|
||||
unset fileList($node)
|
||||
$noteBook raise [$noteBook page $index]
|
||||
set node [$noteBook raise]
|
||||
}
|
||||
if {$node != ""} {
|
||||
if {$node == "newproj" || $node == "settings" || $node == "about" || $node == "debug"} {
|
||||
$noteBook delete $node
|
||||
} else {
|
||||
focus -force $noteBook.f$node
|
||||
}
|
||||
set tree [GetTreeForNode $node]
|
||||
focus $tree
|
||||
$tree selection set $node
|
||||
} else {
|
||||
LabelUpdate .frmStatus.frmLine.lblLine ""
|
||||
LabelUpdate .frmStatus.frmFile.lblFile ""
|
||||
LabelUpdate .frmStatus.frmOvwrt.lblOvwrt ""
|
||||
LabelUpdate .frmStatus.frmProgress.lblProgress ""
|
||||
}
|
||||
} elseif {$operation == "close_all"} {
|
||||
set nodeList [$noteBook pages 0 end]
|
||||
$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
|
||||
$noteBook raise [$noteBook page 0]
|
||||
set nbNode [$noteBook raise]
|
||||
}
|
||||
if {[info exists fileList($nbNode)] == 1} {
|
||||
set editFlag [lindex $fileList($nbNode) 1]
|
||||
if {$editFlag == 1} {
|
||||
set f [lindex $fileList($nbNode) 0]
|
||||
set f [file tail $f]
|
||||
set answer [tk_messageBox\
|
||||
-message "$f [::msgcat::mc "File was modifyed. Save?"]"\
|
||||
-type yesnocancel -icon warning\
|
||||
-title [::msgcat::mc "Warning"]]
|
||||
case $answer {
|
||||
yes {
|
||||
FileDialog $tree save
|
||||
}
|
||||
no {}
|
||||
cancel {return cancel}
|
||||
}
|
||||
}
|
||||
set tree [GetTreeForNode $nbNode]
|
||||
set nl [$tree nodes $nbNode 0 end]
|
||||
if {$nl != ""} {
|
||||
foreach n $nl {
|
||||
$tree delete $n
|
||||
}
|
||||
}
|
||||
$noteBook delete $nbNode
|
||||
$noteBook raise [$noteBook page 0]
|
||||
unset fileList($nbNode)
|
||||
set nbNode [$noteBook raise]
|
||||
}
|
||||
}
|
||||
LabelUpdate .frmStatus.frmLine.lblLine ""
|
||||
LabelUpdate .frmStatus.frmFile.lblFile ""
|
||||
LabelUpdate .frmStatus.frmOvwrt.lblOvwrt ""
|
||||
|
||||
} elseif {$operation == "save_as"} {
|
||||
set file [tk_getSaveFile -initialdir $dir -filetypes \
|
||||
$types -parent $text -initialfile $file]
|
||||
if {$file != ""} {
|
||||
set contents [$text get 0.0 end]
|
||||
set fhandle [open $file "w"]
|
||||
puts $fhandle $contents nonewline
|
||||
close $fhandle
|
||||
set dir [file dirname $file]
|
||||
set file [file tail $file]
|
||||
set name [string range $file 0 [expr [string last "." $file]-1]]
|
||||
if {[string last "." $file] == -1} {
|
||||
set ext [string range [file extension $file] 1 end]
|
||||
} else {
|
||||
set ext ""
|
||||
}
|
||||
set treeSubNode "$activeProject$dot$name$dot$ext"
|
||||
$tree insert end $activeProject $treeSubNode -text "$file" \
|
||||
-data "[file join $dir $file]" -open 1\
|
||||
-image [Bitmap::get [file join $imgDir $img.gif]]\
|
||||
-font $fontNormal
|
||||
set nbNode [$noteBook raise]
|
||||
$noteBook itemconfigure $nbNode -text $file
|
||||
set fileList($nbNode) [list $file 0]
|
||||
}
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace eval FileOperation {
|
||||
global noteBook fontNormal fontBold fileList noteBook projDir activeProject imgDir editor
|
||||
}
|
||||
|
@ -300,3 +597,4 @@ proc FileOperation::FileDialog {tree operation} {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ proc HighLightTCL {text line lineNumber node} {
|
|||
$text tag add brace $lineNumber.$start $lineNumber.$end
|
||||
set startPos $end
|
||||
} else {
|
||||
$text tag lower brace
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -179,8 +180,8 @@ proc HighLightTCL {text line lineNumber node} {
|
|||
incr end $startPos
|
||||
$text tag add bracequad $lineNumber.$start $lineNumber.$end
|
||||
set startPos $end
|
||||
$text tag lower bracequad
|
||||
} else {
|
||||
$text tag lower bracequad
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -201,7 +202,7 @@ proc HighLightTCL {text line lineNumber node} {
|
|||
break
|
||||
}
|
||||
}
|
||||
# add comment #
|
||||
# add comment #
|
||||
set workLine [$text get $lineNumber.0 $lineNumber.end]
|
||||
if {[regexp -indices "(^|\t|;| )#" $workLine word]} {
|
||||
set p [lindex $word 1]
|
||||
|
@ -212,3 +213,4 @@ proc HighLightTCL {text line lineNumber node} {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
169
lib/main.tcl
169
lib/main.tcl
|
@ -137,17 +137,17 @@ $mn add command -label [::msgcat::mc "New project"] -command {NewProjDialog "new
|
|||
-font $fontNormal
|
||||
#$m add command -label [::msgcat::mc "Open"] -command {FileDialog $tree open}\
|
||||
#-font $fontNormal -accelerator "Ctrl+O" -state disable
|
||||
$m add command -label [::msgcat::mc "Save"] -command {FileDialog $tree save}\
|
||||
$m add command -label [::msgcat::mc "Save"] -command {FileDialog [$noteBookFiles raise] save}\
|
||||
-font $fontNormal -accelerator "Ctrl+S"
|
||||
$m add command -label [::msgcat::mc "Save as"] -command {FileDialog $tree save_as}\
|
||||
$m add command -label [::msgcat::mc "Save as"] -command {FileDialog [$noteBookFiles raise] save_as}\
|
||||
-font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Save all"] -command {FileDialog $tree save_all}\
|
||||
$m add command -label [::msgcat::mc "Save all"] -command {FileDialog [$noteBookFiles raise] save_all}\
|
||||
-font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Close"] -command {FileDialog $tree close}\
|
||||
$m add command -label [::msgcat::mc "Close"] -command {FileDialog [$noteBookFiles raise] close}\
|
||||
-font $fontNormal -accelerator "Ctrl+W"
|
||||
$m add command -label [::msgcat::mc "Close all"] -command {FileDialog $tree close_all}\
|
||||
$m add command -label [::msgcat::mc "Close all"] -command {FileDialog [$noteBookFiles raise] close_all}\
|
||||
-font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Delete"] -command {FileDialog $tree delete}\
|
||||
$m add command -label [::msgcat::mc "Delete"] -command {FileDialog [$noteBookFiles raise] delete}\
|
||||
-font $fontNormal -accelerator "Ctrl+D"
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Compile file"] -command {MakeProj compile file} -font $fontNormal -accelerator "Ctrl+F8"
|
||||
|
@ -162,25 +162,6 @@ $m add command -label [::msgcat::mc "Exit"] -command Quit -font $fontNormal -acc
|
|||
|
||||
##.frmMenu 'Project' ##
|
||||
|
||||
proc GetProjMenu {m} {
|
||||
global fontNormal
|
||||
$m add command -label [::msgcat::mc "Project settings"] -command {NewProj edit $activeProject ""}\
|
||||
-font $fontNormal
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Open project"] -command {OpenProj} -font $fontNormal
|
||||
$m add command -label [::msgcat::mc "New project"] -command {NewProjDialog new} -font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Delete project"] -command DelProj -font $fontNormal
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Add to project"] -command AddToProjDialog -font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Delete from project"]\
|
||||
-command {FileDialog delete} -font $fontNormal
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Make archive"] -command MakeTGZ -font $fontNormal -accelerator "F7"
|
||||
$m add command -label [::msgcat::mc "Make RPM"] -command MakeRPM -font $fontNormal -accelerator "F6"
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Compile"] -command {MakeProj compile proj} -font $fontNormal -accelerator "F8"
|
||||
$m add command -label [::msgcat::mc "Run"] -command {MakeProj run proj} -font $fontNormal -accelerator "F9"
|
||||
}
|
||||
|
||||
menubutton .frmMenu.mnuProj -text [::msgcat::mc "Project"] -menu .frmMenu.mnuProj.m -font $fontNormal -bg $editor(bg) -fg $editor(fg)
|
||||
set m [menu .frmMenu.mnuProj.m -bg $editor(bg) -fg $editor(fg)]
|
||||
|
@ -189,54 +170,6 @@ GetProjMenu $m
|
|||
##.frmMenu 'Edit' ##
|
||||
menubutton .frmMenu.mnuEdit -text [::msgcat::mc "Edit"] -menu .frmMenu.mnuEdit.m -font $fontNormal -bg $editor(bg) -fg $editor(fg)
|
||||
## BUILDING EDIT-MENU FOR MAIN AND POP-UP MENU ##
|
||||
proc GetMenu {m} {
|
||||
global fontNormal fontBold imgDir editor
|
||||
$m add command -label [::msgcat::mc "Undo"] -font $fontNormal -accelerator "Ctrl+Z"\
|
||||
-state normal -command {TextOperation undo}
|
||||
$m add command -label [::msgcat::mc "Redo"] -font $fontNormal -accelerator "Ctrl+G"\
|
||||
-state normal -command {TextOperation redo}
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Procedure name complit"] -font $fontNormal -accelerator "Ctrl+J" -state normal\
|
||||
-command {
|
||||
set nb "$noteBook.f[$noteBook raise]"
|
||||
auto_completition_proc $nb.text
|
||||
unset nb
|
||||
}
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Copy"] -font $fontNormal -accelerator "Ctrl+C"\
|
||||
-command {TextOperation copy}
|
||||
$m add command -label [::msgcat::mc "Paste"] -font $fontNormal -accelerator "Ctrl+V"\
|
||||
-command {TextOperation paste}
|
||||
$m add command -label [::msgcat::mc "Cut"] -font $fontNormal -accelerator "Ctrl+X"\
|
||||
-command {TextOperation cut}
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Select all"] -font $fontNormal -accelerator "Ctrl+/"\
|
||||
-command {
|
||||
set nb [$noteBook raise]
|
||||
if {$nb == "" || $nb == "newproj" || $nb == "about" || $nb == "debug"} {
|
||||
return
|
||||
}
|
||||
set nb "$noteBook.f$nb"
|
||||
SelectAll $nb.text
|
||||
unset nb
|
||||
}
|
||||
$m add command -label [::msgcat::mc "Comment selected"] -font $fontNormal -accelerator "Ctrl+,"\
|
||||
-command {TextOperation comment}
|
||||
$m add command -label [::msgcat::mc "Uncomment selected"] -font $fontNormal -accelerator "Ctrl+." \
|
||||
-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 "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
|
||||
}
|
||||
GetMenu [menu .frmMenu.mnuEdit.m -bg $editor(bg) -fg $editor(fg)];# main edit menu
|
||||
GetMenu [menu .popMnuEdit -bg $editor(bg) -fg $editor(fg)] ;# pop-up edit menu
|
||||
|
||||
|
@ -297,57 +230,8 @@ bind . <Control-eacute> Quit
|
|||
bind . <Control-q> Quit
|
||||
bind . <Control-ccedilla> PrintDialog
|
||||
bind . <Control-p> PrintDialog
|
||||
## TOOLBAR ##
|
||||
proc add_toolbar_button {path icon command helptext} {
|
||||
global editor imgDir
|
||||
image create photo $icon -format png -file [file join $imgDir $icon]
|
||||
$path add -image $icon \
|
||||
-highlightthickness 0 -takefocus 0 -relief link -bd 1 -activebackground $editor(bg)\
|
||||
-padx 1 -pady 1 -command $command -helptext $helptext
|
||||
}
|
||||
# Separator for toolbar
|
||||
set sepIndex 0
|
||||
|
||||
proc Separator {} {
|
||||
global sepIndex editor
|
||||
set f [frame .frmTool.separator$sepIndex -width 10 -border 1 \
|
||||
-background $editor(bg) -relief raised]
|
||||
incr sepIndex 1
|
||||
return $f
|
||||
}
|
||||
proc CreateToolBar {} {
|
||||
global toolBar fontBold noteBook tree imgDir editor
|
||||
if {$toolBar == "Yes"} {
|
||||
set bboxFile [ButtonBox .frmTool.bboxFile -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
add_toolbar_button $bboxFile new.png {AddToProjDialog file} [::msgcat::mc "Create new file"]
|
||||
#add_toolbar_button $bboxFile open.png {FileDialog $tree open} [::msgcat::mc "Open file"]
|
||||
add_toolbar_button $bboxFile save.png {FileDialog $tree save} [::msgcat::mc "Save file"]
|
||||
add_toolbar_button $bboxFile save_as.png {FileDialog $tree save_as} [::msgcat::mc "Save file as"]
|
||||
add_toolbar_button $bboxFile save_all.png {FileDialog $tree save_all} [::msgcat::mc "Save all"]
|
||||
add_toolbar_button $bboxFile printer.png {PrintDialog} [::msgcat::mc "Print ..."]
|
||||
add_toolbar_button $bboxFile close.png {FileDialog $tree close} [::msgcat::mc "Close"]
|
||||
|
||||
set bboxEdit [ButtonBox .frmTool.bboxEdit -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
add_toolbar_button $bboxEdit copy.png {TextOperation copy} [::msgcat::mc "Copy into clipboard"]
|
||||
add_toolbar_button $bboxEdit cut.png {TextOperation cut} [::msgcat::mc "Cut into clipboard"]
|
||||
add_toolbar_button $bboxEdit paste.png {TextOperation paste} [::msgcat::mc "Paste from clipboard"]
|
||||
add_toolbar_button $bboxEdit undo.png {TextOperation undo} [::msgcat::mc "Undo"]
|
||||
add_toolbar_button $bboxEdit redo.png {TextOperation redo} [::msgcat::mc "Redo"]
|
||||
|
||||
|
||||
set bboxProj [ButtonBox .frmTool.bboxProj -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
|
||||
add_toolbar_button $bboxProj doit.png {MakeProj run proj} [::msgcat::mc "Running project"]
|
||||
add_toolbar_button $bboxProj doit_file.png {MakeProj run file} [::msgcat::mc "Running file"]
|
||||
add_toolbar_button $bboxProj archive.png {MakeTGZ} [::msgcat::mc "Make TGZ"]
|
||||
|
||||
set bboxHelp [ButtonBox .frmTool.bboxHelp -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
add_toolbar_button $bboxHelp help.png {ShowHelp} [::msgcat::mc "Help"]
|
||||
|
||||
pack $bboxFile [Separator] $bboxEdit [Separator] $bboxProj [Separator] $bboxHelp -side left -anchor w
|
||||
|
||||
}
|
||||
}
|
||||
########## STATUS BAR ##########
|
||||
set frm1 [frame .frmStatus.frmHelp -bg $editor(bg)]
|
||||
set frm2 [frame .frmStatus.frmActive -bg $editor(bg)]
|
||||
|
@ -393,9 +277,11 @@ pack $noteBookFiles -fill both -expand true -padx 2 -pady 2
|
|||
set nbProjects [$noteBookFiles insert end projects -text [::msgcat::mc "Projects"]]
|
||||
set nbFiles [$noteBookFiles insert end files -text [::msgcat::mc "Files"]]
|
||||
|
||||
|
||||
# Create FileTree
|
||||
FileTree::create $nbFiles
|
||||
|
||||
# tree
|
||||
# Create Project tree
|
||||
set frmTree [ScrolledWindow $nbProjects.frmTree -bg $editor(bg)]
|
||||
global tree noteBook
|
||||
set tree [Tree $frmTree.tree \
|
||||
|
@ -416,8 +302,8 @@ $tree bindText <ButtonPress-1> "TreeOneClick $tree [$tree selection get]"
|
|||
$tree bindImage <Double-ButtonPress-1> "TreeDoubleClick $tree [$tree selection get]"
|
||||
$tree bindImage <ButtonPress-1> "TreeOneClick $tree [$tree selection get]"
|
||||
$tree bindText <Shift-Button-1> {$tree selection add [$tree selection get]}
|
||||
bind $frmTree.tree.c <Control-acircumflex> {FileDialog $tree delete}
|
||||
bind $frmTree.tree.c <Control-d> {FileDialog $tree delete}
|
||||
bind $frmTree.tree.c <Control-acircumflex> {FileDialog [$noteBookFiles raise] delete}
|
||||
bind $frmTree.tree.c <Control-d> {FileDialog [$noteBookFiles raise] delete}
|
||||
bind $frmTree.tree.c <Return> {
|
||||
set node [$tree selection get]
|
||||
TreeOneClick $tree $node
|
||||
|
@ -431,23 +317,30 @@ $m add command -label [::msgcat::mc "New file"] -command {AddToProjDialog file}\
|
|||
-font $fontNormal -accelerator "Ctrl+N"
|
||||
$m add command -label [::msgcat::mc "New directory"] -command {AddToProjDialog directory}\
|
||||
-font $fontNormal -accelerator "Alt + Ctrl+N"
|
||||
$m add command -label [::msgcat::mc "Open"] -command {FileDialog $tree open}\
|
||||
$m add command -label [::msgcat::mc "Open"] -command {FileDialog [$noteBookFiles raise] open}\
|
||||
-font $fontNormal -accelerator "Ctrl+O" -state disable
|
||||
$m add command -label [::msgcat::mc "Save"] -command {FileDialog $tree save}\
|
||||
$m add command -label [::msgcat::mc "Save"] -command {FileDialog [$noteBookFiles raise] save}\
|
||||
-font $fontNormal -accelerator "Ctrl+S"
|
||||
$m add command -label [::msgcat::mc "Save as"] -command {FileDialog $tree save_as}\
|
||||
$m add command -label [::msgcat::mc "Save as"] -command {FileDialog [$noteBookFiles raise] save_as}\
|
||||
-font $fontNormal -accelerator "Ctrl+A"
|
||||
$m add command -label [::msgcat::mc "Save all"] -command {FileDialog $tree save_all}\
|
||||
$m add command -label [::msgcat::mc "Save all"] -command {FileDialog [$noteBookFiles raise] save_all}\
|
||||
-font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Close"] -command {FileDialog $tree close}\
|
||||
$m add command -label [::msgcat::mc "Close"] -command {FileDialog [$noteBookFiles raise] close}\
|
||||
-font $fontNormal -accelerator "Ctrl+W"
|
||||
$m add command -label [::msgcat::mc "Close all"] -command {FileDialog $tree close_all}\
|
||||
$m add command -label [::msgcat::mc "Close all"] -command {FileDialog [$noteBookFiles raise] close_all}\
|
||||
-font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Delete"] -command {FileDialog $tree delete}\
|
||||
$m add command -label [::msgcat::mc "Delete"] -command {FileDialog [$noteBookFiles raise] delete}\
|
||||
-font $fontNormal -accelerator "Ctrl+D"
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Compile file"] -command {MakeProj compile file} -font $fontNormal -accelerator "Ctrl+F8"
|
||||
$m add command -label [::msgcat::mc "Run file"] -command {MakeProj run file} -font $fontNormal -accelerator "Ctrl+F9"
|
||||
$m add command -label [::msgcat::mc "Compile file"] -command {MakeProj compile file} \
|
||||
-font $fontNormal -accelerator "Ctrl+F8"
|
||||
$m add command -label [::msgcat::mc "Run file"] -command {MakeProj run file} -font $fontNormal \
|
||||
-accelerator "Ctrl+F9"
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Add to existing project"] -command {AddToProjDialog ""} \
|
||||
-font $fontNormal -state disable
|
||||
$m add command -label [::msgcat::mc "Add as new project"] -command {OpenProj [$noteBookFiles raise]} -font $fontNormal
|
||||
|
||||
|
||||
## POPUP PROJECT-MENU ##
|
||||
set m [menu .popupProj -font $fontNormal -bg $editor(bg) -fg $editor(fg)]
|
||||
|
@ -456,14 +349,11 @@ GetProjMenu $m
|
|||
## TABS popups ##
|
||||
set m .popupTabs
|
||||
menu $m -font $fontNormal -bg $editor(bg) -fg $editor(fg)
|
||||
$m add command -label [::msgcat::mc "Close"] -command {FileDialog $tree close}\
|
||||
$m add command -label [::msgcat::mc "Close"] -command {FileDialog [$noteBookFiles raise] close}\
|
||||
-font $fontNormal -accelerator "Ctrl+W"
|
||||
$m add command -label [::msgcat::mc "Close all"] -command {FileDialog $tree close_all}\
|
||||
$m add command -label [::msgcat::mc "Close all"] -command {FileDialog [$noteBookFiles raise] close_all}\
|
||||
-font $fontNormal
|
||||
|
||||
proc PopupMenuTab {menu x y} {
|
||||
tk_popup $menu $x $y
|
||||
}
|
||||
|
||||
bind $frmTree.tree.c <Button-3> {catch [PopupMenuTree %X %Y]}
|
||||
|
||||
|
@ -499,3 +389,4 @@ if {[info exists workingProject]} {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
94
lib/menu.tcl
Normal file
94
lib/menu.tcl
Normal file
|
@ -0,0 +1,94 @@
|
|||
######################################################
|
||||
# Tcl/Tk Project Manager
|
||||
# Distributed under GNU Public License
|
||||
# Author: Sergey Kalinin banzaj28@yandex.ru
|
||||
# Copyright (c) "https://nuk-svk.ru", 2018, https://bitbucket.org/svk28/projman
|
||||
######################################################
|
||||
#
|
||||
# Menu file
|
||||
#
|
||||
######################################################
|
||||
|
||||
proc PopupMenuTab {menu x y} {
|
||||
tk_popup $menu $x $y
|
||||
}
|
||||
|
||||
# File tree pop-up menu
|
||||
proc GetMenuFileTree {m} {
|
||||
global fontNormal
|
||||
|
||||
}
|
||||
|
||||
# Project menu
|
||||
proc GetProjMenu {m} {
|
||||
global fontNormal
|
||||
$m add command -label [::msgcat::mc "Project settings"] -command {NewProj edit $activeProject ""}\
|
||||
-font $fontNormal
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Open project"] -command {OpenProj} -font $fontNormal
|
||||
$m add command -label [::msgcat::mc "New project"] -command {NewProj new "" ""} -font $fontNormal
|
||||
$m add command -label [::msgcat::mc "Delete project"] -command DelProj -font $fontNormal
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Add to project"] \
|
||||
-command {AddToProjDialog ""} -font $fontNormal -state disable
|
||||
$m add command -label [::msgcat::mc "Delete from project"]\
|
||||
-command {FileDialog delete} -font $fontNormal -state disable
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Make archive"] -command MakeTGZ -font $fontNormal -accelerator "F7"
|
||||
$m add command -label [::msgcat::mc "Make RPM"] -command MakeRPM -font $fontNormal -accelerator "F6"
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Compile"] -command {MakeProj compile proj} -font $fontNormal -accelerator "F8"
|
||||
$m add command -label [::msgcat::mc "Run"] -command {MakeProj run proj} -font $fontNormal -accelerator "F9"
|
||||
}
|
||||
|
||||
# Edit menu
|
||||
proc GetMenu {m} {
|
||||
global fontNormal fontBold imgDir editor
|
||||
$m add command -label [::msgcat::mc "Undo"] -font $fontNormal -accelerator "Ctrl+Z"\
|
||||
-state normal -command {TextOperation undo}
|
||||
$m add command -label [::msgcat::mc "Redo"] -font $fontNormal -accelerator "Ctrl+G"\
|
||||
-state normal -command {TextOperation redo}
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Procedure name complit"] -font $fontNormal -accelerator "Ctrl+J" -state normal\
|
||||
-command {
|
||||
set nb "$noteBook.f[$noteBook raise]"
|
||||
auto_completition_proc $nb.text
|
||||
unset nb
|
||||
}
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Copy"] -font $fontNormal -accelerator "Ctrl+C"\
|
||||
-command {TextOperation copy}
|
||||
$m add command -label [::msgcat::mc "Paste"] -font $fontNormal -accelerator "Ctrl+V"\
|
||||
-command {TextOperation paste}
|
||||
$m add command -label [::msgcat::mc "Cut"] -font $fontNormal -accelerator "Ctrl+X"\
|
||||
-command {TextOperation cut}
|
||||
$m add separator
|
||||
$m add command -label [::msgcat::mc "Select all"] -font $fontNormal -accelerator "Ctrl+/"\
|
||||
-command {
|
||||
set nb [$noteBook raise]
|
||||
if {$nb == "" || $nb == "newproj" || $nb == "about" || $nb == "debug"} {
|
||||
return
|
||||
}
|
||||
set nb "$noteBook.f$nb"
|
||||
SelectAll $nb.text
|
||||
unset nb
|
||||
}
|
||||
$m add command -label [::msgcat::mc "Comment selected"] -font $fontNormal -accelerator "Ctrl+,"\
|
||||
-command {TextOperation comment}
|
||||
$m add command -label [::msgcat::mc "Uncomment selected"] -font $fontNormal -accelerator "Ctrl+." \
|
||||
-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 "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
|
||||
}
|
||||
|
||||
|
|
@ -662,3 +662,4 @@ proc GetExtention {node} {
|
|||
return $ext
|
||||
}
|
||||
|
||||
|
||||
|
|
439
lib/projects.tcl
439
lib/projects.tcl
|
@ -4,424 +4,6 @@
|
|||
# Author: Sergey Kalinin banzaj28@yandex.ru #
|
||||
# Copyright (c) "Sergey Kalinin", 2002, http://nuk-svk.ru #
|
||||
###########################################################
|
||||
|
||||
proc NewProjDialog {type} {
|
||||
global fontNormal tree projDir workDir activeProject fileList noteBook imgDir prjDir prjName
|
||||
global openProjDir tclDir
|
||||
set w .newProj
|
||||
# destroy the find window if it already exists
|
||||
if {[winfo exists $w]} {
|
||||
|
||||
destroy $w
|
||||
}
|
||||
|
||||
set typeProjects "Tcl Java Perl Fortran O'Caml PHP Ruby Erlang"
|
||||
|
||||
toplevel $w
|
||||
wm title $w [::msgcat::mc "New project"]
|
||||
wm resizable $w 0 0
|
||||
wm transient $w .
|
||||
frame $w.frmCombo -borderwidth 1
|
||||
frame $w.frmBtn -borderwidth 1
|
||||
pack $w.frmCombo $w.frmBtn -side top -fill x
|
||||
|
||||
# set combo [entry $w.frmCombo.entFind]
|
||||
set combo [ComboBox $w.frmCombo.txtLocale\
|
||||
-textvariable lang -editable false\
|
||||
-selectbackground "#55c4d1" -selectborderwidth 0\
|
||||
-values $typeProjects]
|
||||
|
||||
pack $combo -fill x -padx 2 -pady 2
|
||||
if {$type=="new"} {
|
||||
button $w.frmBtn.btnFind -text "[::msgcat::mc "Create"]"\
|
||||
-font $fontNormal -width 12 -relief groove\
|
||||
-command {
|
||||
NewProj add "" $lang
|
||||
destroy .newProj
|
||||
}
|
||||
} elseif {$type=="open"} {
|
||||
button $w.frmBtn.btnFind -text "[::msgcat::mc "Open"]"\
|
||||
-font $fontNormal -width 12 -relief groove\
|
||||
-command {
|
||||
NewProj open "$prjName" $lang
|
||||
destroy .newProj
|
||||
}
|
||||
}
|
||||
button $w.frmBtn.btnCancel -text "[::msgcat::mc "Close"] - Esc"\
|
||||
-relief groove -width 12 -font $fontNormal\
|
||||
-command "destroy $w"
|
||||
pack $w.frmBtn.btnFind $w.frmBtn.btnCancel -fill x -padx 2 -pady 2 -side left
|
||||
if {$type=="open"} {
|
||||
bind $w <Return> {NewProj open $prjName $lang; destroy .newProj}
|
||||
} elseif {$type=="new"} {
|
||||
bind $w <Return> {NewProj add "" $lang; destroy .newProj}
|
||||
}
|
||||
bind $w <Escape> "destroy $w"
|
||||
focus -force $combo
|
||||
|
||||
# set findIndex [lsearch -exact $findHistory "$findString"]
|
||||
$combo setvalue @0
|
||||
}
|
||||
|
||||
proc NewProj {type proj l} {
|
||||
global fontNormal tree projDir workDir activeProject fileList noteBook imgDir prjDir
|
||||
global openProjDir tclDir frm lang operType
|
||||
set operType $type
|
||||
if {$operType == "edit" && $proj == ""} {
|
||||
set answer [tk_messageBox\
|
||||
-message "[::msgcat::mc "Not found active project"]"\
|
||||
-type ok -icon warning -title [::msgcat::mc "Warning"]]
|
||||
case $answer {
|
||||
ok {return 0}
|
||||
}
|
||||
}
|
||||
set lang $l
|
||||
set node [$noteBook page [$noteBook index newproj]]
|
||||
if {$node != ""} {
|
||||
$noteBook raise newproj
|
||||
return 0
|
||||
} else {
|
||||
set w [$noteBook insert end newproj -text [::msgcat::mc "New project"]]
|
||||
}
|
||||
set frm [frame $w.frmProjSettings]
|
||||
pack $frm -fill both -expand true
|
||||
|
||||
image create photo imgFold -format gif -file [file join $imgDir folder.gif]
|
||||
|
||||
set frm_1 [frame $frm.frmProjName]
|
||||
label $frm_1.lblProjName -text [::msgcat::mc "Project name"] -width 20 -anchor w
|
||||
entry $frm_1.txtProjName -textvariable txtProjName
|
||||
pack $frm_1.lblProjName -side left
|
||||
pack $frm_1.txtProjName -side left -fill x -expand true
|
||||
|
||||
set frm_2 [frame $frm.frmFileName]
|
||||
label $frm_2.lblFileName -text [::msgcat::mc "Project file"] -width 20 -anchor w
|
||||
entry $frm_2.txtFileName -textvariable txtFileName
|
||||
pack $frm_2.lblFileName -side left
|
||||
pack $frm_2.txtFileName -side left -fill x -expand true
|
||||
|
||||
set frm_8 [frame $frm.frmDirName]
|
||||
label $frm_8.lblDirName -text [::msgcat::mc "Project dir"] -width 20 -anchor w
|
||||
entry $frm_8.txtDirName -textvariable txtDirName -state disable
|
||||
button $frm_8.btnDirName -borderwidth {1} -image imgFold\
|
||||
-command {
|
||||
$frm.frmDirName.txtDirName configure -state normal
|
||||
InsertEnt $frm.frmDirName.txtDirName [tk_chooseDirectory -initialdir $projDir -title "[::msgcat::mc "Select directory"]" -parent .]
|
||||
$frm.frmDirName.txtDirName configure -state disable
|
||||
}
|
||||
pack $frm_8.lblDirName -side left
|
||||
pack $frm_8.txtDirName -side left -fill x -expand true
|
||||
pack $frm_8.btnDirName -side left
|
||||
|
||||
set frm_13 [frame $frm.frmCompiler]
|
||||
label $frm_13.lblCompiler -text [::msgcat::mc "Compiler"]\
|
||||
-width 20 -anchor w
|
||||
entry $frm_13.txtCompiler -textvariable txtCompiler
|
||||
button $frm_13.btnCompiler -borderwidth {1} -image imgFold\
|
||||
-command {
|
||||
InsertEnt $frm.frmCompiler.txtCompiler [tk_getOpenFile -initialdir $tclDir -parent .]
|
||||
}
|
||||
pack $frm_13.lblCompiler -side left
|
||||
pack $frm_13.txtCompiler -side left -fill x -expand true
|
||||
pack $frm_13.btnCompiler -side left
|
||||
|
||||
set frm_12 [frame $frm.frmProjInterp]
|
||||
label $frm_12.lblProjInterp -text [::msgcat::mc "Interpetator"]\
|
||||
-width 20 -anchor w
|
||||
entry $frm_12.txtProjInterp -textvariable txtProjInterp
|
||||
button $frm_12.btnInterp -borderwidth {1} -image imgFold\
|
||||
-command {
|
||||
InsertEnt $frm.frmProjInterp.txtProjInterp [tk_getOpenFile -initialdir $tclDir -parent .]
|
||||
}
|
||||
pack $frm_12.lblProjInterp -side left
|
||||
pack $frm_12.txtProjInterp -side left -fill x -expand true
|
||||
pack $frm_12.btnInterp -side left
|
||||
|
||||
|
||||
set frm_4 [frame $frm.frmVersion]
|
||||
label $frm_4.lblProjVersion -text [::msgcat::mc "Version"] -width 20 -anchor w
|
||||
entry $frm_4.txtProjVersion -textvariable txtProjVersion
|
||||
pack $frm_4.lblProjVersion -side left
|
||||
pack $frm_4.txtProjVersion -side left -fill x -expand true
|
||||
InsertEnt $frm_4.txtProjVersion "0.0.1"
|
||||
|
||||
set frm_11 [frame $frm.frmRelease]
|
||||
label $frm_11.lblProjRelease -text [::msgcat::mc "Release"] -width 20 -anchor w
|
||||
entry $frm_11.txtProjRelease -textvariable txtProjRelease
|
||||
pack $frm_11.lblProjRelease -side left
|
||||
pack $frm_11.txtProjRelease -side left -fill x -expand true
|
||||
InsertEnt $frm_11.txtProjRelease "1"
|
||||
|
||||
set frm_3 [frame $frm.frmProjAuthor]
|
||||
label $frm_3.lblProjAuthor -text [::msgcat::mc "Author"] -width 20 -anchor w
|
||||
entry $frm_3.txtProjAuthor -textvariable txtProjAuthor
|
||||
pack $frm_3.lblProjAuthor -side left
|
||||
pack $frm_3.txtProjAuthor -side left -fill x -expand true
|
||||
|
||||
set frm_9 [frame $frm.frmProjEmail]
|
||||
label $frm_9.lblProjEmail -text [::msgcat::mc "E-mail"] -width 20 -anchor w
|
||||
entry $frm_9.txtProjEmail -textvariable txtProjEmail
|
||||
pack $frm_9.lblProjEmail -side left
|
||||
pack $frm_9.txtProjEmail -side left -fill x -expand true
|
||||
|
||||
set frm_5 [frame $frm.frmProjCompany]
|
||||
label $frm_5.lblProjCompany -text [::msgcat::mc "Company"] -width 20 -anchor w
|
||||
entry $frm_5.txtProjCompany -textvariable txtProjCompany
|
||||
pack $frm_5.lblProjCompany -side left
|
||||
pack $frm_5.txtProjCompany -side left -fill x -expand true
|
||||
|
||||
set frm_10 [frame $frm.frmProjHome]
|
||||
label $frm_10.lblProjHome -text [::msgcat::mc "Home page"] -width 20 -anchor w
|
||||
entry $frm_10.txtProjHome -textvariable txtProjHome
|
||||
pack $frm_10.lblProjHome -side left
|
||||
pack $frm_10.txtProjHome -side left -fill x -expand true
|
||||
|
||||
set frm_7 [frame $frm.frmWinTitle -border 2 -relief ridge -background grey]
|
||||
label $frm_7.lblWinTitle -text "[::msgcat::mc "Create new project"] $lang" -foreground yellow \
|
||||
-background black
|
||||
|
||||
pack $frm_7.lblWinTitle -fill x -expand true
|
||||
|
||||
set frm_6 [frame $frm.frmBtn -border 2 -relief ridge]
|
||||
if {$operType == "edit" && $proj != ""} {
|
||||
$noteBook itemconfigure newproj -text [::msgcat::mc "Project settings"]
|
||||
button $frm_6.btnProjCreate -text [::msgcat::mc "Save"] -relief groove\
|
||||
-font $fontNormal -command {
|
||||
regsub -all {\\} $txtProjInterp {\\\\} $txtProjInterp
|
||||
SaveProj "$txtFileName" "$txtProjName" "$txtFileName" "$txtDirName"\
|
||||
"$txtCompiler" "$txtProjInterp" "$txtProjVersion" "$txtProjRelease"\
|
||||
"$txtProjAuthor" "$txtProjEmail" "$txtProjCompany" "$txtProjHome"
|
||||
$noteBook delete newproj
|
||||
$noteBook raise [$noteBook page end]
|
||||
}
|
||||
} else {
|
||||
button $frm_6.btnProjCreate -text [::msgcat::mc "Create"] -relief groove\
|
||||
-font $fontNormal -command {
|
||||
CreateProj $operType $lang "$txtFileName" "$txtProjName" "$txtFileName" "$txtDirName"\
|
||||
"$txtCompiler" "$txtProjInterp" "$txtProjVersion" "$txtProjRelease"\
|
||||
"$txtProjAuthor" "$txtProjEmail" "$txtProjCompany" "$txtProjHome"
|
||||
$noteBook delete newproj
|
||||
$noteBook raise [$noteBook page end]
|
||||
}
|
||||
|
||||
}
|
||||
button $frm_6.btnClose -text [::msgcat::mc "Cancel"] -relief groove -font $fontNormal -command {
|
||||
$noteBook delete newproj
|
||||
$noteBook raise [$noteBook page end]
|
||||
}
|
||||
pack $frm_6.btnProjCreate $frm_6.btnClose -padx 10 -pady 2 -side left -fill x -expand true
|
||||
pack $frm_7 $frm_1 $frm_2 $frm_8 $frm_13 $frm_12 $frm_4 $frm_11 $frm_3 $frm_9 $frm_5 $frm_10 $frm_6\
|
||||
-side top -fill x
|
||||
pack $frm_6 -side top -fill x -expand true -anchor s
|
||||
bind $w <Escape> "$noteBook delete newproj"
|
||||
$noteBook raise newproj
|
||||
|
||||
## EDIT PROJECT SETTINGS ##
|
||||
if {$operType == "edit" && $proj != ""} {
|
||||
$frm.frmDirName.txtDirName configure -state normal
|
||||
$frm_7.lblWinTitle configure -text [::msgcat::mc "Project settings"]
|
||||
$frm_6.btnProjCreate configure -text "[::msgcat::mc "Save"]"
|
||||
set file [open [file join $workDir $proj.proj] r]
|
||||
while {[gets $file line]>=0} {
|
||||
scan $line "%s" keyWord
|
||||
set string [string range $line [string first "\"" $line] [string last "\"" $line]]
|
||||
set string [string trim $string "\""]
|
||||
# regsub -all " " $string "_" project
|
||||
puts $string
|
||||
switch $keyWord {
|
||||
ProjectName {InsertEnt $frm_1.txtProjName "$string"}
|
||||
ProjectFileName {InsertEnt $frm_2.txtFileName "$string"}
|
||||
ProjectDirName {InsertEnt $frm_8.txtDirName "$string"}
|
||||
ProjectCompiler {InsertEnt $frm_13.txtCompiler "$string"}
|
||||
ProjectInterp {InsertEnt $frm_12.txtProjInterp "$string"}
|
||||
ProjectVersion {InsertEnt $frm_4.txtProjVersion "$string"}
|
||||
ProjectRelease {InsertEnt $frm_11.txtProjRelease "$string"}
|
||||
ProjectAuthor {InsertEnt $frm_3.txtProjAuthor "$string"}
|
||||
ProjectEmail {InsertEnt $frm_9.txtProjEmail "$string"}
|
||||
ProjectCompany {InsertEnt $frm_5.txtProjCompany "$string"}
|
||||
ProjectHome {InsertEnt $frm_10.txtProjHome "$string"}
|
||||
}
|
||||
}
|
||||
close $file
|
||||
} elseif {$operType == "open"} {
|
||||
$frm_7.lblWinTitle configure -text "[::msgcat::mc "Open project"] $lang"
|
||||
InsertEnt $frm_1.txtProjName "$proj"
|
||||
InsertEnt $frm_2.txtFileName "$proj"
|
||||
InsertEnt $frm_8.txtDirName "$proj"
|
||||
$frm_8.txtDirName configure -state normal
|
||||
puts $prjDir
|
||||
InsertEnt $frm_8.txtDirName "$prjDir"
|
||||
InsertEnt $frm_13.txtCompiler ""
|
||||
InsertEnt $frm_12.txtProjInterp ""
|
||||
InsertEnt $frm_4.txtProjVersion "0.0.1"
|
||||
InsertEnt $frm_11.txtProjRelease "1"
|
||||
InsertEnt $frm_3.txtProjAuthor ""
|
||||
InsertEnt $frm_9.txtProjEmail ""
|
||||
InsertEnt $frm_5.txtProjCompany ""
|
||||
InsertEnt $frm_10.txtProjHome ""
|
||||
} else {
|
||||
InsertEnt $frm_1.txtProjName ""
|
||||
InsertEnt $frm_2.txtFileName ""
|
||||
InsertEnt $frm_8.txtDirName ""
|
||||
InsertEnt $frm_13.txtCompiler ""
|
||||
InsertEnt $frm_12.txtProjInterp ""
|
||||
InsertEnt $frm_4.txtProjVersion "0.0.1"
|
||||
InsertEnt $frm_11.txtProjRelease "1"
|
||||
InsertEnt $frm_3.txtProjAuthor ""
|
||||
InsertEnt $frm_9.txtProjEmail ""
|
||||
InsertEnt $frm_5.txtProjCompany ""
|
||||
InsertEnt $frm_10.txtProjHome ""
|
||||
}
|
||||
}
|
||||
|
||||
## CREATING PROJECT PROCEDURE ##
|
||||
proc CreateProj {type lang txtFileName txtProjName txtFileName txtDirName txtCompiler txtProjInterp txtProjVersion txtProjRelease txtProjAuthor txtProjEmail txtProjCompany txtProjHome} {
|
||||
global projDir workDir tree fontNormal dataDir tcl_platform
|
||||
|
||||
set projShortName [file tail $txtDirName]
|
||||
|
||||
set projFile [open [file join $workDir $projShortName.proj] w]
|
||||
|
||||
puts $projFile "ProjectName \"$txtProjName\""
|
||||
puts $projFile "ProjectFileName \"$txtFileName\""
|
||||
puts $projFile "ProjectDirName \"$txtDirName\""
|
||||
puts $projFile "ProjectCompiler \"$txtCompiler\""
|
||||
puts $projFile "ProjectInterp \"$txtProjInterp\""
|
||||
puts $projFile "ProjectVersion \"$txtProjVersion\""
|
||||
puts $projFile "ProjectRelease \"$txtProjRelease\""
|
||||
puts $projFile "ProjectAuthor \"$txtProjAuthor\""
|
||||
puts $projFile "ProjectEmail \"$txtProjEmail\""
|
||||
puts $projFile "ProjectCompany \"$txtProjCompany\""
|
||||
puts $projFile "ProjectHome \"$txtProjHome\""
|
||||
close $projFile
|
||||
if {$type != "open"} {
|
||||
set dir [file join $projDir $txtDirName]
|
||||
if {[file exists "$dir"] != 1} {
|
||||
file mkdir "$dir"
|
||||
}
|
||||
# file header
|
||||
if {$lang=="Tcl" || $lang == "Perl"} {
|
||||
set text "######################################################\n#\t$txtProjName\n#\tDistributed under GNU Public License\n# Author: $txtProjAuthor $txtProjEmail\n# Home page: $txtProjHome\n######################################################\n"
|
||||
} elseif {$lang == "Perl"} {
|
||||
set lang pl
|
||||
set text "######################################################\n#\t$txtProjName\n#\tDistributed under GNU Public License\n# Author: $txtProjAuthor $txtProjEmail\n# Home page: $txtProjHome\n######################################################\n"
|
||||
} elseif {$lang=="Java"} {
|
||||
set text "/*\n*****************************************************\n*\t$txtProjName\n*\tDistributed under GNU Public License\n* Author: $txtProjAuthor $txtProjEmail\n* Home page: $txtProjHome\n*****************************************************\n*/\n"
|
||||
} elseif {$lang=="Fortran"} {
|
||||
set text "\nc*****************************************************\nc*\t$txtProjName\n*c\tDistributed under GNU Public License\nc* Author: $txtProjAuthor $txtProjEmail\nc* Home page: $txtProjHome\nc*****************************************************\n*/\n"
|
||||
} elseif {$lang=="O'Caml"} {
|
||||
set text "\(*****************************************************\n*\t$txtProjName\n*\tDistributed under GNU Public License\n* Author: $txtProjAuthor $txtProjEmail\n* Home page: $txtProjHome\n******************************************************\)\n"
|
||||
set lang ml
|
||||
} elseif {$lang=="Ruby"} {
|
||||
set lang rb
|
||||
set text "######################################################\n#\t$txtProjName\n#\tDistributed under GNU Public License\n# Author: $txtProjAuthor $txtProjEmail\n# Home page: $txtProjHome\n######################################################\n"
|
||||
} elseif {$lang=="PHP"} {
|
||||
set text "<?\n/////////////////////////////////////////////////////\n//\t$txtProjName\n//\tDistributed under GNU Public License\n// Author: $txtProjAuthor $txtProjEmail\n// Home page: $txtProjHome\n/////////////////////////////////////////////////////\n?>"
|
||||
set lang php
|
||||
} elseif {$lang=="Erlang"} {
|
||||
set text "\%**************************************************\n%\t$txtProjName\n%\tDistributed under GNU Public License\n% Author: $txtProjAuthor $txtProjEmail\n* Home page: $txtProjHome\n%*****************************************************\)\n"
|
||||
set lang erl
|
||||
}
|
||||
if {[file exists [file join $dir $txtFileName]] == 0} {
|
||||
set file [open [file join $dir $txtFileName] w]
|
||||
puts $file $text
|
||||
close $file
|
||||
}
|
||||
# spec file generating
|
||||
if {[file exists [file join $dir $txtFileName.spec]] == 0} {
|
||||
set file [open [file join $dir $txtFileName.spec] w]
|
||||
puts $file "%define name $txtFileName"
|
||||
puts $file "%define version $txtProjVersion"
|
||||
puts $file "%define release $txtProjRelease"
|
||||
puts $file "%define instdir $dataDir"
|
||||
puts $file "Summary:\t$txtProjName"
|
||||
puts $file "Name:\t\t%\{name\}"
|
||||
puts $file "Version:\t%\{version\}"
|
||||
puts $file "Release:\t%\{release\}"
|
||||
puts $file "Source:\t%\{name\}-%\{version\}.tar.gz"
|
||||
puts $file "Copyright:\tGPL"
|
||||
puts $file "Group:\t\tDevelopment"
|
||||
puts $file "Vendor:\t\t$txtProjAuthor <$txtProjEmail>"
|
||||
puts $file "BuildRoot:\t%{_tmppath}/%{name}-buildroot"
|
||||
puts $file "BuildArch:\tnoarch"
|
||||
puts $file "Requires:\ttcl >= 8.3\n"
|
||||
puts $file "%description"
|
||||
puts $file "This project made by Tcl/Tk Project Manager"
|
||||
puts $file "%prep\n%setup -n%\{name\}\n%build\n"
|
||||
puts $file "%install"
|
||||
puts $file "rm -rf \$RPM_BUILD_ROOT"
|
||||
puts $file "mkdir -p \$RPM_BUILD_ROOT%\{_datadir\}/%\{name\}"
|
||||
puts $file "cp -f \* \$RPM_BUILD_ROOT%\{_datadir\}/%\{name\}\n"
|
||||
puts $file "%post\nmkdir \$HOME/.$txtDirName"
|
||||
puts $file "%clean\nrm -rf \$RPM_BUILD_ROOT"
|
||||
puts $file "%files"
|
||||
puts $file "%defattr\(-,root,root\)"
|
||||
puts $file "%doc README TODO CHANGELOG COPYING INSTALL"
|
||||
puts $file "%\{_datadir\}/%\{name\}"
|
||||
puts $file "%define date\t%\(echo \`LC_ALL=\"C\" date +\"%a %b %d %Y\"\`\)"
|
||||
puts $file "%changelog"
|
||||
puts $file "\* %\{date\}\n\n# end of file"
|
||||
close $file
|
||||
}
|
||||
# file attributes "$dir/$txtFileName.tcl" -permissions "777"
|
||||
# catch {chmod 744 "$dir/$txtFileName.tcl"} mes
|
||||
foreach f {README TODO CHANGELOG COPYING INSTALL} {
|
||||
if {[file exists [file join $dir $f]] != 1} {
|
||||
set file [open [file join $dir $f] w]
|
||||
puts $file "$text"
|
||||
if {$f == "CHANGELOG"} {
|
||||
if {$tcl_platform(platform) == "windows"} {
|
||||
set d [clock format [clock scan "now" -base [clock seconds]] -format %d/%m/%Y]
|
||||
} elseif {$tcl_platform(platform) == "mac"} {
|
||||
set d "Needed date command for this platform"
|
||||
} elseif {$tcl_platform(platform) == "unix"} {
|
||||
set d [clock format [clock scan "now" -base [clock seconds]] -format %d/%m/%Y]
|
||||
}
|
||||
|
||||
puts $file "$d\n\t- Beginning the project"
|
||||
}
|
||||
close $file
|
||||
}
|
||||
}
|
||||
} else {
|
||||
## Insert new project into tree ##
|
||||
$tree insert end root $projShortName -text "$txtProjName" -font $fontNormal \
|
||||
-data "prj_$projShortName" -open 0 -image [Bitmap::get folder]
|
||||
GetFiles $txtDirName $projShortName $tree
|
||||
}
|
||||
}
|
||||
## SAVING PROJECT SETTINGS ##
|
||||
proc SaveProj {txtFileName txtProjName txtFileName txtDirName txtCompiler txtProjInterp txtProjVersion txtProjRelease txtProjAuthor txtProjEmail txtProjCompany txtProjHome} {
|
||||
global projDir workDir tree fontNormal dataDir
|
||||
|
||||
set file [file tail $txtDirName]
|
||||
|
||||
set projFile [open [file join $workDir $file.proj] w]
|
||||
puts $projFile "ProjectName \"$txtProjName\""
|
||||
puts $projFile "ProjectFileName \"$txtFileName\""
|
||||
puts $projFile "ProjectDirName \"$txtDirName\""
|
||||
puts $projFile "ProjectCompiler \"$txtCompiler\""
|
||||
puts $projFile "ProjectInterp \"$txtProjInterp\""
|
||||
puts $projFile "ProjectVersion \"$txtProjVersion\""
|
||||
puts $projFile "ProjectRelease \"$txtProjRelease\""
|
||||
puts $projFile "ProjectAuthor \"$txtProjAuthor\""
|
||||
puts $projFile "ProjectEmail \"$txtProjEmail\""
|
||||
puts $projFile "ProjectCompany \"$txtProjCompany\""
|
||||
puts $projFile "ProjectHome \"$txtProjHome\""
|
||||
close $projFile
|
||||
}
|
||||
|
||||
## OPEN EXISTING PROJECT AND ADDED INYO PROJMAN TREE ##
|
||||
proc OpenProj {} {
|
||||
global projDir workDir openProjDir prjDir prjName
|
||||
set prjDir [SelectDir $projDir]
|
||||
if {$prjDir != ""} {
|
||||
set prjName "[file tail $prjDir]"
|
||||
NewProjDialog open
|
||||
#file copy $prjDir $projDir
|
||||
}
|
||||
return
|
||||
}
|
||||
## ADD FILE INTO PROJECTS ##
|
||||
proc AddToProj {fileName mode} {
|
||||
global projDir workDir activeProject tree noteBook fontNormal imgDir tree
|
||||
|
@ -480,15 +62,13 @@ proc AddToProj {fileName mode} {
|
|||
$tree itemconfigure $activeProject -open 1
|
||||
}
|
||||
set file [file join $dir $fileName]
|
||||
#set f [open $file w]
|
||||
#close $f
|
||||
puts $file
|
||||
|
||||
if {$mode == "directory"} {
|
||||
file mkdir $file
|
||||
return
|
||||
}
|
||||
InsertTitle $file $type
|
||||
EditFile $subNode [file join $dir $fileName]
|
||||
EditFile [GetTreeForNode $subNode] $subNode [file join $dir $fileName]
|
||||
}
|
||||
## ADD FILE INTO PROJECT DIALOG##
|
||||
proc AddToProjDialog {mode} {
|
||||
|
@ -610,7 +190,7 @@ proc DelProj {} {
|
|||
-type yesno -icon question -default yes]
|
||||
case $answer {
|
||||
yes {
|
||||
FileDialog close_all
|
||||
FileDialog $tree close_all
|
||||
file delete -force $projDir
|
||||
file delete -force [file join $workDir $activeProject.proj]
|
||||
file delete -force [file join $workDir $activeProject.tags]
|
||||
|
@ -907,3 +487,16 @@ proc InsertTitle {newFile type} {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
502
lib/projects_new.tcl
Normal file
502
lib/projects_new.tcl
Normal file
|
@ -0,0 +1,502 @@
|
|||
#######################################
|
||||
# Tcl/Tk Project Manager
|
||||
# Distributed under GNU Public License
|
||||
# Author: Serge Kalinin banzaj28@yandex.ru
|
||||
# Copyright (c) "https://nuk-svk.ru", 2018,
|
||||
# Home: https://bitbucket.org/svk28/projman
|
||||
#######################################
|
||||
|
||||
|
||||
proc NewProj {type proj l} {
|
||||
global fontNormal fontBold tree projDir workDir activeProject fileList noteBook imgDir prjDir
|
||||
global openProjDir tclDir frm lang operType
|
||||
set operType $type
|
||||
if {$operType == "edit" && $proj == ""} {
|
||||
set answer [tk_messageBox\
|
||||
-message "[::msgcat::mc "Not found active project"]"\
|
||||
-type ok -icon warning -title [::msgcat::mc "Warning"]]
|
||||
case $answer {
|
||||
ok {return 0}
|
||||
}
|
||||
}
|
||||
set typeProjects "Tcl Tcl/Tk Java Perl Fortran O'Caml PHP Ruby Erlang"
|
||||
|
||||
set node [$noteBook page [$noteBook index newproj]]
|
||||
if {$node != ""} {
|
||||
$noteBook raise newproj
|
||||
return 0
|
||||
} else {
|
||||
set w [$noteBook insert end newproj -text [::msgcat::mc "New project"]]
|
||||
}
|
||||
set frm [frame $w.frmProjSettings]
|
||||
pack $frm -fill both -expand true
|
||||
|
||||
image create photo imgFold -format gif -file [file join $imgDir folder.gif]
|
||||
variable frm_1
|
||||
set frm_1 [frame $frm.frmProjName]
|
||||
label $frm_1.lblProjName -text [::msgcat::mc "Project name"] -width 20 -anchor w
|
||||
entry $frm_1.txtProjName -textvariable txtProjName -bd 0 -relief flat
|
||||
pack $frm_1.lblProjName -side left
|
||||
pack $frm_1.txtProjName -side left -fill x -expand true
|
||||
|
||||
###
|
||||
set frm_lang [frame $frm.frmLanguage]
|
||||
set lang "Tcl"
|
||||
label $frm_lang.lblLanguage -text [::msgcat::mc "Project type"] -width 20 -anchor w
|
||||
set combo [
|
||||
ComboBox $frm_lang.txtLocale \
|
||||
-textvariable lang -editable false \
|
||||
-autocomplete true -autopost true \
|
||||
-selectbackground "#55c4d1" -selectborderwidth 0 \
|
||||
-values $typeProjects
|
||||
]
|
||||
#$combo setvalues $lang
|
||||
pack $frm_lang.lblLanguage -side left
|
||||
pack $combo -fill x -expand true
|
||||
bind $combo <ButtonRelease-1> { append txtFileName ".[GetExtentionProj $lang]"}
|
||||
###
|
||||
|
||||
set frm_2 [frame $frm.frmFileName]
|
||||
label $frm_2.lblFileName -text [::msgcat::mc "Project file"] -width 20 -anchor w
|
||||
entry $frm_2.txtFileName -textvariable txtFileName -bd 0 -relief flat
|
||||
pack $frm_2.lblFileName -side left
|
||||
pack $frm_2.txtFileName -side left -fill x -expand true
|
||||
bind $frm_2.txtFileName <FocusIn> {
|
||||
append txtFileName ".[GetExtentionProj $lang]"
|
||||
}
|
||||
#$frm_2.txtFileName insert end $txtProjName
|
||||
|
||||
set frm_8 [frame $frm.frmDirName]
|
||||
label $frm_8.lblDirName -text [::msgcat::mc "Project dir"] -width 20 -anchor w
|
||||
entry $frm_8.txtDirName -textvariable txtDirName
|
||||
button $frm_8.btnDirName -image imgFold -relief flat \
|
||||
-command {
|
||||
$frm.frmDirName.txtDirName configure -state normal
|
||||
InsertEnt $frm.frmDirName.txtDirName [tk_chooseDirectory -initialdir $projDir -title "[::msgcat::mc "Select directory"]" -parent .]
|
||||
$frm.frmDirName.txtDirName configure -state disable
|
||||
}
|
||||
pack $frm_8.lblDirName -side left
|
||||
pack $frm_8.txtDirName -side left -fill x -expand true
|
||||
pack $frm_8.btnDirName -side left
|
||||
bind $frm_8.txtDirName <FocusIn> {
|
||||
|
||||
}
|
||||
|
||||
set frm_13 [frame $frm.frmCompiler]
|
||||
label $frm_13.lblCompiler -text [::msgcat::mc "Compiler"]\
|
||||
-width 20 -anchor w
|
||||
entry $frm_13.txtCompiler -textvariable txtCompiler
|
||||
button $frm_13.btnCompiler -image imgFold -relief flat\
|
||||
-command {
|
||||
InsertEnt $frm.frmCompiler.txtCompiler [tk_getOpenFile -initialdir $tclDir -parent .]
|
||||
}
|
||||
pack $frm_13.lblCompiler -side left
|
||||
pack $frm_13.txtCompiler -side left -fill x -expand true
|
||||
pack $frm_13.btnCompiler -side left
|
||||
|
||||
set txtProjInterp [GetInterp $lang]
|
||||
set frm_12 [frame $frm.frmProjInterp]
|
||||
label $frm_12.lblProjInterp -text [::msgcat::mc "Interpetator"]\
|
||||
-width 20 -anchor w
|
||||
entry $frm_12.txtProjInterp -textvariable txtProjInterp
|
||||
button $frm_12.btnInterp -image imgFold -relief flat\
|
||||
-command {
|
||||
InsertEnt $frm.frmProjInterp.txtProjInterp [tk_getOpenFile -initialdir $tclDir -parent .]
|
||||
}
|
||||
pack $frm_12.lblProjInterp -side left
|
||||
pack $frm_12.txtProjInterp -side left -fill x -expand true
|
||||
pack $frm_12.btnInterp -side left
|
||||
bind $frm_12.txtProjInterp <FocusIn> {
|
||||
set txtProjInterp [GetInterp $lang]
|
||||
}
|
||||
|
||||
set frm_4 [frame $frm.frmVersion]
|
||||
label $frm_4.lblProjVersion -text [::msgcat::mc "Version"] -width 20 -anchor w
|
||||
entry $frm_4.txtProjVersion -textvariable txtProjVersion -bd 0 -relief flat
|
||||
pack $frm_4.lblProjVersion -side left
|
||||
pack $frm_4.txtProjVersion -side left -fill x -expand true
|
||||
InsertEnt $frm_4.txtProjVersion "0.0.1"
|
||||
|
||||
set frm_11 [frame $frm.frmRelease]
|
||||
label $frm_11.lblProjRelease -text [::msgcat::mc "Release"] -width 20 -anchor w
|
||||
entry $frm_11.txtProjRelease -textvariable txtProjRelease -bd 0 -relief flat
|
||||
pack $frm_11.lblProjRelease -side left
|
||||
pack $frm_11.txtProjRelease -side left -fill x -expand true
|
||||
InsertEnt $frm_11.txtProjRelease "1"
|
||||
|
||||
set frm_3 [frame $frm.frmProjAuthor]
|
||||
label $frm_3.lblProjAuthor -text [::msgcat::mc "Author"] -width 20 -anchor w
|
||||
entry $frm_3.txtProjAuthor -textvariable txtProjAuthor -bd 0 -relief flat
|
||||
pack $frm_3.lblProjAuthor -side left
|
||||
pack $frm_3.txtProjAuthor -side left -fill x -expand true
|
||||
|
||||
set frm_9 [frame $frm.frmProjEmail]
|
||||
label $frm_9.lblProjEmail -text [::msgcat::mc "E-mail"] -width 20 -anchor w
|
||||
entry $frm_9.txtProjEmail -textvariable txtProjEmail -bd 0 -relief flat
|
||||
pack $frm_9.lblProjEmail -side left
|
||||
pack $frm_9.txtProjEmail -side left -fill x -expand true
|
||||
|
||||
set frm_5 [frame $frm.frmProjCompany]
|
||||
label $frm_5.lblProjCompany -text [::msgcat::mc "Company"] -width 20 -anchor w
|
||||
entry $frm_5.txtProjCompany -textvariable txtProjCompany -bd 0 -relief flat
|
||||
pack $frm_5.lblProjCompany -side left
|
||||
pack $frm_5.txtProjCompany -side left -fill x -expand true
|
||||
|
||||
set frm_10 [frame $frm.frmProjHome]
|
||||
label $frm_10.lblProjHome -text [::msgcat::mc "Home page"] -width 20 -anchor w
|
||||
entry $frm_10.txtProjHome -textvariable txtProjHome
|
||||
pack $frm_10.lblProjHome -side left
|
||||
pack $frm_10.txtProjHome -side left -fill x -expand true
|
||||
|
||||
set frm_7 [frame $frm.frmWinTitle ]
|
||||
label $frm_7.lblWinTitle -text [::msgcat::mc "Create new project"] -height 2 -font $fontBold
|
||||
|
||||
|
||||
pack $frm_7.lblWinTitle -fill x -expand true
|
||||
|
||||
set frm_6 [frame $frm.frmBtn ]
|
||||
if {$operType == "edit" && $proj != ""} {
|
||||
$noteBook itemconfigure newproj -text [::msgcat::mc "Project settings"]
|
||||
button $frm_6.btnProjCreate -text [::msgcat::mc "Save"] -relief flat \
|
||||
-font $fontNormal -command {
|
||||
regsub -all {\\} $txtProjInterp {\\\\} $txtProjInterp
|
||||
SaveProj "$txtFileName" "$lang" "$txtProjName" "$txtFileName" "$txtDirName"\
|
||||
"$txtCompiler" "$txtProjInterp" "$txtProjVersion" "$txtProjRelease"\
|
||||
"$txtProjAuthor" "$txtProjEmail" "$txtProjCompany" "$txtProjHome"
|
||||
$noteBook delete newproj
|
||||
$noteBook raise [$noteBook page end]
|
||||
}
|
||||
} else {
|
||||
button $frm_6.btnProjCreate -text [::msgcat::mc "Create"] -relief flat \
|
||||
-font $fontNormal -command {
|
||||
CreateProj "$operType" "$lang" "$txtFileName" "$txtProjName" "$txtFileName" "$txtDirName"\
|
||||
"$txtCompiler" "$txtProjInterp" "$txtProjVersion" "$txtProjRelease"\
|
||||
"$txtProjAuthor" "$txtProjEmail" "$txtProjCompany" "$txtProjHome"
|
||||
$noteBook delete newproj
|
||||
$noteBook raise [$noteBook page end]
|
||||
}
|
||||
|
||||
}
|
||||
button $frm_6.btnClose -text [::msgcat::mc "Cancel"] -relief flat -font $fontNormal -command {
|
||||
$noteBook delete newproj
|
||||
$noteBook raise [$noteBook page end]
|
||||
}
|
||||
pack $frm_6.btnProjCreate $frm_6.btnClose -padx 10 -pady 20 -side right
|
||||
pack $frm_7 $frm_1 $frm_lang $frm_2 $frm_8 $frm_13 $frm_12 $frm_4 $frm_11 $frm_3 $frm_9 $frm_5 $frm_10 $frm_6\
|
||||
-side top -fill x -padx 10 -pady 5
|
||||
pack $frm_6 -side top -fill x -expand true -anchor n
|
||||
bind $w <Escape> "$noteBook delete newproj"
|
||||
$noteBook raise newproj
|
||||
|
||||
## EDIT PROJECT SETTINGS ##
|
||||
if {$operType == "edit" && $proj != ""} {
|
||||
$frm.frmDirName.txtDirName configure -state normal
|
||||
$frm_7.lblWinTitle configure -text [::msgcat::mc "Project settings"]
|
||||
$frm_6.btnProjCreate configure -text "[::msgcat::mc "Save"]"
|
||||
set file [open [file join $workDir $proj.proj] r]
|
||||
while {[gets $file line]>=0} {
|
||||
scan $line "%s" keyWord
|
||||
set string [string range $line [string first "\"" $line] [string last "\"" $line]]
|
||||
set string [string trim $string "\""]
|
||||
# regsub -all " " $string "_" project
|
||||
puts $string
|
||||
switch $keyWord {
|
||||
ProjectName {InsertEnt $frm_1.txtProjName "$string"}
|
||||
ProjectFileName {InsertEnt $frm_2.txtFileName "$string"}
|
||||
ProjectLanguage {set lang "$string"}
|
||||
ProjectDirName {InsertEnt $frm_8.txtDirName "$string"}
|
||||
ProjectCompiler {InsertEnt $frm_13.txtCompiler "$string"}
|
||||
ProjectInterp {InsertEnt $frm_12.txtProjInterp "$string"}
|
||||
ProjectVersion {InsertEnt $frm_4.txtProjVersion "$string"}
|
||||
ProjectRelease {InsertEnt $frm_11.txtProjRelease "$string"}
|
||||
ProjectAuthor {InsertEnt $frm_3.txtProjAuthor "$string"}
|
||||
ProjectEmail {InsertEnt $frm_9.txtProjEmail "$string"}
|
||||
ProjectCompany {InsertEnt $frm_5.txtProjCompany "$string"}
|
||||
ProjectHome {InsertEnt $frm_10.txtProjHome "$string"}
|
||||
}
|
||||
}
|
||||
close $file
|
||||
} elseif {$operType == "open"} {
|
||||
$frm_7.lblWinTitle configure -text [::msgcat::mc "Open project"]
|
||||
InsertEnt $frm_1.txtProjName "$proj"
|
||||
InsertEnt $frm_2.txtFileName "$proj"
|
||||
#$combo setvalue $lang
|
||||
InsertEnt $frm_8.txtDirName "$proj"
|
||||
$frm_8.txtDirName configure -state normal
|
||||
puts $prjDir
|
||||
InsertEnt $frm_8.txtDirName "$prjDir"
|
||||
InsertEnt $frm_13.txtCompiler ""
|
||||
InsertEnt $frm_12.txtProjInterp ""
|
||||
InsertEnt $frm_4.txtProjVersion "0.0.1"
|
||||
InsertEnt $frm_11.txtProjRelease "1"
|
||||
InsertEnt $frm_3.txtProjAuthor ""
|
||||
InsertEnt $frm_9.txtProjEmail ""
|
||||
InsertEnt $frm_5.txtProjCompany ""
|
||||
InsertEnt $frm_10.txtProjHome ""
|
||||
} else {
|
||||
InsertEnt $frm_1.txtProjName ""
|
||||
InsertEnt $frm_2.txtFileName ""
|
||||
InsertEnt $frm_8.txtDirName ""
|
||||
InsertEnt $frm_13.txtCompiler ""
|
||||
InsertEnt $frm_12.txtProjInterp ""
|
||||
InsertEnt $frm_4.txtProjVersion "0.0.1"
|
||||
InsertEnt $frm_11.txtProjRelease "1"
|
||||
InsertEnt $frm_3.txtProjAuthor ""
|
||||
InsertEnt $frm_9.txtProjEmail ""
|
||||
InsertEnt $frm_5.txtProjCompany ""
|
||||
InsertEnt $frm_10.txtProjHome ""
|
||||
}
|
||||
# bind autocomlite dir only if new project
|
||||
if {[$frm_8.txtDirName get ] eq ""} {
|
||||
bind $frm_1.txtProjName <KeyRelease> {
|
||||
regsub -all -- {\s} [string tolower [Translit [$frm_1.txtProjName get]]] "_" txtFileName
|
||||
set txtDirName [file join $projDir $txtFileName]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
proc GetExtentionProj {lang} {
|
||||
if {$lang=="Tcl" || $lang=="Tcl/Tk"} {
|
||||
set ext "tcl"
|
||||
} elseif {$lang == "Perl"} {
|
||||
set ext pl
|
||||
} elseif {$lang=="Java"} {
|
||||
set ext "java"
|
||||
} elseif {$lang=="Fortran"} {
|
||||
set ext "for"
|
||||
} elseif {$lang=="O'Caml"} {
|
||||
set ext ml
|
||||
} elseif {$lang=="Ruby"} {
|
||||
set ext rb
|
||||
} elseif {$lang=="PHP"} {
|
||||
set ext php
|
||||
} elseif {$lang=="Erlang"} {
|
||||
set ext erl
|
||||
}
|
||||
return $ext
|
||||
}
|
||||
proc GetInterp {lang} {
|
||||
global tcl_platform
|
||||
if {$tcl_platform(platform) == "unix"} {
|
||||
set interp [GetInterp_unix $lang]
|
||||
} elseif {$tcl_platform(platform) == "windows"} {
|
||||
set interp [GetInterp_windows $lang]
|
||||
} else {
|
||||
set interp ""
|
||||
}
|
||||
return $interp
|
||||
}
|
||||
|
||||
proc GetInterp_unix {lang} {
|
||||
set searchCommand "which"
|
||||
switch $lang {
|
||||
Tcl {set interp "tclsh"}
|
||||
Tcl/Tk {set interp "wish"}
|
||||
Perl {set interp "perl"}
|
||||
Java {set interp "java"}
|
||||
Fortran {set interp ""}
|
||||
O'Caml {set interp ""}
|
||||
Ruby {set interp "ruby"}
|
||||
PHP {set interp "php"}
|
||||
Perl {set interp "perl"}
|
||||
Erlang {set interp ""}
|
||||
}
|
||||
try {
|
||||
set result [exec $searchCommand $interp]
|
||||
} trap {} {} {
|
||||
puts "Error: don't find interp for $lang"
|
||||
set result ""
|
||||
}
|
||||
return $result
|
||||
}
|
||||
proc GetInterp_windows {lang} {
|
||||
set searchCommand "where"
|
||||
switch $lang {
|
||||
Tcl {set interp "tclsh"}
|
||||
Tcl/Tk {set interp "wish"}
|
||||
Perl {set interp "perl"}
|
||||
Java {set interp "java"}
|
||||
Fortran {set interp ""}
|
||||
O'Caml {set interp ""}
|
||||
Ruby {set interp "ruby"}
|
||||
PHP {set interp "php"}
|
||||
Perl {set interp "perl"}
|
||||
Erlang {set interp ""}
|
||||
}
|
||||
try {
|
||||
set result [exec $searchCommand $interp]
|
||||
} trap {} {} {
|
||||
puts "Error: don't find interp for $lang"
|
||||
set result ""
|
||||
}
|
||||
return $result
|
||||
}
|
||||
|
||||
proc SaveProj {txtFileName lang txtProjName txtFileName txtDirName \
|
||||
txtCompiler txtProjInterp txtProjVersion txtProjRelease txtProjAuthor \
|
||||
txtProjEmail txtProjCompany txtProjHome} {
|
||||
global projDir workDir dataDir
|
||||
|
||||
set file [file tail $txtDirName]
|
||||
set projFile [open [file join $workDir $file.proj] w]
|
||||
puts $projFile "ProjectName \"$txtProjName\""
|
||||
puts $projFile "ProjectLanguage \"$lang\""
|
||||
puts $projFile "ProjectFileName \"$txtFileName\""
|
||||
puts $projFile "ProjectDirName \"$txtDirName\""
|
||||
puts $projFile "ProjectCompiler \"$txtCompiler\""
|
||||
puts $projFile "ProjectInterp \"$txtProjInterp\""
|
||||
puts $projFile "ProjectVersion \"$txtProjVersion\""
|
||||
puts $projFile "ProjectRelease \"$txtProjRelease\""
|
||||
puts $projFile "ProjectAuthor \"$txtProjAuthor\""
|
||||
puts $projFile "ProjectEmail \"$txtProjEmail\""
|
||||
puts $projFile "ProjectCompany \"$txtProjCompany\""
|
||||
puts $projFile "ProjectHome \"$txtProjHome\""
|
||||
close $projFile
|
||||
}
|
||||
|
||||
|
||||
## CREATING PROJECT PROCEDURE ##
|
||||
proc CreateProj {type lang txtFileName txtProjName txtFileName txtDirName \
|
||||
txtCompiler txtProjInterp txtProjVersion txtProjRelease txtProjAuthor txtProjEmail \
|
||||
txtProjCompany txtProjHome} {
|
||||
global projDir workDir tree fontNormal dataDir tcl_platform
|
||||
puts "$type $lang";# "$txtFileName" "$txtProjName" "$txtFileName" "$txtDirName"\
|
||||
# "$txtCompiler" "$txtProjInterp" "$txtProjVersion" "$txtProjRelease"\
|
||||
# "$txtProjAuthor" "$txtProjEmail" "$txtProjCompany" "$txtProjHome"
|
||||
## SAVING PROJECT SETTINGS ##
|
||||
set projShortName [file tail $txtDirName]
|
||||
|
||||
set projFile [open [file join $workDir $projShortName.proj] w]
|
||||
|
||||
puts $projFile "ProjectName \"$txtProjName\""
|
||||
puts $projFile "ProjectLanguage \"$lang\""
|
||||
puts $projFile "ProjectFileName \"$txtFileName\""
|
||||
puts $projFile "ProjectDirName \"$txtDirName\""
|
||||
puts $projFile "ProjectCompiler \"$txtCompiler\""
|
||||
puts $projFile "ProjectInterp \"$txtProjInterp\""
|
||||
puts $projFile "ProjectVersion \"$txtProjVersion\""
|
||||
puts $projFile "ProjectRelease \"$txtProjRelease\""
|
||||
puts $projFile "ProjectAuthor \"$txtProjAuthor\""
|
||||
puts $projFile "ProjectEmail \"$txtProjEmail\""
|
||||
puts $projFile "ProjectCompany \"$txtProjCompany\""
|
||||
puts $projFile "ProjectHome \"$txtProjHome\""
|
||||
close $projFile
|
||||
if {$type != "open"} {
|
||||
set dir [file join $projDir $txtDirName]
|
||||
if {[file exists "$dir"] != 1} {
|
||||
file mkdir "$dir"
|
||||
}
|
||||
# file header
|
||||
if {$lang=="Tcl" || $lang == "Tcl/Tk"} {
|
||||
set text "######################################################\n#\t$txtProjName\n#\tDistributed under GNU Public License\n# Author: $txtProjAuthor $txtProjEmail\n# Home page: $txtProjHome\n######################################################\n"
|
||||
} elseif {$lang == "Perl"} {
|
||||
set lang pl
|
||||
set text "######################################################\n#\t$txtProjName\n#\tDistributed under GNU Public License\n# Author: $txtProjAuthor $txtProjEmail\n# Home page: $txtProjHome\n######################################################\n"
|
||||
} elseif {$lang=="Java"} {
|
||||
set text "/*\n*****************************************************\n*\t$txtProjName\n*\tDistributed under GNU Public License\n* Author: $txtProjAuthor $txtProjEmail\n* Home page: $txtProjHome\n*****************************************************\n*/\n"
|
||||
} elseif {$lang=="Fortran"} {
|
||||
set text "\nc*****************************************************\nc*\t$txtProjName\n*c\tDistributed under GNU Public License\nc* Author: $txtProjAuthor $txtProjEmail\nc* Home page: $txtProjHome\nc*****************************************************\n*/\n"
|
||||
} elseif {$lang=="O'Caml"} {
|
||||
set text "\(*****************************************************\n*\t$txtProjName\n*\tDistributed under GNU Public License\n* Author: $txtProjAuthor $txtProjEmail\n* Home page: $txtProjHome\n******************************************************\)\n"
|
||||
set lang ml
|
||||
} elseif {$lang=="Ruby"} {
|
||||
set lang rb
|
||||
set text "######################################################\n#\t$txtProjName\n#\tDistributed under GNU Public License\n# Author: $txtProjAuthor $txtProjEmail\n# Home page: $txtProjHome\n######################################################\n"
|
||||
} elseif {$lang=="PHP"} {
|
||||
set text "<?\n/////////////////////////////////////////////////////\n//\t$txtProjName\n//\tDistributed under GNU Public License\n// Author: $txtProjAuthor $txtProjEmail\n// Home page: $txtProjHome\n/////////////////////////////////////////////////////\n?>"
|
||||
set lang php
|
||||
} elseif {$lang=="Erlang"} {
|
||||
set text "\%**************************************************\n%\t$txtProjName\n%\tDistributed under GNU Public License\n% Author: $txtProjAuthor $txtProjEmail\n* Home page: $txtProjHome\n%*****************************************************\)\n"
|
||||
set lang erl
|
||||
}
|
||||
if {[file exists [file join $dir $txtFileName]] == 0} {
|
||||
set file [open [file join $dir $txtFileName] w]
|
||||
puts $file $text
|
||||
close $file
|
||||
}
|
||||
# file attributes "$dir/$txtFileName.tcl" -permissions "777"
|
||||
# catch {chmod 744 "$dir/$txtFileName.tcl"} mes
|
||||
foreach f {README TODO CHANGELOG COPYING INSTALL} {
|
||||
if {[file exists [file join $dir $f]] != 1} {
|
||||
set file [open [file join $dir $f] w]
|
||||
puts $file "$text"
|
||||
if {$f == "CHANGELOG"} {
|
||||
if {$tcl_platform(platform) == "windows"} {
|
||||
set d [clock format [clock scan "now" -base [clock seconds]] -format %d/%m/%Y]
|
||||
} elseif {$tcl_platform(platform) == "mac"} {
|
||||
set d "Needed date command for this platform"
|
||||
} elseif {$tcl_platform(platform) == "unix"} {
|
||||
set d [clock format [clock scan "now" -base [clock seconds]] -format %d/%m/%Y]
|
||||
}
|
||||
|
||||
puts $file "$d\n\t- Beginning the project"
|
||||
}
|
||||
close $file
|
||||
}
|
||||
}
|
||||
} else {
|
||||
## Insert new project into tree ##
|
||||
# $tree insert end root $projShortName -text "$txtProjName" -font $fontNormal \
|
||||
# -data "prj_$projShortName" -open 0 -image [Bitmap::get folder]
|
||||
# GetFiles $txtDirName $projShortName $tree
|
||||
}
|
||||
AddNewProjectIntoTree $projShortName.proj
|
||||
}
|
||||
|
||||
## OPEN EXISTING PROJECT AND ADDED INYO PROJMAN TREE ##
|
||||
proc OpenProj {nbNode} {
|
||||
global projDir workDir openProjDir prjDir prjName
|
||||
#set prjDir [SelectDir $projDir]
|
||||
# puts $nbNode
|
||||
# what is a tree we clicked?
|
||||
if {$nbNode eq "files"} {
|
||||
set tree .frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles
|
||||
} elseif {$nbNode eq "projects"} {
|
||||
set tree .frmBody.frmCat.noteBook.fprojects.frmTree.tree
|
||||
}
|
||||
set item [$tree itemcget [$tree selection get] -data]
|
||||
puts $item
|
||||
if {[file isdirectory $item]} {
|
||||
set prjDir $item
|
||||
} elseif {[file isfile $item]} {
|
||||
tk_messageBox -type ok -icon error -message "File will not added like project!"
|
||||
return
|
||||
}
|
||||
|
||||
if {$prjDir != ""} {
|
||||
set prjName "[file tail $prjDir]"
|
||||
NewProj open "" ""
|
||||
#file copy $prjDir $projDir
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
proc AddNewProjectIntoTree {proj} {
|
||||
global workDir tree imgDir fontNormal
|
||||
lappend rList [list [file join $workDir $proj]]
|
||||
set projFile [open [file join $workDir $proj] r]
|
||||
set prjName [file rootname $proj]
|
||||
while {[gets $projFile line]>=0} {
|
||||
scan $line "%s" keyWord
|
||||
set string [string range $line [string first "\"" $line] [string last "\"" $line]]
|
||||
set string [string trim $string "\""]
|
||||
if {$keyWord == "ProjectName"} {
|
||||
regsub -all " " $string "_" project
|
||||
set projName "$string"
|
||||
}
|
||||
if {$keyWord == "ProjectDirName"} {
|
||||
set projList($prjName) [file dirname $string]
|
||||
puts "$projList($prjName) - $string"
|
||||
$tree insert end root $prjName -text "$projName" -font $fontNormal \
|
||||
-data "prj_$prjName" -open 0\
|
||||
-image [Bitmap::get [file join $imgDir folder.gif]]
|
||||
GetFiles [file join $string] $prjName $tree
|
||||
set dir $string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
64
lib/toolbar.tcl
Normal file
64
lib/toolbar.tcl
Normal file
|
@ -0,0 +1,64 @@
|
|||
#!/usr/bin/wish
|
||||
######################################################
|
||||
# Tcl/Tk Project Manager
|
||||
# Distributed under GNU Public License
|
||||
# Author: Sergey Kalinin banzaj28@yandex.ru
|
||||
# Copyright (c) "https://nuk-svk.ru", 2018
|
||||
# Home: https://bitbucket.org/svk28/projman
|
||||
######################################################
|
||||
#
|
||||
# Toolbar create procedures
|
||||
#
|
||||
######################################################
|
||||
|
||||
proc Separator {} {
|
||||
global sepIndex editor
|
||||
set f [frame .frmTool.separator$sepIndex -width 10 -border 1 \
|
||||
-background $editor(bg) -relief raised]
|
||||
incr sepIndex 1
|
||||
return $f
|
||||
}
|
||||
|
||||
proc CreateToolBar {} {
|
||||
global toolBar fontBold noteBook tree imgDir editor
|
||||
if {$toolBar == "Yes"} {
|
||||
set bboxFile [ButtonBox .frmTool.bboxFile -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
add_toolbar_button $bboxFile new.png {AddToProjDialog file} [::msgcat::mc "Create new file"]
|
||||
#add_toolbar_button $bboxFile open.png {FileDialog $tree open} [::msgcat::mc "Open file"]
|
||||
add_toolbar_button $bboxFile save.png {FileDialog $tree save} [::msgcat::mc "Save file"]
|
||||
add_toolbar_button $bboxFile save_as.png {FileDialog $tree save_as} [::msgcat::mc "Save file as"]
|
||||
add_toolbar_button $bboxFile save_all.png {FileDialog $tree save_all} [::msgcat::mc "Save all"]
|
||||
add_toolbar_button $bboxFile printer.png {PrintDialog} [::msgcat::mc "Print ..."]
|
||||
add_toolbar_button $bboxFile close.png {FileDialog $tree close} [::msgcat::mc "Close"]
|
||||
|
||||
set bboxEdit [ButtonBox .frmTool.bboxEdit -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
add_toolbar_button $bboxEdit copy.png {TextOperation copy} [::msgcat::mc "Copy into clipboard"]
|
||||
add_toolbar_button $bboxEdit cut.png {TextOperation cut} [::msgcat::mc "Cut into clipboard"]
|
||||
add_toolbar_button $bboxEdit paste.png {TextOperation paste} [::msgcat::mc "Paste from clipboard"]
|
||||
add_toolbar_button $bboxEdit undo.png {TextOperation undo} [::msgcat::mc "Undo"]
|
||||
add_toolbar_button $bboxEdit redo.png {TextOperation redo} [::msgcat::mc "Redo"]
|
||||
|
||||
set bboxProj [ButtonBox .frmTool.bboxProj -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
|
||||
add_toolbar_button $bboxProj doit.png {MakeProj run proj} [::msgcat::mc "Running project"]
|
||||
add_toolbar_button $bboxProj doit_file.png {MakeProj run file} [::msgcat::mc "Running file"]
|
||||
add_toolbar_button $bboxProj archive.png {MakeTGZ} [::msgcat::mc "Make TGZ"]
|
||||
|
||||
set bboxHelp [ButtonBox .frmTool.bboxHelp -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
||||
add_toolbar_button $bboxHelp help.png {ShowHelp} [::msgcat::mc "Help"]
|
||||
|
||||
pack $bboxFile [Separator] $bboxEdit [Separator] $bboxProj [Separator] $bboxHelp -side left -anchor w
|
||||
|
||||
}
|
||||
}
|
||||
## TOOLBAR ##
|
||||
proc add_toolbar_button {path icon command helptext} {
|
||||
global editor imgDir
|
||||
image create photo $icon -format png -file [file join $imgDir $icon]
|
||||
$path add -image $icon \
|
||||
-highlightthickness 0 -takefocus 0 -relief link -bd 1 -activebackground $editor(bg)\
|
||||
-padx 1 -pady 1 -command $command -helptext $helptext
|
||||
}
|
||||
# Separator for toolbar
|
||||
|
||||
|
84
lib/translit.tcl
Normal file
84
lib/translit.tcl
Normal file
|
@ -0,0 +1,84 @@
|
|||
|
||||
######################################################
|
||||
# Tcl/Tk Project Manager
|
||||
# Distributed under GNU Public License
|
||||
# Author: Serge Kalinin banzaj28@yandex.ru
|
||||
# Copyright (c) "https://nuk-svk.ru"
|
||||
# 2018, https://bitbucket.org/svk28/projman
|
||||
######################################################
|
||||
#
|
||||
# Transliterate cyrilic symbols into latins
|
||||
#
|
||||
######################################################
|
||||
proc Translit {line} {
|
||||
return [
|
||||
string map {
|
||||
"А" "A"
|
||||
"Б" "B"
|
||||
"В" "V"
|
||||
"Г" "G"
|
||||
"Д" "D"
|
||||
"Е" "E"
|
||||
"Ё" "E"
|
||||
"Ж" "ZH"
|
||||
"З" "Z"
|
||||
"И" "I"
|
||||
"Й" "J"
|
||||
"К" "K"
|
||||
"Л" "L"
|
||||
"М" "M"
|
||||
"Н" "N"
|
||||
"О" "O"
|
||||
"П" "P"
|
||||
"Р" "R"
|
||||
"С" "S"
|
||||
"Т" "T"
|
||||
"У" "U"
|
||||
"Ф" "F"
|
||||
"Х" "H"
|
||||
"Ч" "CH"
|
||||
"Ш" "SH"
|
||||
"Щ" "SCH"
|
||||
"Ь" ""
|
||||
"Ы" "Y"
|
||||
"Ъ" ""
|
||||
"Э" "E"
|
||||
"Ю" "U"
|
||||
"Я" "IA"
|
||||
"а" "a"
|
||||
"б" "b"
|
||||
"в" "v"
|
||||
"г" "g"
|
||||
"д" "d"
|
||||
"е" "e"
|
||||
"ё" "e"
|
||||
"ж" "zh"
|
||||
"з" "z"
|
||||
"и" "i"
|
||||
"й" "j"
|
||||
"к" "k"
|
||||
"л" "l"
|
||||
"м" "m"
|
||||
"н" "n"
|
||||
"о" "o"
|
||||
"п" "p"
|
||||
"р" "r"
|
||||
"с" "s"
|
||||
"т" "t"
|
||||
"у" "u"
|
||||
"ф" "f"
|
||||
"х" "h"
|
||||
"ц" "c"
|
||||
"ч" "ch"
|
||||
"ш" "sh"
|
||||
"щ" "sch"
|
||||
"ь" ""
|
||||
"ы" "y"
|
||||
"ъ" ""
|
||||
"э" "e"
|
||||
"ю" "u"
|
||||
"я" "ia"
|
||||
} $line
|
||||
]
|
||||
}
|
||||
|
36
lib/tree.tcl
36
lib/tree.tcl
|
@ -30,7 +30,6 @@ proc FileTree::create {nb} {
|
|||
} -opencmd {FileTree::select tree 1 $treeFiles} \
|
||||
-closecmd {FileTree::select tree 1 $treeFiles}
|
||||
]
|
||||
puts $treeFiles
|
||||
$frmTreeFiles setwidget $treeFiles
|
||||
pack $frmTreeFiles -side top -fill both -expand true
|
||||
$treeFiles bindText <ButtonPress-1> "TreeOneClick $treeFiles [$treeFiles selection get]"
|
||||
|
@ -38,6 +37,10 @@ proc FileTree::create {nb} {
|
|||
$treeFiles bindImage <Double-ButtonPress-1> "TreeDoubleClick $treeFiles [$treeFiles selection get]"
|
||||
$treeFiles bindText <Double-ButtonPress-1> "TreeDoubleClick $treeFiles [$treeFiles selection get]"
|
||||
$treeFiles bindText <Shift-Button-1> {$treeFiles selection add $treeFiles [$treeFiles selection get]}
|
||||
# Added menu
|
||||
GetMenuFileTree [menu .popMenuFileTree -bg $editor(bg) -fg $editor(fg)] ;# pop-up edit menu
|
||||
|
||||
bind $frmTreeFiles.treeFiles.c <Button-3> {catch [PopupMenuFileTree $treeFiles %X %Y]}
|
||||
|
||||
FileTree::GetAllDirs $treeFiles
|
||||
}
|
||||
|
@ -175,7 +178,6 @@ proc FileTree::edit { where treeFile node } {
|
|||
|
||||
}
|
||||
|
||||
|
||||
proc FileTree::expand { treeFile but } {
|
||||
if { [set cur [$treeFile selection get]] != "" } {
|
||||
if { $but == 0 } {
|
||||
|
@ -216,7 +218,7 @@ proc GetFilesSubdir {tree node dir} {
|
|||
if {$dotFileShow eq "Yes"} {
|
||||
foreach file [lsort [glob -nocomplain .*]] {
|
||||
if {$file == "." || $file == ".."} {
|
||||
puts $file
|
||||
#puts $file
|
||||
} else {
|
||||
lappend rList [list [file join $dir $file]]
|
||||
set fileName [file join $file]
|
||||
|
@ -294,7 +296,7 @@ proc GetFiles {dir project tree} {
|
|||
if {$dotFileShow eq "Yes"} {
|
||||
foreach file [lsort [glob -nocomplain .*]] {
|
||||
if {$file == "." || $file == ".."} {
|
||||
puts $file
|
||||
#puts $file
|
||||
} else {
|
||||
lappend rList [list [file join $dir $file]]
|
||||
set fileName [file join $file]
|
||||
|
@ -367,7 +369,7 @@ proc GetProj {tree} {
|
|||
}
|
||||
if {$keyWord == "ProjectDirName"} {
|
||||
set projList($prjName) [file dirname $string]
|
||||
puts "$projList($prjName) - $string"
|
||||
#puts "$projList($prjName) - $string"
|
||||
$tree insert end root $prjName -text "$projName" -font $fontNormal \
|
||||
-data "prj_$prjName" -open 0\
|
||||
-image [Bitmap::get [file join $imgDir folder.gif]]
|
||||
|
@ -380,6 +382,17 @@ proc GetProj {tree} {
|
|||
}
|
||||
|
||||
## SHOW PUP-UP MENUS ##
|
||||
proc PopupMenuFileTree {treeFiles x y} {
|
||||
#global fontNormal fontBold imgDir activeProject
|
||||
set node [$treeFiles selection get]
|
||||
$treeFiles selection set $node
|
||||
#set item [$treeFiles itemcget $node -data]
|
||||
if {[info exists fileList($node)] != 1} {
|
||||
# set fileList($node) $item
|
||||
tk_popup .popupFile $x $y
|
||||
}
|
||||
}
|
||||
|
||||
proc PopupMenuTree {x y} {
|
||||
global tree fontNormal fontBold imgDir activeProject
|
||||
set node [$tree selection get]
|
||||
|
@ -405,6 +418,7 @@ proc PopupMenuTree {x y} {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
## OPEN TREE PROCEDURE
|
||||
proc TreeOpen {node} {
|
||||
global fontNormal tree projDir workDir activeProject fileList noteBook findString imgDir fontBold
|
||||
|
@ -413,7 +427,7 @@ proc TreeOpen {node} {
|
|||
set item [$tree itemcget $node -data]
|
||||
if {[string range $item 0 2] == "prj"} {
|
||||
set activeProject [string range $item 4 end]
|
||||
puts $activeProject
|
||||
#puts $activeProject
|
||||
.frmStatus.frmActive.lblActive configure -text [$tree itemcget $node -text] -font $fontBold
|
||||
$tree itemconfigure $node -image [Bitmap::get [file join $imgDir openfold.gif]]
|
||||
if {[file exists [file join $workDir $activeProject.tags]] == 1} {
|
||||
|
@ -447,13 +461,13 @@ proc TreeClose {node} {
|
|||
## TREE ONE CLICK PROCEDURE ##
|
||||
proc TreeOneClick {tree node} {
|
||||
global fontNormal projDir workDir activeProject fileList noteBook findString imgDir fontBold
|
||||
#puts [$tree selection get]
|
||||
puts [$tree selection set $node]
|
||||
$tree selection get
|
||||
$tree selection set $node
|
||||
#puts "$tree >>> $node"
|
||||
set item [$tree itemcget $node -data]
|
||||
if {[string range $item 0 2] == "prj"} {
|
||||
set activeProject [string range $item 4 end]
|
||||
puts $activeProject
|
||||
#puts $activeProject
|
||||
.frmStatus.frmActive.lblActive configure -text [$tree itemcget $node -text] -font $fontBold
|
||||
if {[file exists [file join $workDir $activeProject.tags]] == 1} {
|
||||
GetTagList [file join $workDir $activeProject.tags] ;# geting tag list
|
||||
|
@ -491,7 +505,7 @@ proc TreeOneClick {tree node} {
|
|||
set findString "let [string range $item $index1 $index2]"
|
||||
} elseif {$fileExt == "php" || $fileExt == "phtml"} {
|
||||
set findString "function [string range $item $index1 $index2]"
|
||||
puts $findString
|
||||
#puts $findString
|
||||
#return
|
||||
} elseif {$fileExt == "rb"} {
|
||||
set findString "class [string range $item $index1 $index2]"
|
||||
|
@ -505,7 +519,7 @@ proc TreeOneClick {tree node} {
|
|||
## TREE DOUBLE CLICK PROCEDURE ##
|
||||
proc TreeDoubleClick {tree node} {
|
||||
global fontNormal projDir workDir activeProject fileList noteBook findString imgDir fontBold
|
||||
puts "$tree $node"
|
||||
#puts "$tree $node"
|
||||
$tree selection set $node
|
||||
set item [$tree itemcget $node -data]
|
||||
#puts $item
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
###########################################################
|
||||
|
||||
::msgcat::mcset en "About ..."
|
||||
::msgcat::mcset en "Add as new project"
|
||||
::msgcat::mcset en "Add to existing project"
|
||||
::msgcat::mcset en "Add to project"
|
||||
::msgcat::mcset en "Author"
|
||||
::msgcat::mcset en "Braces"
|
||||
|
@ -75,6 +77,7 @@
|
|||
::msgcat::mcset en "Install Tcl/Tk Project Manager"
|
||||
::msgcat::mcset en "Input file name"
|
||||
::msgcat::mcset en "Label"
|
||||
::msgcat::mcset en "Language"
|
||||
::msgcat::mcset en "Line number"
|
||||
::msgcat::mcset en "Main"
|
||||
::msgcat::mcset en "Make RPM"
|
||||
|
@ -117,6 +120,7 @@
|
|||
::msgcat::mcset en "Project name"
|
||||
::msgcat::mcset en "Project file"
|
||||
::msgcat::mcset en "Project dir"
|
||||
::msgcat::mcset en "Project type"
|
||||
::msgcat::mcset en "Question"
|
||||
::msgcat::mcset en "Quit without saving?"
|
||||
::msgcat::mcset en "Quote string"
|
||||
|
@ -164,8 +168,3 @@
|
|||
::msgcat::mcset en "Word wrapping"
|
||||
::msgcat::mcset en "Work dir"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
###########################################################
|
||||
|
||||
::msgcat::mcset ru "About ..." "О программе"
|
||||
::msgcat::mcset ru "Add as new project" "Добавить как Новый Проект"
|
||||
::msgcat::mcset ru "Add to existing project" "Добавить в существующий проект"
|
||||
::msgcat::mcset ru "Add to project" "Добавить в проект"
|
||||
::msgcat::mcset ru "Archive created in" "Архив помещен в"
|
||||
::msgcat::mcset ru "Author" "Автор"
|
||||
|
@ -80,6 +82,7 @@
|
|||
::msgcat::mcset ru "Install Tcl/Tk Project Manager" "Установка Tcl/Tk Project Manager"
|
||||
::msgcat::mcset ru "Input file name" "Введите имя файла"
|
||||
::msgcat::mcset ru "Label" "Метка"
|
||||
::msgcat::mcset ru "Language" "Язык"
|
||||
::msgcat::mcset ru "Line number" "Номер строки"
|
||||
::msgcat::mcset ru "Make RPM" "Создать RPM"
|
||||
::msgcat::mcset ru "Make archive" "Создать архив"
|
||||
|
@ -122,6 +125,7 @@
|
|||
::msgcat::mcset ru "Project name" "Название проекта"
|
||||
::msgcat::mcset ru "Project file" "Файл проекта"
|
||||
::msgcat::mcset ru "Project dir" "Каталог проекта"
|
||||
::msgcat::mcset ru "Project type" "Тип проекта"
|
||||
::msgcat::mcset ru "Quit without saving?" "Выйти без сохранения?"
|
||||
::msgcat::mcset ru "Question" "Вопрос"
|
||||
::msgcat::mcset ru "Quote string" "Строка в кавычках"
|
||||
|
@ -169,8 +173,3 @@
|
|||
::msgcat::mcset ru "Work dir" "Рабочий каталог"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
169
msgs/ru_koi8.msg
169
msgs/ru_koi8.msg
|
@ -1,169 +0,0 @@
|
|||
###########################################################
|
||||
# Tcl/Tk Project Manager #
|
||||
# russian messages file #
|
||||
# Copyright (c) "Sergey Kalinin", 2001, http://nuk-svk.ru #
|
||||
# Author: Sergey Kalinin banzaj28@yandex.ru #
|
||||
###########################################################
|
||||
|
||||
::msgcat::mcset ru "About ..." "ď ĐŇĎÇŇÁÍÍĹ"
|
||||
::msgcat::mcset ru "Add to project" "äĎÂÁ×ÉÔŘ × ĐŇĎĹËÔ"
|
||||
::msgcat::mcset ru "Archive created in" "áŇČÉ× ĐĎÍĹÝĹÎ ×"
|
||||
::msgcat::mcset ru "Author" "á×ÔĎŇ"
|
||||
::msgcat::mcset ru "Braces" "óËĎÂËÉ"
|
||||
::msgcat::mcset ru "Quad braces" "ë×ÁÄŇÔÁÎŮĹ ÓËĎÂËÉ"
|
||||
::msgcat::mcset ru "Braces background" "ćĎÎ ÓËĎÂËÉ"
|
||||
::msgcat::mcset ru "Braces foreground" "ă×ĹÔ ÓËĎÂËÉ"
|
||||
::msgcat::mcset ru "Cancel" "ďÔÍĹÎÁ"
|
||||
::msgcat::mcset ru "Can't found file:" "îĹ ÎÁĘÄĹÎ ĆÁĘĚ:"
|
||||
::msgcat::mcset ru "Close" "úÁËŇŮÔŘ"
|
||||
::msgcat::mcset ru "Close all" "úÁËŇŮÔŘ ×ÓĹ"
|
||||
::msgcat::mcset ru "Close Project Manager?" "÷ŮĘÔÉ ÉÚ ĐŇĎÇŇÁÍÍŮ?"
|
||||
::msgcat::mcset ru "Comments" "ëĎÍĹÎÔÁŇÉÉ"
|
||||
::msgcat::mcset ru "Company" "ëĎÍĐÁÎÉŃ"
|
||||
::msgcat::mcset ru "Compiler" "ëĎÍĐÉĚŃÔĎŇ"
|
||||
::msgcat::mcset ru "Compile" "ëĎÍĐÉĚŃĂÉŃ"
|
||||
::msgcat::mcset ru "Compile project" "ëĎÍĐÉĚŃĂÉŃ ĐŇĎĹËÔÁ"
|
||||
::msgcat::mcset ru "Compile file" "ëĎÍĐÉĚŃĂÉŃ ĆÁĘĚÁ"
|
||||
::msgcat::mcset ru "Contents" "óĎÄĹŇÖÁÎÉĹ"
|
||||
::msgcat::mcset ru "Copy" "óËĎĐÉŇĎ×ÁÔŘ"
|
||||
::msgcat::mcset ru "Copy into clipboard" "óËĎĐÉŇĎ×ÁÔŘ × ÂŐĆĹŇ"
|
||||
::msgcat::mcset ru "Create" "óĎÚÄÁÔŘ"
|
||||
::msgcat::mcset ru "Create new project" "óĎÚÄÁÔŘ ÎĎ×ŮĘ ĐŇĎĹËÔ"
|
||||
::msgcat::mcset ru "Create new file" "óĎÚÄÁÔŘ ÎĎ×ŮĘ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "Create directory" "óĎÚÄÁÔŘ ÄÉŇĹËÔĎŇÉŔ"
|
||||
::msgcat::mcset ru "Create backup files" "óĎÚÄÁ×ÁÔŘ ×ŇĹÍĹÎÎŮĹ ĆÁĘĚŮ"
|
||||
::msgcat::mcset ru "Curent directory" "ôĹËŐÝÉĘ ËÁÔÁĚĎÇ"
|
||||
::msgcat::mcset ru "Cut" "÷ŮŇĹÚÁÔŘ"
|
||||
::msgcat::mcset ru "Cut into clipboard" "÷ŮŇĹÚÁÔŘ × ÂŐĆĹŇ"
|
||||
::msgcat::mcset ru "CVS commit" "đĎÍĹÓÔÉÔŘ × CVS"
|
||||
::msgcat::mcset ru "CVS update" "ďÂÎĎ×ÉÔŘ ÉÚ CVS"
|
||||
::msgcat::mcset ru "Delete" "őÄÁĚÉÔŘ"
|
||||
::msgcat::mcset ru "Delete file" "őÄÁĚÉÔŘ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "Delete backup files" "őÄÁĚŃÔŘ ×ŇĹÍĹÎÎŮĹ ĆÁĘĚŮ"
|
||||
::msgcat::mcset ru "Delete project" "őÄÁĚÉÔŘ ĐŇĎĹËÔ"
|
||||
::msgcat::mcset ru "Delete from project" "őÄÁĚÉÔŘ ÉÚ ĐŇĎĹËÔÁ"
|
||||
::msgcat::mcset ru "Docs dir" "ëÁÔÁĚĎÇ ÄĎËŐÍĹÎÔÁĂÉÉ"
|
||||
::msgcat::mcset ru "Don't selected file" "îĹ ĎĐŇĹÄĹĚĹÎ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "E-mail" "üĚ. ĐĎŢÔÁ"
|
||||
::msgcat::mcset ru "Edit" "ňĹÄÁËÔÉŇĎ×ÁÎÉĹ"
|
||||
::msgcat::mcset ru "Editor" "ňĹÄÁËÔĎŇ"
|
||||
::msgcat::mcset ru "Editor background" "ă×ĹÔ ĆĎÎÁ"
|
||||
::msgcat::mcset ru "Editor foreground" "ă×ĹÔ ŰŇÉĆÔÁ"
|
||||
::msgcat::mcset ru "Editor font" "űŇÉĆÔ ŇĹÄÁËÔĎŇÁ"
|
||||
::msgcat::mcset ru "Editor font bold" "űŇÉĆÔ ŇĹÄÁËÔĎŇÁ ÖÉŇÎŮĘ"
|
||||
::msgcat::mcset ru "Error open URL" "ďŰÉÂËÁ ĎÔËŇŮÔÉŃ URL"
|
||||
::msgcat::mcset ru "Exit" "÷ŮČĎÄ"
|
||||
::msgcat::mcset ru "File" "ćÁĘĚ"
|
||||
::msgcat::mcset ru "File already exists. Overwrite?" "ćÁĘĚ ŐÖĹ ÓŐÝĹÓÔ×ŐĹÔ. đĹŇĹĐÉÓÁÔŘ?"
|
||||
::msgcat::mcset ru "File was modifyed. Close?" "ćÁĘĚ ÂŮĚ ÉÚÍĹÎĹÎ. úÁËŇŮÔŘ?"
|
||||
::msgcat::mcset ru "File was modifyed. Save?" "ćÁĘĚ ÂŮĚ ÉÚÍĹÎĹÎ. óĎČŇÁÎÉÔŘ?"
|
||||
::msgcat::mcset ru "File modify" "ćÁĘĚ ÉÚÍĹÎĹÎ"
|
||||
::msgcat::mcset ru "File saved" "ćÁĘĚ ÓĎČŇÁÎĹÎ"
|
||||
::msgcat::mcset ru "Find" "îÁĘÔÉ"
|
||||
::msgcat::mcset ru "Font normal" "îĎŇÍÁĚŘÎŮĘ ŰŇÉĆÔ"
|
||||
::msgcat::mcset ru "Font bold" "öÉŇÎŮĘ ŰŇÉĆÔ"
|
||||
::msgcat::mcset ru "FTP password" "FTP ĐÁŇĎĚŘ"
|
||||
::msgcat::mcset ru "FTP server" "FTP ÓĹŇ×ĹŇ"
|
||||
::msgcat::mcset ru "FTP user" "FTP ĐĎĚŘÚĎ×ÁÔĹĚŘ"
|
||||
::msgcat::mcset ru "Goto line" "đĹŇĹĘÔÉ Ë ..."
|
||||
::msgcat::mcset ru "Help" "đĎÍĎÝŘ"
|
||||
::msgcat::mcset ru "Home dir" "äĎÍÁŰÎÉĘ ËÁÔÁĚĎÇ"
|
||||
::msgcat::mcset ru "Home page" "äĎÍÁŰÎŃŃ ÓÔŇÁÎÉĂÁ"
|
||||
::msgcat::mcset ru "Image dir" "ëÁÔÁĚĎÇ ÉÚĎÂŇÁÖĹÎÉĘ"
|
||||
::msgcat::mcset ru "Insert" "÷ÓÔÁ×ËÁ"
|
||||
::msgcat::mcset ru "Interface language" "ńÚŮË ÉÎÔĹŇĆĹĘÓÁ"
|
||||
::msgcat::mcset ru "Interpetator" "éÎÔĹŇĐŇĹÔÁÔĎŇ"
|
||||
::msgcat::mcset ru "Install Tcl/Tk Project Manager" "őÓÔÁÎĎ×ËÁ Tcl/Tk Project Manager"
|
||||
::msgcat::mcset ru "Input file name" "÷×ĹÄÉÔĹ ÉÍŃ ĆÁĘĚÁ"
|
||||
::msgcat::mcset ru "Label" "íĹÔËÁ"
|
||||
::msgcat::mcset ru "Line number" "îĎÍĹŇ ÓÔŇĎËÉ"
|
||||
::msgcat::mcset ru "Make RPM" "óĎÚÄÁÔŘ RPM"
|
||||
::msgcat::mcset ru "Make archive" "óĎÚÄÁÔŘ ÁŇČÉ×"
|
||||
::msgcat::mcset ru "Make backup files" "óĎÚÄÁ×ÁÔŘ ×ŇĹÍĹÎÎŮĹ ĆÁĘĚŮ"
|
||||
::msgcat::mcset ru "Main" "ďÂÝÉĹ"
|
||||
::msgcat::mcset ru "Modules" "íĎÄŐĚÉ"
|
||||
::msgcat::mcset ru "Modifying the Registry..." "÷ÎĹÓĹÎÉĹ ÉÚÍĹÎĹÎÉĘ × ŇĹĹÓÔŇ"
|
||||
::msgcat::mcset ru "Must be one file select!" "÷Ů ÄĎĚÖÎŮ ×ŮÂŇÁÔŘ ÔĎĚŘËĎ ĎÄÉÎ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "Must be one or two file select!" "÷Ů ÄĎĚÖÎŮ ×ŮÂŇÁÔŘ ĎÄÉÎ ÉĚÉ Ä×Á ĆÁĘĚÁ"
|
||||
::msgcat::mcset ru "Network" "óĹÔŘ"
|
||||
::msgcat::mcset ru "New" "îĎ×ŮĘ"
|
||||
::msgcat::mcset ru "New directory" "îĎ×ŮĘ ËÁÔÁĚĎÇ"
|
||||
::msgcat::mcset ru "New file" "îĎ×ŮĘ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "New project" "îĎ×ŮĘ ĐŇĎĹËÔ"
|
||||
::msgcat::mcset ru "Not implemented yet" "äÁÎÎÁŃ ĆŐÎËĂÉŃ ĐĎËÁ ÎĹ ŇĹÁĚÉÚĎ×ÁÎÁ"
|
||||
::msgcat::mcset ru "Not found active project" "îĹ ĎĐŇĹÄĹĚĹÎ ÁËÔÉ×ÎŮĘ ĐŇĎĹËÔ"
|
||||
::msgcat::mcset ru "Open" "ďÔËŇŮÔŘ"
|
||||
::msgcat::mcset ru "Open file" "ďÔËŇŮÔŘ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "Open project" "ďÔËŇŮÔŘ ĐŇĎĹËÔ"
|
||||
::msgcat::mcset ru "Opened file in progress" "ďÔËŇŮÔÉĹ ĆÁĘĚÁ"
|
||||
::msgcat::mcset ru "Operators" "ďĐĹŇÁÔĎŇŮ"
|
||||
::msgcat::mcset ru "Overwrite" "úÁÍĹÎÁ"
|
||||
::msgcat::mcset ru "Parameters" "đÁŇÁÍĹÔŇŮ"
|
||||
::msgcat::mcset ru "Subparameters" "óŐÂĐÁŇÁÍĹÔŇŮ"
|
||||
::msgcat::mcset ru "Paste" "÷ÓÔÁ×ÉÔŘ"
|
||||
::msgcat::mcset ru "Paste from clipboard" "÷ÓÔÁ×ÉÔŘ ÉÚ ÂŐĆĹŇÁ"
|
||||
::msgcat::mcset ru "Percent %" "úÎÁË ĐŇĎĂĹÎÔÁ"
|
||||
::msgcat::mcset ru "Print ..." "đĹŢÁÔŘ ..."
|
||||
::msgcat::mcset ru "Print" "đĹŢÁÔŘ"
|
||||
::msgcat::mcset ru "Print command" "ëĎÍÁÎÄÁ ĐĹŢÁÔÉ"
|
||||
::msgcat::mcset ru "Print selected text" "đĹŢÁÔÁÔŘ ×ŮÄĹĚĹÎÎŮĘ ÔĹËÓÔ"
|
||||
::msgcat::mcset ru "Procedure name" "éÍŃ ĐŇĎĂĹÄŐŇŮ"
|
||||
::msgcat::mcset ru "Procedure name complit" "á×ÔĎÄĎÂÉ×ËÁ ĐŇĎĂĹÄŐŇŮ"
|
||||
::msgcat::mcset ru "Program finished successfully" "÷ŮĐĎĚÎĹÎÉĹ ÚÁ×ĹŇŰĹÎĎ"
|
||||
::msgcat::mcset ru "Program failed" "ďŰÉÂËÁ ×ŮĐĎĚÎĹÎÉŃ"
|
||||
::msgcat::mcset ru "Programm output" "÷Ů×ĎÄ ĐŇĎÇŇÁÍÍŮ"
|
||||
::msgcat::mcset ru "Project" "đŇĎĹËÔ"
|
||||
::msgcat::mcset ru "Projects" "đŇĎĹËÔŮ"
|
||||
::msgcat::mcset ru "Project settings" "őÓÔÁÎĎ×ËÉ ĐŇĎĹËÔÁ"
|
||||
::msgcat::mcset ru "Project name" "îÁÚ×ÁÎÉĹ ĐŇĎĹËÔÁ"
|
||||
::msgcat::mcset ru "Project file" "ćÁĘĚ ĐŇĎĹËÔÁ"
|
||||
::msgcat::mcset ru "Project dir" "ëÁÔÁĚĎÇ ĐŇĎĹËÔÁ"
|
||||
::msgcat::mcset ru "Quit without saving?" "÷ŮĘÔÉ ÂĹÚ ÓĎČŇÁÎĹÎÉŃ?"
|
||||
::msgcat::mcset ru "Question" "÷ĎĐŇĎÓ"
|
||||
::msgcat::mcset ru "Quote string" "óÔŇĎËÁ × ËÁ×ŮŢËÁČ"
|
||||
::msgcat::mcset ru "Redo" "đĎ×ÔĎŇÉÔŘ"
|
||||
::msgcat::mcset ru "Refresh" "ďÂÎĎ×ÉÔŘ"
|
||||
::msgcat::mcset ru "Replace" "úÁÍĹÎÁ"
|
||||
::msgcat::mcset ru "Replace with" "úÁÍĹÎÉÔŘ ÎÁ"
|
||||
::msgcat::mcset ru "Replace all" "úÁÍĹÎÉÔŘ ×ÓĹ"
|
||||
::msgcat::mcset ru "Release" "÷ŮĐŐÓË"
|
||||
::msgcat::mcset ru "RPM dir" "ëÁÔÁĚĎÇ RPM"
|
||||
::msgcat::mcset ru "RPM file mask" "íÁÓËÁ RPM"
|
||||
::msgcat::mcset ru "Run" "÷ŮĐĎĚÎÉÔŘ"
|
||||
::msgcat::mcset ru "Run file" "úÁĐŐÓÔÉÔŘ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "Running project" "÷ŮĐĎĚÎĹÎÉĹ ĐŇĎĹËÔÁ"
|
||||
::msgcat::mcset ru "Running file" "÷ŮĐĎĚÎĹÎÉĹ ĆÁĘĚÁ"
|
||||
::msgcat::mcset ru "Save" "óĎČŇÁÎÉÔŘ"
|
||||
::msgcat::mcset ru "Save file" "óĎČŇÁÎÉÔŘ ĆÁĘĚ"
|
||||
::msgcat::mcset ru "Save file as" "óĎČŇÁÎÉÔŘ ĆÁĘĚ ËÁË ..."
|
||||
::msgcat::mcset ru "Save as" "óĎČŇÁÎÉÔŘ ËÁË ..."
|
||||
::msgcat::mcset ru "Save all" "óĎČŇÁÎÉÔŘ ×ÓĹ"
|
||||
::msgcat::mcset ru "Search" "đĎÉÓË"
|
||||
::msgcat::mcset ru "Select" "÷ŮÂŇÁÔŘ"
|
||||
::msgcat::mcset ru "Select all" "÷ŮÄĹĚÉÔŘ ×ÓĹ"
|
||||
::msgcat::mcset ru "Select directory" "÷ŮÂĎŇ ÄÉŇĹËÔĎŇÉÉ"
|
||||
::msgcat::mcset ru "Selected directory" "äÉŇĹËÔĎŇÉŃ"
|
||||
::msgcat::mcset ru "Selection color" "ă×ĹÔ ×ŮÄĹĚĹÎÉŃ"
|
||||
::msgcat::mcset ru "Settings" "őÓÔÁÎĎ×ËÉ"
|
||||
::msgcat::mcset ru "Show backup files" "đĎËÁÚŮ×ÁÔŘ ×ŇĹÍĹÎÎŮĹ ĆÁĘĚŮ"
|
||||
::msgcat::mcset ru "Split edit window" "ňÁÚÄĹĚÉÔŘ ĎËÎĎ ŇĹÄÁËÔĎŇÁ"
|
||||
::msgcat::mcset ru "Text autoformat" "á×ÔĎĆĎŇÍÁÔ ÔĹËÓÔÁ"
|
||||
::msgcat::mcset ru "TGZ dir" "ëÁÔÁĚĎÇ TGZ"
|
||||
::msgcat::mcset ru "TGZ file mask" "íÁÓËÁ TGZ"
|
||||
::msgcat::mcset ru "Thanks" "âĚÁÇĎÄÁŇÎĎÓÔÉ"
|
||||
::msgcat::mcset ru "Title normal" "ćÁĘĚ ÎĎŇÍÁĚŘÎŮĘ"
|
||||
::msgcat::mcset ru "Title modify" "ćÁĘĚ ÉÚÍĹÎĹÎ"
|
||||
::msgcat::mcset ru "Toolbar" "đÁÎĹĚŘ ÉÎÓÔŇŐÍĹÎÔĎ×"
|
||||
::msgcat::mcset ru "Undo" "ďÔÍĹÎÉÔŘ"
|
||||
::msgcat::mcset ru "Update" "ďÂÎĎ×ÉÔŘ"
|
||||
::msgcat::mcset ru "Variables" "đĹŇĹÍĹÎÎŮĹ"
|
||||
::msgcat::mcset ru "Version" "÷ĹŇÓÉŃ"
|
||||
::msgcat::mcset ru "View" "÷ÉÄ"
|
||||
::msgcat::mcset ru "Warning" "÷ÎÉÍÁÎÉĹ"
|
||||
::msgcat::mcset ru "Was replacement" "âŮĚĎ ÚÁÍĹÎĹÎĎ"
|
||||
::msgcat::mcset ru "Word wrapping" "đĹŇĹÎĎÓ ÓĚĎ×"
|
||||
::msgcat::mcset ru "Work dir" "ňÁÂĎŢÉĘ ËÁÔÁĚĎÇ"
|
||||
|
||||
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ set dotFileShow "No"
|
|||
|
||||
# Don't edit this line
|
||||
# Directorys Settings #
|
||||
set projDir "$env(HOME)/projects/tcl"
|
||||
set projDir "$env(HOME)/projects"
|
||||
set rpmDir "$workDir/rpm"
|
||||
set tgzDir "$workDir/tgz"
|
||||
# File mask #
|
||||
|
@ -74,3 +74,4 @@ set color(sixBG) "#ffdbdb"
|
|||
set color(sql) "#ffff828f0000"
|
||||
# Last active project (changed automaticaly)
|
||||
set workingProject ""
|
||||
|
||||
|
|
15
projman.tcl
15
projman.tcl
|
@ -2,12 +2,12 @@
|
|||
# Tcl ignores the next line -*- tcl -*- \
|
||||
exec wish "$0" -- "$@"
|
||||
|
||||
###########################################################
|
||||
# Tcl/Tk Project Manager #
|
||||
# Distrubuted under GPL #
|
||||
###############################################
|
||||
# Tcl/Tk Project Manager #
|
||||
# Distrubuted under GPL #
|
||||
# Copyright (c) "Sergey Kalinin", 2001, http://nuk-svk.ru #
|
||||
# Author: Sergey Kalinin banzaj28@yandex.ru #
|
||||
###########################################################
|
||||
# Author: Sergey Kalinin banzaj28@yandex.ru #
|
||||
##############################################
|
||||
|
||||
########## VERSION INFORMATION ##########
|
||||
set ver "0.4.5"
|
||||
|
@ -140,8 +140,5 @@ 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
|
||||
|
||||
|
||||
|
||||
|
||||
option add *Widget.color red startupFile
|
||||
|
||||
|
|
34
temp.txt
34
temp.txt
|
@ -1,34 +0,0 @@
|
|||
Аналоги клавиш для bind в WINDOWS
|
||||
|
||||
a ocircumflex
|
||||
b egrave
|
||||
c ntilde
|
||||
d acircumflex
|
||||
e oacute
|
||||
f agrave
|
||||
g idiaeresis
|
||||
h eth
|
||||
i oslash
|
||||
j icircumflex
|
||||
k ediaeresis
|
||||
l adiaeresis
|
||||
m udiaeresis
|
||||
n ograve
|
||||
o ugrave
|
||||
p ccedilla
|
||||
q eacute
|
||||
r ecircumflex
|
||||
s ucircumflex
|
||||
t aring
|
||||
u atilde
|
||||
v igrave
|
||||
w odiaeresis
|
||||
x division
|
||||
y iacute
|
||||
z ydiaeresis
|
||||
comma aacute
|
||||
period thorn
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user