Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hide system tray icon on Windows
  • Loading branch information
NathanW2 committed Mar 24, 2017
1 parent 9c5abc9 commit 4c0ace9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -1141,6 +1141,11 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
mTray->hide();
#endif

#ifdef Q_OS_WIN
// We only want the system notifications, no need for constant menubar icon
mTray->hide();
#endif


connect( QgsApplication::taskManager(), &QgsTaskManager::statusChanged, this, &QgisApp::onTaskCompleteShowNotify );

Expand Down Expand Up @@ -12417,12 +12422,20 @@ void QgisApp::showSystemNotification( const QString title, const QString message
#ifdef Q_OS_MAC
// Menubar icon is hidden on macOS, by default. Show to enable notification bubbles
mTray->show();
#endif
#ifdef Q_OS_WIN
// Menubar icon is hidden on macOS, by default. Show to enable notification bubbles
mTray->show();
#endif
mTray->showMessage( title, message );
#ifdef Q_OS_MAC
// Re-hide menubar icon
mTray->hide();
#endif
#ifdef Q_OS_WIN
// Re-hide menubar icon
mTray->hide();
#endif
}

void QgisApp::osmDownloadDialog()
Expand Down

2 comments on commit 4c0ace9

@nirvn
Copy link
Contributor

@nirvn nirvn commented on 4c0ace9 Mar 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also hide on linux please.

@NathanW2
Copy link
Member Author

@NathanW2 NathanW2 commented on 4c0ace9 Mar 24, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.