Update upstream

This commit is contained in:
2023-12-02 11:03:24 -08:00
parent 84ea557696
commit d472f6348d
129 changed files with 17814 additions and 14162 deletions

View File

@ -2,7 +2,7 @@
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
*
* Original copyright, applying to most contents (license remains unchanged):
* Original copyright, applying to most contents (license remains unchanged):
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
@ -34,6 +34,8 @@
#include "config/pikacoreconfig.h"
#include "widgets/pikawidgets-utils.h"
#include "about.h"
#include "git-version.h"
@ -45,22 +47,34 @@
#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;
GtkWidget *dialog;
Pika *pika;
GtkWidget *update_frame;
PikaCoreConfig *config;
GtkWidget *anim_area;
PangoLayout *layout;
GtkWidget *anim_area;
PangoLayout *layout;
guint timer;
gint n_authors;
gint shuffle[G_N_ELEMENTS (authors) - 1]; /* NULL terminated */
gint index;
gint animstep;
gint state;
gboolean visible;
guint timer;
gint index;
gint animstep;
gint state;
gboolean visible;
} PikaAboutDialog;
@ -93,7 +107,8 @@ static void about_dialog_download_clicked
const gchar *link);
GtkWidget *
about_dialog_create (PikaCoreConfig *config)
about_dialog_create (Pika *pika,
PikaCoreConfig *config)
{
static PikaAboutDialog dialog;
@ -106,6 +121,8 @@ about_dialog_create (PikaCoreConfig *config)
gchar *copyright;
gchar *version;
dialog.pika = pika;
dialog.n_authors = G_N_ELEMENTS (authors) - 1;
dialog.config = config;
pixbuf = about_dialog_load_logo ();
@ -134,6 +151,9 @@ about_dialog_create (PikaCoreConfig *config)
"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"),
@ -196,6 +216,10 @@ about_dialog_map (GtkWidget *widget,
dialog->timer = g_timeout_add (800, about_dialog_timer, dialog);
}
#ifdef G_OS_WIN32
pika_window_set_title_bar_theme (dialog->pika, widget, FALSE);
#endif
}
static void
@ -466,6 +490,27 @@ 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
@ -642,11 +687,17 @@ about_dialog_timer (gpointer data)
return FALSE;
case 1:
text = insert_spacers (_("PIKA is brought to you by Aldercone Studio"));
text = insert_spacers (_("PIKA is brought to you by"));
dialog->state += 1;
break;
case 2:
return FALSE;
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);

View File

@ -23,7 +23,8 @@
#define __ABOUT_DIALOG_H__
GtkWidget * about_dialog_create (PikaCoreConfig *config);
GtkWidget * about_dialog_create (Pika *pika,
PikaCoreConfig *config);
#endif /* __ABOUT_DIALOG_H__ */

View File

@ -221,7 +221,7 @@ dialogs_about_get (PikaDialogFactory *factory,
PikaUIManager *ui_manager,
gint view_size)
{
return about_dialog_create (context->pika);
return about_dialog_create (context->pika, context->pika->edit_config);
}
GtkWidget *

View File

@ -1856,6 +1856,9 @@ prefs_dialog_new (Pika *pika,
prefs_check_button_add_with_icon (object, "global-gradient",
_("_Gradient"), PIKA_ICON_GRADIENT,
GTK_BOX (vbox2), size_group);
prefs_check_button_add_with_icon (object, "global-expand",
_("E_xpand Layers"), PIKA_ICON_TOOL_SCALE,
GTK_BOX (vbox2), size_group);
/* Move Tool */
vbox2 = prefs_frame_new (_("Move Tool"),