mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-21 21:20:20 +00:00
Updated GTK3 adjustment assignment to use floating-safe GObject ref handling while preserving GTK2 behavior in the existing path.
This commit is contained in:
@@ -2710,7 +2710,15 @@ gtk_xtext_scroll_adjustments (GtkXText *xtext, GtkAdjustment *hadj, GtkAdjustmen
|
|||||||
if (xtext->adj != vadj)
|
if (xtext->adj != vadj)
|
||||||
{
|
{
|
||||||
xtext->adj = vadj;
|
xtext->adj = vadj;
|
||||||
|
#if HAVE_GTK3
|
||||||
|
if (g_object_is_floating (xtext->adj))
|
||||||
|
g_object_ref_sink (xtext->adj);
|
||||||
|
else
|
||||||
|
g_object_ref (xtext->adj);
|
||||||
|
#endif
|
||||||
|
#if !HAVE_GTK3
|
||||||
g_object_ref_sink (xtext->adj);
|
g_object_ref_sink (xtext->adj);
|
||||||
|
#endif
|
||||||
|
|
||||||
xtext->vc_signal_tag = g_signal_connect (xtext->adj, "value-changed",
|
xtext->vc_signal_tag = g_signal_connect (xtext->adj, "value-changed",
|
||||||
G_CALLBACK (gtk_xtext_adjustment_changed),
|
G_CALLBACK (gtk_xtext_adjustment_changed),
|
||||||
|
|||||||
Reference in New Issue
Block a user