GtkAboutDialog precondition check doesn't allow new licenses from 3.24.20
Steps to reproduce
Compile and run this:
#include <glib.h>
#include <gtk/gtk.h>
static gboolean
do_quit (gpointer user_data)
{
gtk_main_quit ();
return G_SOURCE_REMOVE;
}
int main(int argc, char **argv)
{
GtkWidget *dialog;
int i;
gtk_init (&argc, &argv);
dialog = gtk_about_dialog_new ();
gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (dialog), "Foo");
for (i = GTK_LICENSE_UNKNOWN; i <= GTK_LICENSE_MPL_2_0; i++)
gtk_about_dialog_set_license_type (GTK_ABOUT_DIALOG (dialog), i);
gtk_widget_show_all (dialog);
g_timeout_add_seconds (1, do_quit, NULL);
gtk_main();
return 0;
}
Current behavior
Criticals for GTK_LICENSE_BSD_3
, GTK_LICENSE_APACHE_2_0
and GTK_LICENSE_MPL_2_0
. The license is indicated to be AGPL-3.0 only.
Expected outcome
No criticals. The license is indicated to be MPL-2.0.
Version information
3.24.20 (Debian 3.24.20-1, no patches relevant to this part of GTK) on Debian testing/unstable.
Git master appears to have this bug too.
Additional information
Downstream bug: https://bugs.debian.org/960303. I'll send a MR when I've tested it.