Fossil SCM

In the --tk diff GUI, fix the "Save As..." button so that it works again. Do not show the "Reload" button on a GUI brought up from a Save As.

drh 2025-05-06 11:26 trunk
Commit 31fc6290c3c11b35d1f2232ec580b68d865f4ffc5dba15a9d5845f4a65552075
1 file changed +7 -1
+7 -1
--- src/diff.tcl
+++ src/diff.tcl
@@ -500,10 +500,12 @@
500500
if {$fn==""} return
501501
set out [open $fn wb]
502502
puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'"
503503
puts $out "# to see the graphical diff.\n#"
504504
puts $out "set fossilcmd {}"
505
+ puts $out "set darkmode $::darkmode"
506
+ puts $out "set debug $::debug"
505507
puts $out "set prog [list $::prog]"
506508
puts $out "set difftxt \173"
507509
foreach e $::difftxt {puts $out [list $e]}
508510
puts $out "\175"
509511
puts $out "eval \$prog"
@@ -606,11 +608,15 @@
606608
::ttk::button .bb.quit -text {Quit} -command exit
607609
::ttk::button .bb.reload -text {Reload} -command reloadDiff
608610
::ttk::button .bb.invert -text {Invert} -command invertDiff
609611
::ttk::button .bb.save -text {Save As...} -command saveDiff
610612
::ttk::button .bb.search -text {Search} -command searchOnOff
611
-pack .bb.quit .bb.reload .bb.invert -side left
613
+pack .bb.quit -side left
614
+if {$fossilcmd ne ""} {
615
+ pack .bb.reload -side left
616
+}
617
+pack .bb.invert -side left
612618
if {$fossilcmd!=""} {pack .bb.save -side left}
613619
pack .bb.files .bb.search -side left
614620
grid rowconfigure . 1 -weight 1
615621
grid columnconfigure . 1 -weight 1
616622
grid columnconfigure . 4 -weight 1
617623
--- src/diff.tcl
+++ src/diff.tcl
@@ -500,10 +500,12 @@
500 if {$fn==""} return
501 set out [open $fn wb]
502 puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'"
503 puts $out "# to see the graphical diff.\n#"
504 puts $out "set fossilcmd {}"
 
 
505 puts $out "set prog [list $::prog]"
506 puts $out "set difftxt \173"
507 foreach e $::difftxt {puts $out [list $e]}
508 puts $out "\175"
509 puts $out "eval \$prog"
@@ -606,11 +608,15 @@
606 ::ttk::button .bb.quit -text {Quit} -command exit
607 ::ttk::button .bb.reload -text {Reload} -command reloadDiff
608 ::ttk::button .bb.invert -text {Invert} -command invertDiff
609 ::ttk::button .bb.save -text {Save As...} -command saveDiff
610 ::ttk::button .bb.search -text {Search} -command searchOnOff
611 pack .bb.quit .bb.reload .bb.invert -side left
 
 
 
 
612 if {$fossilcmd!=""} {pack .bb.save -side left}
613 pack .bb.files .bb.search -side left
614 grid rowconfigure . 1 -weight 1
615 grid columnconfigure . 1 -weight 1
616 grid columnconfigure . 4 -weight 1
617
--- src/diff.tcl
+++ src/diff.tcl
@@ -500,10 +500,12 @@
500 if {$fn==""} return
501 set out [open $fn wb]
502 puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'"
503 puts $out "# to see the graphical diff.\n#"
504 puts $out "set fossilcmd {}"
505 puts $out "set darkmode $::darkmode"
506 puts $out "set debug $::debug"
507 puts $out "set prog [list $::prog]"
508 puts $out "set difftxt \173"
509 foreach e $::difftxt {puts $out [list $e]}
510 puts $out "\175"
511 puts $out "eval \$prog"
@@ -606,11 +608,15 @@
608 ::ttk::button .bb.quit -text {Quit} -command exit
609 ::ttk::button .bb.reload -text {Reload} -command reloadDiff
610 ::ttk::button .bb.invert -text {Invert} -command invertDiff
611 ::ttk::button .bb.save -text {Save As...} -command saveDiff
612 ::ttk::button .bb.search -text {Search} -command searchOnOff
613 pack .bb.quit -side left
614 if {$fossilcmd ne ""} {
615 pack .bb.reload -side left
616 }
617 pack .bb.invert -side left
618 if {$fossilcmd!=""} {pack .bb.save -side left}
619 pack .bb.files .bb.search -side left
620 grid rowconfigure . 1 -weight 1
621 grid columnconfigure . 1 -weight 1
622 grid columnconfigure . 4 -weight 1
623

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button