mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
Fix empty menu if program compiled with qt5
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
This commit is contained in:
parent
13a321190f
commit
09a7d4db33
|
@ -585,8 +585,11 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
||||||
connect( ui.menuHistory, SIGNAL( aboutToShow() ),
|
connect( ui.menuHistory, SIGNAL( aboutToShow() ),
|
||||||
this, SLOT( updateHistoryMenu() ) );
|
this, SLOT( updateHistoryMenu() ) );
|
||||||
|
|
||||||
|
#if !defined( HAVE_X11 ) || QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 )
|
||||||
// Show tray icon early so the user would be happy. It won't be functional
|
// Show tray icon early so the user would be happy. It won't be functional
|
||||||
// though until the program inits fully.
|
// though until the program inits fully.
|
||||||
|
// Do not create dummy tray icon in X. Cause QT5 failed to upgrade systemtray context menu.
|
||||||
|
// And as result menu for some DEs apppear to be empty, for example in MATE DE.
|
||||||
|
|
||||||
if ( cfg.preferences.enableTrayIcon )
|
if ( cfg.preferences.enableTrayIcon )
|
||||||
{
|
{
|
||||||
|
@ -594,6 +597,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
||||||
trayIcon->setToolTip( tr( "Loading..." ) );
|
trayIcon->setToolTip( tr( "Loading..." ) );
|
||||||
trayIcon->show();
|
trayIcon->show();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
connect( navBack, SIGNAL( triggered() ),
|
connect( navBack, SIGNAL( triggered() ),
|
||||||
this, SLOT( backClicked() ) );
|
this, SLOT( backClicked() ) );
|
||||||
|
|
Loading…
Reference in a new issue