File: taglog_stack.tcl

package info (click to toggle)
taglog 0.1.52-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 868 kB
  • ctags: 221
  • sloc: tcl: 7,233; makefile: 63; sh: 24
file content (49 lines) | stat: -rw-r--r-- 1,226 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

#
# taglog_stack.tcl - action and project stack for taglog
# Copyright John Lines (john@paladin.demon.co.uk) June 2002
#
# This program is released under the terms of the GNU Public Licence
#

package provide taglog_stack 0.1

proc stack_push { type } {
global stackdepth stack_project stack_action_title stack_action_id stack_log_id
global currentProject currentActionTitle currentAction
global stack_info

incr stackdepth
set stack_project($stackdepth) $currentProject
set stack_action_title($stackdepth) $currentActionTitle
set stack_action_id($stackdepth) $currentAction
set stack_log_id($stackdepth) [donext ""]

.actionbar.stack.pop configure -state normal

set stack_info "$type $stack_log_id($stackdepth)"

}

proc stack_pop {} {
global stackdepth stack_project stack_action_title stack_action_id stack_log_id
global currentProject currentActionTitle currentAction
global stack_info

donext ""
set currentProject $stack_project($stackdepth)
set currentActionTitle $stack_action_title($stackdepth)
set currentAction $stack_action_id($stackdepth)

set stack_info "- $stack_log_id($stackdepth)"

incr stackdepth -1

if { $stackdepth == 0 } {
  .actionbar.stack.pop configure -state disabled
  set stack_info ""
  }

}