GNOME Bugzilla – Bug 372743
vte_terminal_set_colors doesn't work as advertised
Last modified: 2007-06-12 00:03:42 UTC
Please describe the problem: The documentation for the VTE widget says, under set_colors: "palette_size must be either 0, 8, 16, or 24." However, on vte.c, line 6692, in vte_terminal_set_colors, you can see the assertion: g_return_if_fail((palette_size == 0) || (palette_size == 8) || (palette_size == 16) || (palette_size == G_N_ELEMENTS(terminal->pvt->palette))); if palette_size is 24, you get a warning: CRITICAL **: vte_terminal_set_colors: assertion `(palette_size == 0) || (palette_size == 8) || (palette_size == 16) || (palette_size == G_N_ELEMENTS(terminal->pvt->palette))' failed You can work around this, because if you know how VteTerminal stores its palette, you can just create a 30-color palette with all the colors in the right place, but this is a hack. I think that the return_if_fail should have another condition added, which is palette_size == 24. Ethan Steps to reproduce: Actual results: Expected results: The function call should go through. Does this happen every time? Yes. Other information:
Still present in 0.16.x.. Ethan
2007-06-11 Behdad Esfahbod <behdad@gnome.org> Bug 372743 – vte_terminal_set_colors doesn't work as advertised * src/vte.c (vte_terminal_set_colors): Allow 24-color palettes.
*** Bug 332606 has been marked as a duplicate of this bug. ***