biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / ding / dict.patch
blob70ecea10550e068942bf870d0a254425ae434298
1 Ding persists its settings to $HOME/.dingrc on startup, this sadly includes the path to the dictionary.
2 On all other distributions, that would be /usr/share/dict/de-en.txt and would hardly ever change.
3 On nixos, this will indeed change on ever update and would break it for all users.
4 This just comments out the dictionary path in the .dingrc so the user can still set it if she wants to, but it will not affect normal operations.
5 --- a/ding
6 +++ b/ding
7 @@ -899,7 +899,9 @@ if { ! [info exists ding_version]} {
10 # Change path of default ger-eng.txt when upgrading from version 1.1
11 - if {$searchmeth($i,dictfile) == {/usr/dict/ger-eng.txt} &&
12 + if {! [info exists searchmeth($i,dictfile)]} {
13 + set searchmeth($i,dictfile) $default_searchmeth(0,dictfile)
14 + } elseif {$searchmeth($i,dictfile) == {/usr/dict/ger-eng.txt} &&
15 $ding_version == {1.1}} {
16 set searchmeth($i,dictfile) $default_searchmeth(0,dictfile)
17 debug 2 "New path and name of ger-eng.txt configured: $default_searchmeth(0,dictfile)"
18 @@ -5065,7 +5067,7 @@ proc saveOptions {} {
19 foreach i $searchmpos {
20 puts $fd "set searchmeth($n,name) {$searchmeth($i,name)}"
21 puts $fd "set searchmeth($n,type) {$searchmeth($i,type)}"
22 - puts $fd "set searchmeth($n,dictfile) {$searchmeth($i,dictfile)}"
23 + puts $fd "#set searchmeth($n,dictfile) {$searchmeth($i,dictfile)}"
24 puts $fd "set searchmeth($n,separator) {$searchmeth($i,separator)}"
25 puts $fd "set searchmeth($n,language1) {$searchmeth($i,language1)}"
26 puts $fd "set searchmeth($n,language2) {$searchmeth($i,language2)}"