Skip to content
Permalink
Browse files
Hide and show system tray icon on all platforms
  • Loading branch information
NathanW2 committed Mar 24, 2017
1 parent 4c0ace9 commit 2dac2d3bac5291f6222bc3819eb158c1d0d4b671
Showing with 1 addition and 23 deletions.
  1. +1 −23 src/app/qgisapp.cpp
@@ -1135,17 +1135,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh

mTray = new QSystemTrayIcon();
mTray->setIcon( QIcon( QgsApplication::appIconPath() ) );
mTray->show();
#ifdef Q_OS_MAC
// We only want the system notifications, no need for constant menubar icon
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 );

@@ -12419,23 +12409,11 @@ QMenu *QgisApp::createPopupMenu()

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
// Menubar icon is hidden 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()

0 comments on commit 2dac2d3

Please sign in to comment.