Issue #8520: show devel download link when relevant.

This is shown in the About dialog when a new version is available, but
also in the debug dialog (also when a new version is available).

Of course, for stable versions, we should still show the main download
page (which I double-checked current code does).
This commit is contained in:
Jehan 2022-08-31 13:13:27 +02:00
parent 99d16a6f31
commit 08b7de3b13
2 changed files with 12 additions and 2 deletions

View File

@ -332,7 +332,8 @@ about_dialog_add_update (GimpAboutDialog *dialog,
if (config->last_known_release != NULL)
{
/* There is a newer version. */
gchar *comment = NULL;
const gchar *download_url = NULL;
gchar *comment = NULL;
/* We want the frame to stand out. */
label = gtk_label_new (NULL);
@ -350,9 +351,14 @@ about_dialog_add_update (GimpAboutDialog *dialog,
gtk_image_set_from_icon_name (GTK_IMAGE (button_image),
"software-update-available",
GTK_ICON_SIZE_DIALOG);
#ifdef GIMP_UNSTABLE
download_url = "https://www.gimp.org/downloads/devel/";
#else
download_url = "https://www.gimp.org/downloads/";
#endif
g_signal_connect (button, "clicked",
(GCallback) about_dialog_download_clicked,
"https://www.gimp.org/downloads/");
(gpointer) download_url);
/* The preferred localized date representation without the time. */
datetime = g_date_time_new_from_unix_local (config->last_release_timestamp);

View File

@ -445,7 +445,11 @@ gimp_critical_dialog_response (GtkDialog *dialog,
break;
case GIMP_CRITICAL_RESPONSE_DOWNLOAD:
#ifdef GIMP_UNSTABLE
url = "https://www.gimp.org/downloads/devel/";
#else
url = "https://www.gimp.org/downloads/";
#endif
case GIMP_CRITICAL_RESPONSE_URL:
if (url == NULL)
{