ui/common/types.c

changeset 1198
5bb4366b0c32
parent 1174
8b8da1adef7d
child 1199
13b18989113c
--- a/ui/common/types.c	Sun Jun 14 10:52:28 2026 +0200
+++ b/ui/common/types.c	Sun Jun 14 11:07:38 2026 +0200
@@ -438,6 +438,9 @@
 }
 
 static void text_destroy(UiText *t) {
+    if(t->value.free) {
+        t->value.free(t->value.ptr);
+    }
     if(t->destroy) {
         t->destroy(t);
     }
@@ -1081,3 +1084,11 @@
         text->remove(text, begin, end);
     }
 }
+
+void  ui_text_setreadonly(UiText *text, int readonly) {
+    if(text->setreadonly) {
+        text->setreadonly(text, readonly);
+    } else {
+        text->readonly = readonly;
+    }
+}

mercurial