ui/common/context.c

changeset 18
06be29a56f8b
parent 3
c1a75454b444
child 20
2dda1ad6dc7a
equal deleted inserted replaced
17:db95c0104937 18:06be29a56f8b
39 UiContext *ctx = ucx_mempool_malloc(mp, sizeof(UiContext)); 39 UiContext *ctx = ucx_mempool_malloc(mp, sizeof(UiContext));
40 ctx->mempool = mp; 40 ctx->mempool = mp;
41 41
42 ctx->toplevel = toplevel; 42 ctx->toplevel = toplevel;
43 ctx->vars = ucx_map_new_a(mp->allocator, 16); 43 ctx->vars = ucx_map_new_a(mp->allocator, 16);
44
45 #ifdef UI_GTK
46 ctx->accel_group = gtk_accel_group_new();
47 gtk_window_add_accel_group(GTK_WINDOW(toplevel->widget), ctx->accel_group);
48 #endif
44 49
45 return ctx; 50 return ctx;
46 } 51 }
47 52
48 UiVar* uic_getvar(UiContext *ctx, char *name) { 53 UiVar* uic_getvar(UiContext *ctx, char *name) {

mercurial