From e13ad1a18069f792dcebc2a3de38b9c476fd0233 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 31 Jul 2022 01:42:37 +0200 Subject: [PATCH] gtk: Adjust to reordering of XPM icons Commit cc7f550 "Migrate to a CMake-based build system." reversed the order of xpm_icons, so the largest icon (96x96) is now first and the smallest (16x16) is now last. The About dialog now shows the smallest icon, and the window icon is now the largest icon. Change the array indexing so that the same size icons are used as before. Fixes: cc7f5503dc8f ("Migrate to a CMake-based build system.") --- gtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk.c b/gtk.c index a935a56..8f3a3a6 100644 --- a/gtk.c +++ b/gtk.c @@ -3004,7 +3004,7 @@ static void menu_about_event(GtkMenuItem *menuitem, gpointer data) if (n_xpm_icons) { GdkPixbuf *icon = gdk_pixbuf_new_from_xpm_data - ((const gchar **)xpm_icons[n_xpm_icons-1]); + ((const gchar **)xpm_icons[0]); gtk_show_about_dialog (GTK_WINDOW(fe->window), @@ -3558,7 +3558,7 @@ static frontend *new_window( if (n_xpm_icons) { gtk_window_set_icon(GTK_WINDOW(fe->window), gdk_pixbuf_new_from_xpm_data - ((const gchar **)xpm_icons[0])); + ((const gchar **)xpm_icons[n_xpm_icons-1])); iconlist = NULL; for (n = 0; n < n_xpm_icons; n++) {