Added opening last active project when project run

0.4.6
Sergey Kalinin 2018-02-15 17:56:10 +03:00
parent 1748933767
commit 987b4c2745
7 changed files with 18 additions and 38 deletions

View File

@ -12,6 +12,7 @@
- Added colored icon for main window
- Fixed "Close all" procedure if opened files from projects and file browser
- Fixed parsing some procedure name like ::proc::name or proc_na::me(aa) and parameters {{} {} {}}
- Added opening last active project when project run
13.02.2018
- Added gray theme
@ -362,5 +363,4 @@ characters to the right of the insertion cursor.
- Fix error with select active project after creating new project
- Fix small error with delete project procedure
- Fix uncorrect cursor position counter into editor

View File

@ -493,4 +493,9 @@ $tree configure -redraw 1
set activeProject ""
focus -force $tree
# Opened last active project
if {[info exists workingProject]} {
if {$workingProject ne ""} {
TreeDoubleClick .frmBody.frmCat.noteBook.fprojects.frmTree.tree $workingProject
}
}

View File

@ -312,7 +312,7 @@ proc SendEmail {mail} {
}
## QUIT PROJECT MANAGER PROCEDURE ##
proc Quit {} {
global workDir
global workDir activeProject
set v [FileDialog tree close_all]
if {$v == "cancel"} {
return
@ -325,6 +325,8 @@ proc Quit {} {
while {[gets $file line]>=0} {
if {[regexp -nocase -all -- {set topLevelGeometry} $line match]} {
puts $file1 "set topLevelGeometry \"[winfo geometry .]\""
} elseif {[regexp -nocase -all -- {set workingProject} $line match]} {
puts $file1 "set workingProject \"$activeProject\""
} else {
puts $file1 "$line"
}
@ -660,19 +662,3 @@ proc GetExtention {node} {
return $ext
}

View File

@ -129,6 +129,7 @@ proc Settings {} {
puts $file "set color(sixFG) \"[$editFrm.frmColorSixFG.txtColorSixFG get]\""
puts $file "set color(sixBG) \"[$editFrm.frmColorSixBG.txtColorSixBG get]\""
puts $file "set color(sql) \"[$editFrm.frmColorSQL.txtColorSQL get]\""
puts $file "\nset workingProject \"\""
close $file
destroy .pref
@ -869,16 +870,9 @@ proc SaveSettings {} {
puts $file "set color(sixFG) \"[$editFrm.frmColorSixFG.txtColorSixFG get]\""
puts $file "set color(sixBG) \"[$editFrm.frmColorSixBG.txtColorSixBG get]\""
puts $file "set color(sql) \"[$editFrm.frmColorSQL.txtColorSQL get]\""
puts $file "\nset workingProject \"\""
close $file
$noteBook delete settings
$noteBook raise [$noteBook page end]
}

View File

@ -505,9 +505,10 @@ 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"
$tree selection set $node
set item [$tree itemcget $node -data]
puts $item
#puts $item
if {[$tree itemcget $node -open] == 1} {
$tree itemconfigure $node -open 0
} elseif {[$tree itemcget $node -open] == 0} {
@ -565,4 +566,3 @@ proc GetTreeForNode {node} {
}

View File

@ -72,8 +72,5 @@ set color(label) "#c9c9c9"
set color(sixFG) "#ff0000"
set color(sixBG) "#ffdbdb"
set color(sql) "#ffff828f0000"
# Last active project (changed automaticaly)
set workingProject ""

View File

@ -54,7 +54,7 @@ if {[file exists $workDir] == 0} {file mkdir $workDir}
if {[file exists $tmpDir] == 0} {file mkdir $tmpDir}
if {[file exists [file join $workDir projman.conf]] == 0} {
file copy -force -- [file join $dataDir projman.conf] [file join $workDir projman.conf]
file copy -force -- [file join $binDir projman.conf] [file join $workDir projman.conf]
}
source [file join $workDir projman.conf]
@ -121,5 +121,3 @@ option add *Listbox.foreground $editor(fg) startupFile
option add *Listbox.background $editor(bg) startupFile
option add *Scrollbar.background $editor(bg) startupFile