--- a/ui/gtk/range.c Sun May 23 09:44:43 2021 +0200 +++ b/ui/gtk/range.c Sat Jan 04 16:38:48 2025 +0100 @@ -31,13 +31,12 @@ #include "range.h" #include "container.h" -#include <ucx/mempool.h> #include "../common/context.h" #include "../common/object.h" static UIWIDGET ui_scrollbar(UiObject *obj, UiOrientation orientation, UiRange *range, ui_callback f, void *userdata) { -#ifdef UI_GTK3 +#if GTK_MAJOR_VERSION >= 3 GtkWidget *scrollbar = gtk_scrollbar_new(orientation == UI_HORIZONTAL ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL, NULL); #else GtkWidget *scrollbar; @@ -62,6 +61,7 @@ event->userdata = userdata; event->callback = f; event->value = 0; + event->customdata = NULL; g_signal_connect( G_OBJECT(scrollbar), @@ -124,7 +124,7 @@ #else gtk_adjustment_set_page_size(a, extent); #endif -#if !(GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 18) +#if GTK_MAJOR_VERSION * 100 + GTK_MIMOR_VERSION < 318 gtk_adjustment_changed(a); #endif range->extent = extent;