Fri, 16 Feb 2024 18:33:34 +0100
fix add_menuitem_widget passing wrong list type to uic_add_group_widget
ui/gtk/menu.c | file | annotate | diff | comparison | revisions | |
ui/gtk/toolkit.c | file | annotate | diff | comparison | revisions |
--- a/ui/gtk/menu.c Thu Feb 15 21:33:08 2024 +0100 +++ b/ui/gtk/menu.c Fri Feb 16 18:33:34 2024 +0100 @@ -121,7 +121,10 @@ gtk_menu_shell_append(GTK_MENU_SHELL(parent), widget); if(i->groups) { - uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, i->groups); + CxList *groups = cxArrayListCreateSimple(sizeof(int), i->ngroups); + cxListAddArray(groups, i->groups, i->ngroups); + uic_add_group_widget(obj->ctx, widget, (ui_enablefunc)ui_set_enabled, groups); + cxListDestroy(groups); } }
--- a/ui/gtk/toolkit.c Thu Feb 15 21:33:08 2024 +0100 +++ b/ui/gtk/toolkit.c Fri Feb 16 18:33:34 2024 +0100 @@ -37,6 +37,8 @@ #include "image.h" #include "../common/document.h" #include "../common/properties.h" +#include "../common/menu.h" +#include "../common/toolbar.h" #include <cx/utils.h> #include <cx/string.h>