mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
disable more staffs related to macOS trayicon -> dock icon
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
This commit is contained in:
parent
1e3b22ebd0
commit
608016208b
|
@ -197,8 +197,6 @@ Preferences::Preferences():
|
|||
hideSingleTab( false ),
|
||||
mruTabOrder( false ),
|
||||
hideMenubar( false ),
|
||||
enableTrayIcon( true ),
|
||||
startToTray( false ),
|
||||
autoStart( false ),
|
||||
doubleClickTranslates( true ),
|
||||
selectWordBySingleClick( false ),
|
||||
|
@ -902,10 +900,9 @@ Class load()
|
|||
c.preferences.hideSingleTab = ( preferences.namedItem( "hideSingleTab" ).toElement().text() == "1" );
|
||||
c.preferences.mruTabOrder = ( preferences.namedItem( "mruTabOrder" ).toElement().text() == "1" );
|
||||
c.preferences.hideMenubar = ( preferences.namedItem( "hideMenubar" ).toElement().text() == "1" );
|
||||
|
||||
#ifndef Q_OS_MACOS // // macOS uses the dock menu instead of the tray icon
|
||||
c.preferences.enableTrayIcon = ( preferences.namedItem( "enableTrayIcon" ).toElement().text() == "1" );
|
||||
c.preferences.startToTray = ( preferences.namedItem( "startToTray" ).toElement().text() == "1" );
|
||||
#ifndef Q_OS_MACOS // // macOS uses the dock menu instead of the tray icon
|
||||
c.preferences.closeToTray = ( preferences.namedItem( "closeToTray" ).toElement().text() == "1" );
|
||||
#endif
|
||||
c.preferences.autoStart = ( preferences.namedItem( "autoStart" ).toElement().text() == "1" );
|
||||
|
|
|
@ -341,12 +341,15 @@ struct Preferences
|
|||
bool hideSingleTab;
|
||||
bool mruTabOrder;
|
||||
bool hideMenubar;
|
||||
bool enableTrayIcon;
|
||||
bool startToTray;
|
||||
|
||||
#ifdef Q_OS_MACOS // macOS uses the dock menu instead of the tray icon
|
||||
bool closeToTray = false;
|
||||
bool enableTrayIcon = false;
|
||||
bool startToTray = false;
|
||||
#else
|
||||
bool enableTrayIcon = true;
|
||||
bool closeToTray = true;
|
||||
bool startToTray = false;
|
||||
#endif
|
||||
|
||||
bool autoStart;
|
||||
|
|
|
@ -1426,6 +1426,7 @@ void MainWindow::trayIconUpdateOrInit()
|
|||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
trayIconMenu.setAsDockMenu();
|
||||
ui.actionCloseToTray->setVisible( false );
|
||||
#else
|
||||
|
||||
if ( !cfg.preferences.enableTrayIcon ) {
|
||||
|
|
Loading…
Reference in a new issue