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
|
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
|
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
|
# $Revision$
#----------------------------------------------------------------------
proc MakeRegistryFrame {w label key newvalue} {
set old {}
catch {set old [registry get $key {}]}
set l [labelframe $w -text $label -padx 4 -pady 4]
set l [ttk::labelframe $w -text $label -padding 4]
label $l.key1 -text "Key:"
label $l.key2 -text $key
label $l.old1 -text "Old value:"
label $l.old2 -text $old
label $l.new1 -text "New value:"
label $l.new2 -text $newvalue
ttk::label $l.key1 -text "Key:"
ttk::label $l.key2 -text $key
ttk::label $l.old1 -text "Old value:"
ttk::label $l.old2 -text $old
ttk::label $l.new1 -text "New value:"
ttk::label $l.new2 -text $newvalue
button $l.change -text "Change" -width 10 -command \
ttk::button $l.change -text "Change" -width 10 -command \
"[list registry set $key {} $newvalue] ; \
[list $l.change configure -state disabled]"
button $l.delete -text "Delete" -width 10 -command \
ttk::button $l.delete -text "Delete" -width 10 -command \
"[list registry delete $key] ; \
[list $l.delete configure -state disabled]"
if {[string equal $newvalue $old]} {
$l.change configure -state disabled
}
if {[string equal "" $old]} {
$l.delete configure -state disabled
|
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
-
-
+
+
|
if {[string match "*runemacs.exe" $::util(editor)]} {
# Set up emacs
set newkey "\"[file nativename $::util(editor)]\" \"%1\""
MakeRegistryFrame $top.e "Emacs" $keye $newkey
pack $top.e -side "top" -fill x -padx 4 -pady 4
}
button $top.close -text "Close" -width 10 -command [list destroy $top] \
-default active
ttk::button $top.close -text "Close" -width 10 \
-command [list destroy $top] -default active
pack $top.close -side bottom -pady 4
bind $top <Key-Return> [list destroy $top]
bind $top <Key-Escape> [list destroy $top]
}
# Some notes about how to get PDF info from registry.
# Inended for future use when PDF printing is supported.
|