31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
}
destroy $top.nui
toplevel $top.nui
wm transient $top.nui $top
wm geometry $top.nui +400+400
wm title $top.nui ""
label $top.nui.l -image nuisance
pack $top.nui.l
wm protocol $top.nui WM_DELETE_WINDOW [list destroy $top.nui2 $top.nui]
update
destroy $top.nui2
toplevel $top.nui2 -bg yellow
wm transient $top.nui2 $top.nui
wm overrideredirect $top.nui2 1
wm title $top.nui2 ""
label $top.nui2.l -text "$str\nDo you want help?" -justify left -bg yellow
button $top.nui2.b -text "No, get out of my face!" \
-command [list destroy $top.nui2 $top.nui] -bg yellow
pack $top.nui2.l $top.nui2.b -side "top" -fill x
wm geometry $top.nui2 +[expr {405 + [winfo width $top.nui]}]+400
}
proc makeAboutWin {} {
global diffver
set w [helpWin .ab "About Eskil"]
text $w.t -width 45 -height 11 -wrap none -relief flat \
-bg [$w cget -bg]
pack $w.t -side top -expand y -fill both
$w.t insert end "A graphical frontend to diff\n\n"
$w.t insert end "$diffver\n\n"
$w.t insert end "Made by Peter Spjuth\n"
$w.t insert end "E-Mail: peter.spjuth@space.se\n"
$w.t insert end "\nURL: http://eskil.berlios.de\n"
|
|
|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
}
destroy $top.nui
toplevel $top.nui
wm transient $top.nui $top
wm geometry $top.nui +400+400
wm title $top.nui ""
ttk::label $top.nui.l -image nuisance
pack $top.nui.l
wm protocol $top.nui WM_DELETE_WINDOW [list destroy $top.nui2 $top.nui]
update
destroy $top.nui2
toplevel $top.nui2 -bg yellow
wm transient $top.nui2 $top.nui
wm overrideredirect $top.nui2 1
wm title $top.nui2 ""
ttk::label $top.nui2.l -text "$str\nDo you want help?" -justify left \
-bg yellow
ttk::button $top.nui2.b -text "No, get out of my face!" \
-command [list destroy $top.nui2 $top.nui] -bg yellow
pack $top.nui2.l $top.nui2.b -side "top" -fill x
wm geometry $top.nui2 +[expr {405 + [winfo width $top.nui]}]+400
}
# A simple window for displaying e.g. help.
# Returns the frame where things can be put.
proc helpWin {w title} {
destroy $w
toplevel $w -padx 2 -pady 2
wm title $w $title
bind $w <Key-Return> [list destroy $w]
bind $w <Key-Escape> [list destroy $w]
ttk::frame $w.f
ttk::button $w.b -text "Close" -command [list destroy $w] -width 10 \
-default active
pack $w.b -side bottom -pady 2
pack $w.f -side top -expand y -fill both -padx 2 -pady 2
focus $w
return $w.f
}
proc makeAboutWin {} {
global diffver
set w [helpWin .ab "About Eskil"]
set bg [ttk::style configure . -background]
text $w.t -width 45 -height 11 -wrap none -relief flat \
-bg $bg
pack $w.t -side top -expand y -fill both
$w.t insert end "A graphical frontend to diff\n\n"
$w.t insert end "$diffver\n\n"
$w.t insert end "Made by Peter Spjuth\n"
$w.t insert end "E-Mail: peter.spjuth@space.se\n"
$w.t insert end "\nURL: http://eskil.berlios.de\n"
|