Fix about dialog again. Update readme with more complete deps

This commit is contained in:
2023-12-07 13:07:58 -08:00
parent d472f6348d
commit 63b2780499
4 changed files with 3 additions and 50 deletions

View File

@ -40,20 +40,12 @@
#include "git-version.h"
#include "about-dialog.h"
#include "authors.h"
#include "pika-update.h"
#include "pika-version.h"
#include "pika-intl.h"
/* The first authors are the creators and maintainers, don't shuffle
* them
*/
#define START_INDEX (G_N_ELEMENTS (creators) - 1 /*NULL*/ + \
G_N_ELEMENTS (maintainers) - 1 /*NULL*/)
typedef struct
{
GtkWidget *dialog;
@ -66,9 +58,6 @@ typedef struct
GtkWidget *anim_area;
PangoLayout *layout;
gint n_authors;
gint shuffle[G_N_ELEMENTS (authors) - 1]; /* NULL terminated */
guint timer;
gint index;
@ -122,7 +111,6 @@ about_dialog_create (Pika *pika,
gchar *version;
dialog.pika = pika;
dialog.n_authors = G_N_ELEMENTS (authors) - 1;
dialog.config = config;
pixbuf = about_dialog_load_logo ();
@ -151,12 +139,6 @@ about_dialog_create (Pika *pika,
"logo", pixbuf,
"website", "https://heckin.technology/AlderconeStudio/PIKApp/",
"website-label", _("Visit the PIKA website"),
"authors", authors,
"artists", artists,
"documenters", documenters,
/* Translators: insert your names here,
separated by newline */
"translator-credits", _("translator-credits"),
NULL);
if (pixbuf)
@ -490,27 +472,6 @@ about_dialog_add_update (PikaAboutDialog *dialog,
static void
about_dialog_reshuffle (PikaAboutDialog *dialog)
{
GRand *gr = g_rand_new ();
gint i;
for (i = 0; i < dialog->n_authors; i++)
dialog->shuffle[i] = i;
for (i = START_INDEX; i < dialog->n_authors; i++)
{
gint j = g_rand_int_range (gr, START_INDEX, dialog->n_authors);
if (i != j)
{
gint t;
t = dialog->shuffle[j];
dialog->shuffle[j] = dialog->shuffle[i];
dialog->shuffle[i] = t;
}
}
g_rand_free (gr);
}
static gboolean
@ -691,14 +652,6 @@ about_dialog_timer (gpointer data)
dialog->state += 1;
break;
case 2:
if (! (dialog->index < dialog->n_authors))
dialog->index = 0;
text = insert_spacers (authors[dialog->shuffle[dialog->index]]);
dialog->index += 1;
break;
default:
g_return_val_if_reached (TRUE);
break;