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.
When not-escaped wildcard symbols are placed in the translate box/line,
word completion can occupy the CPU for seconds. So it is safer to err on
the side of escaping than the other way around.
The missed unescaping in ScanPopup::translateInputFinished() was
inconsistent with the main window. It made escaping in the scan popup's
translate box unusable by attempting to translate e.g. "\*" verbatim.
This dialog can make use of extra horizontal space when there are many
groups, extra vertical space - when there are many dictionaries. Thus
maximizing Dictionaries dialog can be useful.
Currently Dictionaries dialog features the following window buttons in
the top right corner:
* Close button under Xfce on GNU/Linux;
* Context help, Minimize, Maximize and Close buttons under KDE Plasma on
GNU/Linux;
* Help, Close buttons on Windows (according to Internet screenshots).
With this commit the top-right corner window buttons become:
* Maximize and Close buttons under Xfce on GNU/Linux;
* Minimize, Maximize and Close buttons under KDE Plasma on GNU/Linux;
* disabled Minimize button; Maximize and Close buttons on Windows
(thanks to @nonwill for checking this).
I don't think that Minimize button is useful in this dialog. But it does
no harm, so I won't go out of my way to remove it on all platforms.
Interestingly, the Minimize button won't show up under Xfce even if
Qt::WindowMinimizeButtonHint is on. It is difficult if at all possible
to remove this button under KDE Plasma. Fortunately, the Minimize button
works well in this desktop environment: minimizing hides both the dialog
and the main window, unminimizing shows both windows.
@nonwill found that this button doesn't work well on Windows: minimizing
the dialog hides it, but keeps the main window visible with its input
still blocked by the hidden dialog. Therefore it is just as well that
the Minimize button is disabled on Windows.
I couldn't find a UI element in the Dictionaries dialog that features
context help. Therefore the Context help/Help (question mark) button
must be useless. So removing it is an extra benefit of this commit.
I cannot check which window buttons are visible with this commit on
macOS, but I expect them to include Maximize, Close buttons and be
acceptable overall.
Closes #1359.