jcs
/subtext
/amendments
/76
settings: Fix focusable call, don't dispose of controls manually
jcs made amendment 76 over 2 years ago
--- settings.c Thu Jan 27 16:00:22 2022
+++ settings.c Fri Feb 18 11:27:52 2022
@@ -266,7 +266,7 @@ view_editor_show(size_t id, char *title)
focusable->mouse_down = view_editor_mouse_down;
focusable->update = view_editor_update;
focusable->close = view_editor_close;
- show_focusable(focusable);
+ add_focusable(focusable);
UpdateScrollbarForTE(view_editor->vert_scroller, view_editor->te,
false);
@@ -402,12 +402,10 @@ view_editor_close(struct focusable *focusable, EventRe
{
struct view_editor *view_editor =
(struct view_editor *)focusable->cookie;
-
+
+ TEDispose(view_editor->te);
close_focusable(focusable);
DisposeWindow(view_editor->win);
- TEDispose(view_editor->te);
- DisposHandle(view_editor->vert_scroller);
- DisposHandle(view_editor->horiz_scroller);
free(focusable);
free(view_editor);
}