Fixed by not adding dummy system tray under X env
Tested for:
Mate 1.22.1
XFCE4 4.12
KDE 5.14.5 (damn it's so ugly now)
GNOME (with topicons-plus extension)
This commit fixes #907, fixes #1097 and fixes #1155
abcabb77fa added a makeScanPopup() call
after applyQtStyleSheet() in MainWindow constructor to apply Qt style
sheets to the scan popup. This call destroys the scan popup created
earlier in the MainWindow constructor and creates a new instance.
Let us remove the first, now redundant invocation of makeScanPopup()
from MainWindow::makeDictionaries() to improve startup performance.
makeDictionaries() is currently called only once, so modifying it is not
a problem. If makeDictionaries() is used elsewhere in the future,
the added assertion will remind to reconstruct the scan popup.
For example, looking up "United States" in my local dictionaries, then
pressing Ctrl++ to increase zoom factor from 1 to 5 takes 4 seconds with
this change and 25 seconds without it. The same scaling takes 6 seconds
with this change and 45 seconds without when I enable English Wikipedia,
which has a particularly large "United States" article.
There is a workaround that speeds up zooming: look up a nonexistent
word, scale to the desired level, then go back to the large articles.
But this is tedious if large articles are open in scan popup or
in case of many tabs in the main window.
* #undef Bool with Qt4 as well as with Qt5.
* #undef min, #undef max from <X11/Xlibint.h>.
* #include <fixx11h.h> just after hotkeywrapper.hh. Unfortunately this
header can not be included in hotkeywrapper.hh directly because
some of the undef-ed words are actually used in hotkeywrapper.cc.
* #include <fixx11h.h> after <X11/Xlib.h> in mainwindow.cc just in case
hotkeywrapper.hh stops including this Xlib.h header in the future.
These changes should make future compilation errors less likely.
For example, without "#undef min" in hotkeywrapper.hh, including
<iomanip> in mainwindow.cc after the mainwindow.hh include resulted in
the following GCC 8 compilation error:
/usr/include/c++/8.2.1/bits/locale_facets_nonio.tcc:945:22:
error: expected unqualified-id before ‘(’ token
__minlen = std::min(__minlen,
^~~
* Run the freedesktop.org-specific code only on X11 (not on Mac).
* Use a (hopefully) unique destination .desktop file name to prevent
clashes with a goldendict.desktop file possibly created and customized
manually or by a system preferences tool.
* Allow different executable and .desktop file names because there is
no real dependency between them.
* Improve performance slightly with an early return.
Destroying and creating a scan popup instance twice in
MainWindow::editPreferences() is wasteful.
2b9dd55804 added the unconditional second
makeScanPopup() call below but didn't remove the existing call,
probably by mistake.
* 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.
1. Change edit trigger for favorites from "double click" to "click on selected"
2. Don't show pages while multi-selection via Control key
3. Allow add folder via context menu while click on empty space
4. Show headwords without lost of focus on Favorites pane