According to DSL documentation, closing the [mN] tags is optional:
unclosed [mN] tags affect formatting until the end of a card.
As many dictionaries don't close the [mN] tags, GoldenDict printed
multiple unclosed-tag warnings during each word lookup.
Messages printed with GD_DPRINTF() are clearly debug messages. They
flood GoldenDict's output with lines like these:
some body finished
one finished.
erasing..
erase done..
one not finished.
====reading 16384 bytes
Messages printed to stderr with GD_FDPRINTF() are more important and
less frequent => leave them in Release builds.
Users can enable or disable av_log() output only by inserting a call to
av_log_set_level() and recompiling GoldenDict. Blink browser engine
shipped with Qt WebEngine sets the log level to AV_LOG_QUIET in
chromium/media/base/media.cc and thus disables all output. So
GoldenDict's custom AV_LOG_INFO messages are always printed in the Qt
WebKit version and never in the Qt WebEngine version.
In contrast, users have many ways to enable or disable QDebug output
without recompilation since Qt 5. Furthermore, GoldenDict's command line
option --log-to-file allows to redirect gdDebug() output to a log file.
The two messages printed via av_log() are clearly debug messages,
because they are printed each time a word or a phrase is pronounced.
Unfortunately the X11 focus workaround that opens the File menu cannot
be simply removed. Without this workaround, when KDE Plasma's Focus
stealing prevention level is set to Low (which is the default) or
higher, launching a second GoldenDict instance doesn't give focus to the
already running instance unless that instance's main window is currently
hidden into system tray or minimized. A workaround of hiding then
showing the main window makes the window flicker. Suggesting GoldenDict
users to set the focus stealing prevention level to None is not right,
because this setting is global and affects all applications.
Emulate a left mouse button click at position (0, 0) instead of (1, 1)
in order to waste 1 rather than 2 pixels to the left of the menu bar.
Introduce a new macro X11_MAIN_WINDOW_FOCUS_WORKAROUNDS to link the X11
focus workaround to the File menu workaround introduced in this commit.
This simplifies disabling all related workarounds at once. When the
focus workaround is replaced with a proper solution, the developer won't
forget to remove all obsolete workarounds if they are linked together.
Fixes #781.
Now double-clicking an image has the same effect in the main window and
in the scan popup. This consistency in no way prevents or hinders using
the popup window as designed (for fast lookup in a small group of
dictionaries), because a user is unlikely to double-click an image
accidentally.
Without this commit, when "Double-click translates the word clicked"
option is on, double-clicking an image in the scan popup translates
currently selected text if the selection is not empty.
Fixes #1279.
There is no benefit in storing the same pointer multiple times in
openedInspectors. This occurred when an article inspector window was
closed then shown again. When the tab corresponding to the duplicated
article inspector pointer was closed, ArticleInspector::beforeClosed()
erased only one pointer from openedInspectors. This left dangling
duplicate pointer(s) in the list and eventually caused a crash when
another inspector's showEvent() accessed a dangling pointer at
openedInspectors.front().
Silently ignore empty or whitespace-only translation requests. It should
be clear to most users why GoldenDict ignores them.
The translated word ends up as the "word" URL query item value, which is
trimmed in ArticleNetworkAccessManager::getResource(). So the added
trimming in MainWindow::translateInputFinished() should be fine.
When a trimmed translated word was empty, InputPhrase::isValid()
returned false, ArticleNetworkAccessManager::getResource() returned a
null pointer and ArticleNetworkAccessManager::createRequest() fell back
to QNetworkAccessManager::createRequest(), which:
* failed silently in the Qt 4 version;
* displayed the
Protocol "gdlookup" is unknown
Failed to load URL gdlookup://localhost?word= &group=4.
QtNetwork Error 301
error page in the Qt 5 version.
Fixes #1179.
An attempt to clone the git:// URL fails on my Manjaro GNU/Linux system
and produces the following output:
$ git clone git://github.com/goldendict/goldendict.git
Cloning into 'goldendict'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out
128✗
The GitHub UI offers the replacement https:// URL when the green Code
button in the GoldenDict repository is clicked.
Fixes #1561.