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.
Commit
31fc6290c3c11b35d1f2232ec580b68d865f4ffc5dba15a9d5845f4a65552075
Parent
99aeebadef2ddb7…
1 file changed
+7
-1
+7
-1
| --- src/diff.tcl | ||
| +++ src/diff.tcl | ||
| @@ -500,10 +500,12 @@ | ||
| 500 | 500 | if {$fn==""} return |
| 501 | 501 | set out [open $fn wb] |
| 502 | 502 | puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'" |
| 503 | 503 | puts $out "# to see the graphical diff.\n#" |
| 504 | 504 | puts $out "set fossilcmd {}" |
| 505 | + puts $out "set darkmode $::darkmode" | |
| 506 | + puts $out "set debug $::debug" | |
| 505 | 507 | puts $out "set prog [list $::prog]" |
| 506 | 508 | puts $out "set difftxt \173" |
| 507 | 509 | foreach e $::difftxt {puts $out [list $e]} |
| 508 | 510 | puts $out "\175" |
| 509 | 511 | puts $out "eval \$prog" |
| @@ -606,11 +608,15 @@ | ||
| 606 | 608 | ::ttk::button .bb.quit -text {Quit} -command exit |
| 607 | 609 | ::ttk::button .bb.reload -text {Reload} -command reloadDiff |
| 608 | 610 | ::ttk::button .bb.invert -text {Invert} -command invertDiff |
| 609 | 611 | ::ttk::button .bb.save -text {Save As...} -command saveDiff |
| 610 | 612 | ::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 | |
| 612 | 618 | if {$fossilcmd!=""} {pack .bb.save -side left} |
| 613 | 619 | pack .bb.files .bb.search -side left |
| 614 | 620 | grid rowconfigure . 1 -weight 1 |
| 615 | 621 | grid columnconfigure . 1 -weight 1 |
| 616 | 622 | grid columnconfigure . 4 -weight 1 |
| 617 | 623 |
| --- 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 |