Skip to content

Commit 2dac2d3

Browse files
committed
Hide and show system tray icon on all platforms
1 parent 4c0ace9 commit 2dac2d3

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

src/app/qgisapp.cpp

+1-23
Original file line numberDiff line numberDiff line change
@@ -1135,17 +1135,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
11351135

11361136
mTray = new QSystemTrayIcon();
11371137
mTray->setIcon( QIcon( QgsApplication::appIconPath() ) );
1138-
mTray->show();
1139-
#ifdef Q_OS_MAC
1140-
// We only want the system notifications, no need for constant menubar icon
1141-
mTray->hide();
1142-
#endif
1143-
1144-
#ifdef Q_OS_WIN
1145-
// We only want the system notifications, no need for constant menubar icon
11461138
mTray->hide();
1147-
#endif
1148-
11491139

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

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

1242012410
void QgisApp::showSystemNotification( const QString title, const QString message )
1242112411
{
12422-
#ifdef Q_OS_MAC
12423-
// Menubar icon is hidden on macOS, by default. Show to enable notification bubbles
12412+
// Menubar icon is hidden by default. Show to enable notification bubbles
1242412413
mTray->show();
12425-
#endif
12426-
#ifdef Q_OS_WIN
12427-
// Menubar icon is hidden on macOS, by default. Show to enable notification bubbles
12428-
mTray->show();
12429-
#endif
1243012414
mTray->showMessage( title, message );
12431-
#ifdef Q_OS_MAC
1243212415
// Re-hide menubar icon
1243312416
mTray->hide();
12434-
#endif
12435-
#ifdef Q_OS_WIN
12436-
// Re-hide menubar icon
12437-
mTray->hide();
12438-
#endif
1243912417
}
1244012418

1244112419
void QgisApp::osmDownloadDialog()

0 commit comments

Comments
 (0)