-
Notifications
You must be signed in to change notification settings - Fork 1
/
gui.tcl
42 lines (34 loc) · 1.11 KB
/
gui.tcl
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
# Create a standard Yes/No message box dialog passing in the
# dialog title and text.
proc CreateDialog {title text} {
tk_messageBox \
-type yesno \
-title $title \
-default yes \
-message $text \
-icon question
}
# Do this when user clicks Yes
proc Yes {} {
post_message -type info "*******************************************************************"
post_message -type info "User request to update project revision"
source "update_rev.tcl"
post_message -type info "*******************************************************************"
}
# Do this when user clicks No
proc No {} {
post_message -type warning "*******************************************************************"
post_message -type warning "Project revision was not updated."
post_message -type warning "*******************************************************************"
}
#################
# Program Start #
#################
init_tk
set dialogTitle "Project revision update"
set dialogText "Update project revision?"
if {[CreateDialog $dialogTitle $dialogText] == yes} {
Yes
} else {
No
}