Skip to content

Commit

Permalink
nxcomp/src/Loop.cpp: Support NXTransDialog caption / title being pref…
Browse files Browse the repository at this point in the history
…ixed with a custom prefix string.
  • Loading branch information
sunweaver committed Jun 29, 2024
1 parent 288394c commit c430f1e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nxcomp/src/Loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c430f1e

Please sign in to comment.