From 0a56cdbca0f24ff069e4488e1cdad0bd7bef61b0 Mon Sep 17 00:00:00 2001 From: "Thomas A. F. Thorne" Date: Tue, 22 Jan 2019 10:48:22 +0000 Subject: [PATCH 1/2] Reduce Sysmtem Tray Retry Attempts It is not essential that the system tray exists in order that the application contuinue to function. Reduce the number of retry attempts which will reduce the time the application appears stalled at startup. This is part of the work on making the app work without the need of system tray support as described uner #155. --- src/gui/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/src/main.cpp b/src/gui/src/main.cpp index c01c8f76..e11c5978 100644 --- a/src/gui/src/main.cpp +++ b/src/gui/src/main.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#define TRAY_RETRY_COUNT 10 +#define TRAY_RETRY_COUNT 5 #define TRAY_RETRY_WAIT 2000 #include "QBarrierApplication.h" From 79c08baf4363a9c3146eca2c822f2caa5250a6c1 Mon Sep 17 00:00:00 2001 From: "Thomas A. F. Thorne" Date: Tue, 22 Jan 2019 15:52:44 +0000 Subject: [PATCH 2/2] Do Not Warn About Missing System Tray The system tray will be a nice to have. Everything should continue to operate in a satisfactory manner without it. Log the warning but do not interup the user with the message. --- src/gui/src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/src/main.cpp b/src/gui/src/main.cpp index e11c5978..73251d52 100644 --- a/src/gui/src/main.cpp +++ b/src/gui/src/main.cpp @@ -138,8 +138,7 @@ int waitForTray() if (++trayAttempts > TRAY_RETRY_COUNT) { - QMessageBox::critical(NULL, "Barrier", - QObject::tr("System tray is unavailable, don't close your window.")); + fprintf(stdout, "System tray is unavailable.\n"); return false; }