# HG changeset patch # User Olaf Wintermann # Date 1758740442 -7200 # Node ID c39e71be2e184fdcc1c6a114edff173d809151f7 # Parent 4531a342c5b365c806900ea7e0cd97d2d254282b allow NULL as enablefunc in ui_widget_set_groups diff -r 4531a342c5b3 -r c39e71be2e18 ui/common/context.c --- a/ui/common/context.c Tue Sep 23 17:40:40 2025 +0200 +++ b/ui/common/context.c Wed Sep 24 21:00:42 2025 +0200 @@ -542,6 +542,9 @@ } void ui_widget_set_groups(UiContext *ctx, UIWIDGET widget, ui_enablefunc enable, ...) { + if(enable == NULL) { + enable = (ui_enablefunc)ui_set_enabled; + } // get groups CxList *groups = cxArrayListCreate(cxDefaultAllocator, NULL, sizeof(int), 16); va_list ap; @@ -558,6 +561,9 @@ } void ui_widget_set_groups2(UiContext *ctx, UIWIDGET widget, ui_enablefunc enable, int *groups, int ngroups) { + if(enable == NULL) { + enable = (ui_enablefunc)ui_set_enabled; + } CxList *ls = cxArrayListCreate(cxDefaultAllocator, NULL, sizeof(int), ngroups); for(int i=0;i