mirror of https://github.com/GNOME/gimp.git
app: Calculate number of creators in about dialog
This commit is contained in:
parent
d6fbe5acd4
commit
285a42eef3
|
@ -41,6 +41,10 @@
|
||||||
#include "gimp-intl.h"
|
#include "gimp-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* The first authors are the creators, don't shuffle them */
|
||||||
|
#define START_INDEX (G_N_ELEMENTS (creators) - 1 /*NULL*/)
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
@ -242,9 +246,6 @@ about_dialog_reshuffle (GimpAboutDialog *dialog)
|
||||||
for (i = 0; i < dialog->n_authors; i++)
|
for (i = 0; i < dialog->n_authors; i++)
|
||||||
dialog->shuffle[i] = i;
|
dialog->shuffle[i] = i;
|
||||||
|
|
||||||
/* here we rely on the authors array having Peter and Spencer first */
|
|
||||||
#define START_INDEX 2
|
|
||||||
|
|
||||||
for (i = START_INDEX; i < dialog->n_authors; i++)
|
for (i = START_INDEX; i < dialog->n_authors; i++)
|
||||||
{
|
{
|
||||||
gint j = g_rand_int_range (gr, START_INDEX, dialog->n_authors);
|
gint j = g_rand_int_range (gr, START_INDEX, dialog->n_authors);
|
||||||
|
@ -259,8 +260,6 @@ about_dialog_reshuffle (GimpAboutDialog *dialog)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef START_INDEX
|
|
||||||
|
|
||||||
g_rand_free (gr);
|
g_rand_free (gr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,15 @@
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
/* NOTE: This file is auto-generated from authors.xml, do not edit it. */
|
/* NOTE: This file is auto-generated from authors.xml, do not edit it. */
|
||||||
|
|
||||||
|
static const gchar * const creators[] =
|
||||||
|
{
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="dc:creator" />
|
||||||
|
<xsl:text> NULL
|
||||||
|
};
|
||||||
|
</xsl:text>
|
||||||
|
|
||||||
|
<xsl:text>
|
||||||
static const gchar * const authors[] =
|
static const gchar * const authors[] =
|
||||||
{
|
{
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
|
|
Loading…
Reference in New Issue