remove unnecessary UiContext attach/detach fptrs

Thu, 04 Jun 2026 19:21:28 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 04 Jun 2026 19:21:28 +0200
changeset 1166
01653cc7256b
parent 1165
aca0b56e92d2
child 1167
f0e901f7d1b7

remove unnecessary UiContext attach/detach fptrs

ui/common/context.c file | annotate | diff | comparison | revisions
ui/common/context.h file | annotate | diff | comparison | revisions
--- a/ui/common/context.c	Thu Jun 04 19:20:04 2026 +0200
+++ b/ui/common/context.c	Thu Jun 04 19:21:28 2026 +0200
@@ -71,9 +71,6 @@
     ctx->actions = cxHashMapCreate(ctx->allocator, sizeof(UiAction), 8);
     ctx->action_bindings = cxArrayListCreate(ctx->allocator, sizeof(UiActionBinding), 0);
     
-    ctx->attach_document = uic_context_attach_document;
-    ctx->detach_document2 = uic_context_detach_document;
-    
 #if UI_GTK2 || UI_GTK3
     if(toplevel && toplevel->widget) {
         ctx->accel_group = gtk_accel_group_new();
@@ -245,7 +242,7 @@
     // detach documents
     i = cxListIterator(ls);
     cx_foreach(void *, doc, i) {
-        ctx->detach_document2(ctx, doc);
+        uic_context_detach_document(ctx, doc);
     }
     
     cxListFree(ls);
--- a/ui/common/context.h	Thu Jun 04 19:20:04 2026 +0200
+++ b/ui/common/context.h	Thu Jun 04 19:21:28 2026 +0200
@@ -80,9 +80,6 @@
     CxMap         *actions; // key: action name (string), value: UiAction
     CxList        *action_bindings; // UiActionBinding list
     
-    void (*attach_document)(UiContext *ctx, void *document);
-    void (*detach_document2)(UiContext *ctx, void *document); 
-    
     char          *title;
     
 #ifdef UI_GTK

mercurial