From c430f1e87e21773db683bdc411c42d6bec76d38f Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 29 Jun 2024 20:25:04 +0200 Subject: [PATCH] nxcomp/src/Loop.cpp: Support NXTransDialog caption / title being prefixed with a custom prefix string. --- nxcomp/src/Loop.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index 4bbf42b915..a09d419135 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -14731,7 +14731,17 @@ static void handleAlertInLoop() { char caption[DEFAULT_STRING_LENGTH]; - strcpy(caption, ALERT_CAPTION_PREFIX); + const char* caption_prefix = getenv("NX_DIALOG_CAPTIONPREFIX"); + + if (!caption_prefix) { + // Use the hard-coded 'NX -' as default. + strcpy(caption, ALERT_CAPTION_PREFIX); + } + else + { + // Use what gets provided via NX_DIALOG_CAPTIONPREFIX (used in X2Go) + strcpy(caption, caption_prefix); + } int length = strlen(sessionId);