Skip to content

Commit c430f1e

Browse files
committed
nxcomp/src/Loop.cpp: Support NXTransDialog caption / title being prefixed with a custom prefix string.
1 parent 288394c commit c430f1e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

nxcomp/src/Loop.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14731,7 +14731,17 @@ static void handleAlertInLoop()
1473114731
{
1473214732
char caption[DEFAULT_STRING_LENGTH];
1473314733

14734-
strcpy(caption, ALERT_CAPTION_PREFIX);
14734+
const char* caption_prefix = getenv("NX_DIALOG_CAPTIONPREFIX");
14735+
14736+
if (!caption_prefix) {
14737+
// Use the hard-coded 'NX -' as default.
14738+
strcpy(caption, ALERT_CAPTION_PREFIX);
14739+
}
14740+
else
14741+
{
14742+
// Use what gets provided via NX_DIALOG_CAPTIONPREFIX (used in X2Go)
14743+
strcpy(caption, caption_prefix);
14744+
}
1473514745

1473614746
int length = strlen(sessionId);
1473714747

0 commit comments

Comments
 (0)