Updated the chanview API to use GTK3-safe font descriptions while keeping GTK2 style handling conditional in the header and implementation.

Guarded tree view palette application to use GTK3 font descriptions or GTK2 styles appropriately.
Adjusted the chanview creation call site to pass GTK3 font descriptions or GTK2 styles based on the build.
This commit is contained in:
2026-01-30 18:39:49 -07:00
parent 6c17f4bc16
commit 9bdbeffeb0
4 changed files with 35 additions and 5 deletions

View File

@@ -116,11 +116,17 @@ cv_tree_init (chanview *cv)
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cv->store));
gtk_widget_set_name (view, "zoitechat-tree");
if (cv->style)
if (
#if HAVE_GTK3
cv->font_desc
#else
cv->style
#endif
)
{
#if HAVE_GTK3
gtkutil_apply_palette (view, &colors[COL_BG], &colors[COL_FG],
cv->style->font_desc);
cv->font_desc);
#else
gtkutil_apply_palette (view, &cv->style->base[GTK_STATE_NORMAL],
&cv->style->text[GTK_STATE_NORMAL],