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

@@ -25,7 +25,13 @@
typedef struct _chanview chanview;
typedef struct _chan chan;
chanview *chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons, InputStyle *style);
chanview *chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons,
#if HAVE_GTK3
PangoFontDescription *font_desc
#else
InputStyle *style
#endif
);
void chanview_set_callbacks (chanview *cv,
void (*cb_focus) (chanview *, chan *, int tag, void *userdata),
void (*cb_xbutton) (chanview *, chan *, int tag, void *userdata),