Added opening last active project when project run

This commit is contained in:
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

@@ -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} {
}