cancel

free software for cancelling people and organizations
git clone https://git.parazyd.org/cancel
Log | Files | Refs | README | LICENSE

commit cb72f4064efff20bc0dab0345d3162978bece63a
parent 66983a1eb5094fc474563e1b105c1cec0cc3f521
Author: parazyd <parazyd@dyne.org>
Date:   Thu, 25 Mar 2021 15:56:53 +0100

Random Karens.

Diffstat:
Mcancel.c | 12+++++++++++-
Rkaren.png -> karens/karen0.jpg | 0
Akarens/karen1.jpg | 0
Akarens/karen2.jpg | 0
Akarens/karen3.jpg | 0
5 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/cancel.c b/cancel.c @@ -17,6 +17,15 @@ #include <gtk/gtk.h> +#define nelem(x) (sizeof (x) / sizeof *(x)) + +static const char *karens[] = { + "karens/karen0.jpg", + "karens/karen1.jpg", + "karens/karen2.jpg", + "karens/karen3.jpg", +}; + static void cancel(GtkWidget *window, gpointer data) { GtkWidget *dialog, *content_area, *label, *karen; @@ -28,7 +37,8 @@ static void cancel(GtkWidget *window, gpointer data) label = gtk_label_new("\nSuccessfully cancelled!\n"); gtk_container_add(GTK_CONTAINER(content_area), label); - karen = gtk_image_new_from_file("karen.png"); + karen = gtk_image_new_from_file(karens[g_rand_int_range(g_rand_new(), + 0, nelem(karens))]); gtk_container_add(GTK_CONTAINER(content_area), karen); gtk_widget_show_all(dialog); diff --git a/karen.png b/karens/karen0.jpg Binary files differ. diff --git a/karens/karen1.jpg b/karens/karen1.jpg Binary files differ. diff --git a/karens/karen2.jpg b/karens/karen2.jpg Binary files differ. diff --git a/karens/karen3.jpg b/karens/karen3.jpg Binary files differ.