My tests in many desktop environments and window managers indicate that
no single configuration works perfectly in all environments. There are
also behavior differences between Qt::Popup and Qt::Tool flags, which
are not exactly bugs, so I suppose users might subjectively prefer
different options.
Customizing the flags allows the user to prevent unpinned scan popup
window flickering with Qt5 on Linux. In a way adding these options fixes
issue #645, which is: the scan popup window blinks rapidly, barely
noticeably in some applications, such as Calibre ebook-viewer
and Chromium. In this case the scan popup window usually ends up hidden
when selection ends, unless it was finished with a jerk.
I have tested the new options in 9 desktop environments and window
managers: at least one configuration for each eliminates #645 and makes
the scan popup window work the same as with Qt4 in this regard:
the popup window remains visible, text in the popup's translation line
keeps up with the text selection in the external application,
and the selected text is being translated on the fly.
Moreover, for each tested DE/WM, at least one configuration makes
the scan popup window work perfectly as far as I am concerned.
This issue was partially worked around with a 200ms scan popup delay
timer in the recent commit 58e41fe3ce
for the duplicate issue #854. However the timer solution is incomplete
because it requires the user to select text quickly and without delays.
If global mouse selection does not change for 200ms while the left mouse
button is held down, the user will likely not see the scan popup when
(s)he finishes selection, and will have to try selecting again -
hopefully faster this time.
The 200ms delay is no longer critically important after this commit,
but it is still beneficial: the lookup query changes less often,
which in turn reduces article definition update frequency.
So the delay improves the UI (perhaps subjectively) and performance.
I have verified in numerous desktop environments and window managers
that the workaround does not work with Qt5.
Let us disable it in Qt5 builds to prevent potential issues
and eliminate the small performance overhead.
* add a new interface class AudioPlayerInterface;
* inherit a new proxy class Ffmpeg::AudioPlayer from it;
* partially switch ArlticleView to using the interface;
* expose MainWindow's AudioPlayerInterface instance to all ArticleView
instances;
* add a new AudioPlayerFactory class responsible for creating instances
of concrete classes derived from AudioPlayerInterface depending on
relevant Config::Preferences values;
* increase minimum supported Qt version from 4.5 to 4.6 in README
in order to use QScopedPointer introduced in Qt 4.6.
Controls both context menus, in the dictionary bar and in the article view.
Can be adjusted in Preferences -> Interface -> Context menu dictionaries limit.
By default, it is set to 20.
Previously, the scan popup used Qt::Popup flag on Linux, but this
flag is incompatible with the new translate box UI, esp. the
floating suggestion list, since in the Qt::Popup-styled windows
all the events go to the popup, hence the creation of additional
windows is problematic, and those new windows don't work properly
since they don't receive events.
Without this change, the scrolling of the suggestion list in the
Scan Popup's translate box is impossible.
* Status Bar now available for Scan Popup window as well.
* Fixed #13: Eliminated modal box when sound is not available:
Instead of modal dialog box we now show the status bar message,
with error icon, thus making it visible but not disruptive.
* Proper handling of status bar images.
* Styling of the status bar in both modes
(in Mani Window and in Popup Window).
1. Add search word under cursor through IAccessibleEx interface and UI Automation technology.
2. Reorganize GoldenDict main program and scan libraries interaction to reduce influence to other programs.
3. Fix crash in scan libraries in IE9 protected mode.