Separate data directory is only used if history file isn't already
present in the configuration directory.
This commit together with two previous ones allows to switch to
layout described in XDG Base Directory specification. Data is not
migrated automatically and old ~/.goldendict home dir has precedence.
If you wish to use standards-compliant locations, move files and
directories manually:
```
CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/goldendict"
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/goldendict"
DATA="${XDG_DATA_HOME:-$HOME/.local/share}/goldendict"
mkdir -p "${CACHE}"
mkdir -p "${DATA}"
mv ~/.goldendict/index "${CACHE}"
mv ~/.goldendict/history "${DATA}"
mv ~/.goldendict/ "${CONFIG}"
```
Please note that this effectively discards network cache stored in
"${XDG_CACHE_HOME:-$HOME/.cache}/GoldenDict/network". You can safely
delete the obsolete cache directory. If you wish to preserve and
keep using the existing network cache, move it into the new location
manually:
```
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}"
mkdir -p "${CACHE}/goldendict"
mv "${CACHE}/GoldenDict/network" "${CACHE}/goldendict"
rmdir "${CACHE}/GoldenDict"
```
If GoldenDict with this change has been already used, new cache dir
will already have "${CACHE}/goldendict/network", and mv will refuse to
merge directories. In such case, you will need to manually remove it
before moving directory with old cache.
Most callers of these member functions should escape wildcard symbols in
the `text` argument. Yet nothing in the functions' signatures suggested
such escaping. With the added enum WildcardPolicy argument, the callers
are forced to decide whether or not the wildcards should be escaped.