After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 332606 - vte_terminal_set_colors doesn't accept 24 colors
vte_terminal_set_colors doesn't accept 24 colors
Status: RESOLVED DUPLICATE of bug 372743
Product: vte
Classification: Core
Component: general
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Reported: 2006-02-26 10:56 UTC by Loïc Minier
Modified: 2007-06-12 00:03 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Loïc Minier 2006-02-26 10:56:05 UTC

Ethan Glasser-Camp reported in Debian bug
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.

This seems to still apply to CVS.

Comment 1 Guilherme de Siqueira Pastore 2007-06-12 00:03:42 UTC

*** This bug has been marked as a duplicate of 372743 ***