X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/93ba25f871b6495d1049e920448a056c8424fee7..ee10bc568f6fda7e253621d78c3b267a660dd52b:/mac/macdlg.c?ds=inline diff --git a/mac/macdlg.c b/mac/macdlg.c index b5272dbd..8f47788b 100644 --- a/mac/macdlg.c +++ b/mac/macdlg.c @@ -1,4 +1,4 @@ -/* $Id: macdlg.c,v 1.14 2003/03/17 22:38:18 ben Exp $ */ +/* $Id: macdlg.c,v 1.15 2003/03/21 00:24:17 ben Exp $ */ /* * Copyright (c) 2002 Ben Harris * All rights reserved. @@ -46,10 +46,6 @@ #include "macresid.h" #include "storage.h" -static void mac_clickdlg(WindowPtr, EventRecord *); -static void mac_activatedlg(WindowPtr, EventRecord *); -static void mac_updatedlg(WindowPtr); -static void mac_adjustdlgmenus(WindowPtr); static void mac_closedlg(WindowPtr); void mac_newsession(void) @@ -84,11 +80,22 @@ void mac_newsession(void) wi->click = &macctrl_click; wi->activate = &macctrl_activate; wi->adjustmenus = &macctrl_adjustmenus; - wi->close = &macctrl_close; + wi->close = &mac_closedlg; SetWRefCon(s->settings_window, (long)wi); ShowWindow(s->settings_window); } +static void mac_closedlg(WindowPtr window) +{ + Session *s = mac_windowsession(window); + + macctrl_close(window); + DisposeWindow(window); + if (s->window == NULL) + sfree(s); +} + + void mac_dupsession(void) { Session *s1 = mac_windowsession(FrontWindow());