diff -r b9767cb5b06b -r d2bd73d28ff1 ui/gtk/toolkit.h --- a/ui/gtk/toolkit.h Fri Nov 29 22:21:36 2024 +0100 +++ b/ui/gtk/toolkit.h Thu Dec 12 20:01:43 2024 +0100 @@ -40,7 +40,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-declarations" -#if GLIB_MAJOR_VERSION * 1000 + GLIB_MINOR_VERSION > 74 +#if GLIB_MAJOR_VERSION * 1000 + GLIB_MINOR_VERSION > 2074 #define UI_G_APPLICATION_FLAGS G_APPLICATION_DEFAULT_FLAGS #else #define UI_G_APPLICATION_FLAGS G_APPLICATION_FLAGS_NONE @@ -70,6 +70,9 @@ #define EXPANDER_SET_CHILD(expander, child) gtk_expander_set_child(GTK_EXPANDER(expander), child) #define WIDGET_ADD_CSS_CLASS(w, cssclass) gtk_widget_add_css_class(w, cssclass) #define WIDGET_REMOVE_CSS_CLASS(w, cssclass) gtk_widget_remove_css_class(w, cssclass) +#define ICON_IMAGE(icon) gtk_image_new_from_icon_name(icon) +#define LISTBOX_REMOVE(listbox, row) gtk_list_box_remove(GTK_LIST_BOX(listbox), row) +#define LISTBOX_ROW_SET_CHILD(row, child) gtk_list_box_row_set_child(GTK_LIST_BOX_ROW(row), child) #else #define WINDOW_SHOW(window) gtk_widget_show_all(window) #define WINDOW_DESTROY(window) gtk_widget_destroy(window) @@ -86,6 +89,9 @@ #define EXPANDER_SET_CHILD(expander, child) gtk_container_add(GTK_CONTAINER(expander), child) #define WIDGET_ADD_CSS_CLASS(w, cssclass) gtk_style_context_add_class(gtk_widget_get_style_context(w), cssclass) #define WIDGET_REMOVE_CSS_CLASS(w, cssclass) gtk_style_context_remove_class(gtk_widget_get_style_context(w), cssclass) +#define ICON_IMAGE(icon) gtk_image_new_from_icon_name(icon, GTK_ICON_SIZE_BUTTON) +#define LISTBOX_REMOVE(listbox, row) gtk_container_remove(GTK_CONTAINER(listbox), row) +#define LISTBOX_ROW_SET_CHILD(row, child) gtk_container_add(GTK_CONTAINER(row), child) #endif #ifdef UI_GTK2 @@ -168,6 +174,7 @@ void ui_destroy_userdata(GtkWidget *object, void *userdata); void ui_destroy_vardata(GtkWidget *object, UiVarEventData *data); +void ui_destroy_widget_var(GtkWidget *object, UiVar *var); void ui_destroy_boundvar(UiContext *ctx, UiVar *var); void ui_set_active_window(UiObject *obj);