Routed GTK cell renderer foreground bindings through PALETTE_FOREGROUND_PROPERTY for user list, notify, and DCC views to ensure GTK3 uses RGBA while preserving GTK2 behavior.

Tightened GTK3 RGBA parsing by using stack buffers in palette color conversion and guarded parsing in the setup color chooser dialog.
This commit is contained in:
2026-01-22 22:47:11 -07:00
parent 3c0a4e4995
commit 51fd0fca91
5 changed files with 7 additions and 25 deletions

View File

@@ -1596,15 +1596,14 @@ setup_color_cb (GtkWidget *button, gpointer userdata)
PaletteColor *color;
GdkRGBA rgba;
gboolean parsed_ok;
char *color_string;
g_autofree char *color_string = NULL;
setup_color_dialog_data *data;
color = &colors[GPOINTER_TO_INT (userdata)];
dialog = gtk_color_chooser_dialog_new (_("Select color"), GTK_WINDOW (setup_window));
color_string = gdk_rgba_to_string (color);
parsed_ok = gdk_rgba_parse (&rgba, color_string);
g_free (color_string);
parsed_ok = color_string && gdk_rgba_parse (&rgba, color_string);
if (!parsed_ok)
rgba = *color;
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (dialog), &rgba);