︙ | | | ︙ | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
if {[catch {package require psballoon}]} {
# Add a dummy if it does not exists.
proc addBalloon {args} {}
} else {
namespace import -force psballoon::addBalloon
}
set debug 1
set diffver "Version 2.0b2+ 2003-12-14"
set thisScript [file join [pwd] [info script]]
set thisDir [file dirname $thisScript]
# Follow any link
set tmplink $thisScript
while {[file type $tmplink] == "link"} {
set tmplink [file readlink $tmplink]
|
|
|
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
if {[catch {package require psballoon}]} {
# Add a dummy if it does not exists.
proc addBalloon {args} {}
} else {
namespace import -force psballoon::addBalloon
}
set debug 0
set diffver "Version 2.0b3 2003-12-14"
set thisScript [file join [pwd] [info script]]
set thisDir [file dirname $thisScript]
# Follow any link
set tmplink $thisScript
while {[file type $tmplink] == "link"} {
set tmplink [file readlink $tmplink]
|
︙ | | | ︙ | |
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
|
button $l.change -text "Change" -width 10 -command \
"[list registry set $key {} $newvalue] ; \
[list $l.change configure -state disabled]"
if {[string equal $newvalue $old]} {
$l.change configure -state disabled
}
grid $l.key1 $l.key2 -sticky w -padx 4 -pady 4
grid $l.old1 $l.old2 -sticky w -padx 4 -pady 4
grid $l.new1 $l.new2 -sticky w -padx 4 -pady 4
grid $l.change - -sticky e -padx 4 -pady 4
grid columnconfigure $l 1 -weight 1
}
proc makeRegistryWin {} {
global thisScript
# Locate executable for this program
|
|
|
|
|
|
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
|
button $l.change -text "Change" -width 10 -command \
"[list registry set $key {} $newvalue] ; \
[list $l.change configure -state disabled]"
if {[string equal $newvalue $old]} {
$l.change configure -state disabled
}
grid $l.key1 $l.key2 -sticky "w" -padx 4 -pady 4
grid $l.old1 $l.old2 -sticky "w" -padx 4 -pady 4
grid $l.new1 $l.new2 -sticky "w" -padx 4 -pady 4
grid $l.change - -sticky "e" -padx 4 -pady 4
grid columnconfigure $l 1 -weight 1
}
proc makeRegistryWin {} {
global thisScript
# Locate executable for this program
|
︙ | | | ︙ | |
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
|
set new "$valbase -o \"%1\" -conflict \"%1\""
makeRegistryFrame $top.c "Diff Conflict" $keyc $new
set new "$valbase \"%1\""
makeRegistryFrame $top.dd "Directory Diff" $keydd $new
pack $top.d $top.c $top.dd -side top -fill x -padx 4 -pady 4
locateEditor
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
pack $top.close -side bottom -pady 4
bind $top <Key-Return> [list destroy $top]
bind $top <Key-Escape> [list destroy $top]
|
|
|
|
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
|
set new "$valbase -o \"%1\" -conflict \"%1\""
makeRegistryFrame $top.c "Diff Conflict" $keyc $new
set new "$valbase \"%1\""
makeRegistryFrame $top.dd "Directory Diff" $keydd $new
pack $top.d $top.c $top.dd -side "top" -fill x -padx 4 -pady 4
locateEditor
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
pack $top.close -side bottom -pady 4
bind $top <Key-Return> [list destroy $top]
bind $top <Key-Escape> [list destroy $top]
|
︙ | | | ︙ | |
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
|
button $top.f.b5 -text "Right Clear&Paste" -command \
"$t2 delete 1.0 end ; event generate $t2 <<Paste>>"
foreach w [list $top.f.b2 $top.f.b4 $top.f.b $top.f.b3 $top.f.b5] {
raise $w
}
grid $top.f.mf $top.f.b2 $top.f.b4 x $top.f.b x $top.f.b3 $top.f.b5 x \
-padx 4 -pady 2 -sticky w
grid $top.f.mf -sticky nw -pady 0 -padx 0
grid columnconfigure $top.f {0 3 5 8} -weight 1
grid columnconfigure $top.f 8 -minsize [winfo reqwidth $top.f.mf]
grid $top.f - -sticky we
grid $top.t1 $top.t2 -sticky news
grid $top.t2 -padx {2 0}
|
|
|
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
|
button $top.f.b5 -text "Right Clear&Paste" -command \
"$t2 delete 1.0 end ; event generate $t2 <<Paste>>"
foreach w [list $top.f.b2 $top.f.b4 $top.f.b $top.f.b3 $top.f.b5] {
raise $w
}
grid $top.f.mf $top.f.b2 $top.f.b4 x $top.f.b x $top.f.b3 $top.f.b5 x \
-padx 4 -pady 2 -sticky "w"
grid $top.f.mf -sticky nw -pady 0 -padx 0
grid columnconfigure $top.f {0 3 5 8} -weight 1
grid columnconfigure $top.f 8 -minsize [winfo reqwidth $top.f.mf]
grid $top.f - -sticky we
grid $top.t1 $top.t2 -sticky news
grid $top.t2 -padx {2 0}
|
︙ | | | ︙ | |
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
|
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
}
# FIXA: put in a package
proc helpWin {w title} {
destroy $w
|
|
|
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
|
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
}
# FIXA: put in a package
proc helpWin {w title} {
destroy $w
|
︙ | | | ︙ | |