diff --git a/TODO.md b/TODO.md index 5be78237..69cc55e5 100644 --- a/TODO.md +++ b/TODO.md @@ -23,3 +23,4 @@ ultimately: - add some sort of runtime type checking +- MAYBE readd lifetime blocking diff --git a/darwin/window.m b/darwin/window.m index 81a454b0..459ffd2a 100644 --- a/darwin/window.m +++ b/darwin/window.m @@ -171,7 +171,6 @@ static void windowSetMargined(uiWindow *ww, int margined) binSetMargins(w->bin, 0, 0, 0, 0); } -// TODO destruction blocking uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) { struct window *w; diff --git a/mergeback/lifetimes_unix.c b/mergeback/lifetimes_unix.c deleted file mode 100644 index 907724fb..00000000 --- a/mergeback/lifetimes_unix.c +++ /dev/null @@ -1,17 +0,0 @@ -// 19 april 2015 -#include "uipriv_unix.h" - -static void destroyBlocker(GtkWidget *widget, gpointer data) -{ - complain("trying to destroy object at %p before destroy function called", data); -} - -gulong blockDestruction(GtkWidget *widget, void *object) -{ - return g_signal_connect(widget, "destroy", G_CALLBACK(destroyBlocker), object); -} - -void readyToDestroy(GtkWidget *widget, gulong block) -{ - g_signal_handler_disconnect(widget, block); -} diff --git a/uipriv.h b/uipriv.h index 3cec770c..3e560cd8 100644 --- a/uipriv.h +++ b/uipriv.h @@ -14,6 +14,3 @@ extern uiContainer *newBin(void); extern void binSetMainControl(uiContainer *, uiControl *); extern void binSetMargins(uiContainer *, intmax_t, intmax_t, intmax_t, intmax_t); extern void binSetParent(uiContainer *, uintptr_t); - -// lifetimes.c -extern void properlyDestroyControl(uiControl *); diff --git a/unix/container.c b/unix/container.c index 074730d2..6f4a500d 100644 --- a/unix/container.c +++ b/unix/container.c @@ -33,7 +33,6 @@ static void containerWidget_init(containerWidget *c) gtk_widget_set_has_window(GTK_WIDGET(c), FALSE); } -// TODO destroy blocking static void containerWidget_dispose(GObject *obj) { G_OBJECT_CLASS(containerWidget_parent_class)->dispose(obj); diff --git a/unix/newcontrol.c b/unix/newcontrol.c index 7fb58619..82497be3 100644 --- a/unix/newcontrol.c +++ b/unix/newcontrol.c @@ -16,8 +16,6 @@ struct singleWidget { void *onDestroyData; }; -// TODO destruction blockers - static void singleDestroy(uiControl *c) { singleWidget *s = (singleWidget *) (c->Internal); diff --git a/unix/window.c b/unix/window.c index f3d30b85..e6874269 100644 --- a/unix/window.c +++ b/unix/window.c @@ -163,7 +163,6 @@ static void windowSetMargined(uiWindow *ww, int margined) binSetMargins(w->bin, 0, 0, 0, 0); } -// TODO destruction blocking uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) { struct window *w; diff --git a/windows/newcontrol.c b/windows/newcontrol.c index 8e69c238..9dc41e68 100644 --- a/windows/newcontrol.c +++ b/windows/newcontrol.c @@ -13,7 +13,6 @@ struct singleHWND { int hidden; }; -// TODO destruction blocking static void singleDestroy(uiControl *c) { singleHWND *s = (singleHWND *) (c->Internal); @@ -148,7 +147,7 @@ void uiWindowsNewControl(uiControl *c, uiWindowsNewControlParams *p) if (p->useStandardControlFont) SendMessageW(s->hwnd, WM_SETFONT, (WPARAM) hMessageFont, (LPARAM) TRUE); - // this handles both blocking control destruction and redirected notification messages + // this handles redirected notification messages if ((*fv_SetWindowSubclass)(s->hwnd, singleSubclassProc, 0, (DWORD_PTR) c) == FALSE) logLastError("error subclassing Windows control in uiWindowsNewControl()"); diff --git a/windows/window.c b/windows/window.c index 3de6fdd6..13254f76 100644 --- a/windows/window.c +++ b/windows/window.c @@ -220,7 +220,6 @@ static void windowSetMargined(uiWindow *ww, int margined) binSetMargins(w->bin, 0, 0, 0, 0); } -// TODO destruction blocking uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) { struct window *w;