Guarded GTK2-only GtkObject includes in the xtext header for GTK2 builds only.

Added a shared cleanup helper plus GTK2 destroy/GTK3 dispose handlers with correct parent chaining for cleanup parity across GTK versions.
Updated class initialization to register GTK3 dispose or GTK2 destroy handlers with appropriate object class setup.
This commit is contained in:
2026-01-29 22:44:54 -07:00
parent aa0b271aa9
commit bf529ba1ff
2 changed files with 40 additions and 4 deletions

View File

@@ -21,6 +21,9 @@
#define ZOITECHAT_XTEXT_H
#include <gtk/gtk.h>
#if !HAVE_GTK3
#include <gtk/gtkobject.h>
#endif
#include <cairo.h>
#include "xtext-color.h"