Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Link upgrade page if new version is available
Browse files Browse the repository at this point in the history
ann0see committed Sep 1, 2021

Verified

This commit was signed with the committer’s verified signature.
nlohmann Niels Lohmann
1 parent b517847 commit 6a95ba4
Showing 3 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/clientdlg.cpp
Original file line number Diff line number Diff line change
@@ -258,7 +258,13 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
lblGlobalInfoLabel->hide();

// prepare update check info label (invisible by default)
lblUpdateCheck->setText ( "<font color=\"red\"><b>" + QString ( APP_NAME ) + " " + tr ( "software upgrade available" ) + "</b></font>" );
lblUpdateCheck->setOpenExternalLinks ( true ); // enables opening a web browser if one clicks on a html link
lblUpdateCheck->setText (
"<font color=\"#c94a55\"><b>" +
tr ( APP_UPGRADE_AVAILABLE_MSG_TEXT )
.arg ( APP_NAME )
.arg ( VERSION ) +
"</b></font>" );
lblUpdateCheck->hide();

// setup timers
4 changes: 4 additions & 0 deletions src/global.h
Original file line number Diff line number Diff line change
@@ -115,6 +115,10 @@ LED bar: lbr
#define SERVER_GETTING_STARTED_URL "https://jamulus.io/wiki/Running-a-Server"
#define SOFTWARE_MANUAL_URL "https://jamulus.io/wiki/Software-Manual"

// app update message
#define APP_UPGRADE_AVAILABLE_MSG_TEXT \
"A %1 upgrade is available: <a style='color:#c94a55;' href='https://jamulus.io/upgrade?progversion=%2'>go to details and downloads</a>"

// determining server internal address uses well-known host and port
// We just need a valid, public Internet IP here. We will not send any
// traffic there as we will only set up an UDP socket without sending any
8 changes: 7 additions & 1 deletion src/serverdlg.cpp
Original file line number Diff line number Diff line change
@@ -331,7 +331,13 @@ lvwClients->setMinimumHeight ( 140 );
tedWelcomeMessage->setText ( pServer->GetWelcomeMessage() );

// prepare update check info label (invisible by default)
lblUpdateCheck->setText ( "<font color=\"red\"><b>" + QString ( APP_NAME ) + " " + tr ( "software upgrade available" ) + "</b></font>" );
lblUpdateCheck->setOpenExternalLinks ( true ); // enables opening a web browser if one clicks on a html link
lblUpdateCheck->setText (
"<font color=\"#c94a55\"><b>" +
tr ( APP_UPGRADE_AVAILABLE_MSG_TEXT )
.arg ( APP_NAME )
.arg ( VERSION ) +
"</b></font>" );
lblUpdateCheck->hide();

// update GUI dependencies

0 comments on commit 6a95ba4

Please sign in to comment.