From 7902b630c527329a169c5081d6ec9247cc238dc2 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 16 Feb 2003 13:44:18 +0000 Subject: [PATCH] Make it possible to close the "about" and "licence" boxes again. git-svn-id: svn://svn.tartarus.org/sgt/putty@2856 cda61777-01e9-0310-a592-d414129be87e --- mac/macabout.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/mac/macabout.c b/mac/macabout.c index f1fc7ff2..af92b550 100644 --- a/mac/macabout.c +++ b/mac/macabout.c @@ -1,4 +1,4 @@ -/* $Id: macabout.c,v 1.1 2003/02/15 16:22:15 ben Exp $ */ +/* $Id: macabout.c,v 1.2 2003/02/16 13:44:18 ben Exp $ */ /* * Copyright (c) 1999, 2002, 2003 Ben Harris * All rights reserved. @@ -94,6 +94,13 @@ static void mac_updateabout(WindowPtr window) EndUpdate(window); } +static void mac_closeabout(WindowPtr window) +{ + + windows.about = NULL; + DisposeDialog(GetDialogFromWindow(window)); +} + static void mac_updatelicence(WindowPtr window) { Handle h; @@ -121,6 +128,13 @@ static void mac_updatelicence(WindowPtr window) EndUpdate(window); } +static void mac_closelicence(WindowPtr window) +{ + + windows.licence = NULL; + DisposeWindow(window); +} + void mac_openabout(void) { DialogItemType itemtype; @@ -141,6 +155,7 @@ void mac_openabout(void) wi->update = &mac_updateabout; wi->click = &mac_clickabout; wi->activate = &mac_activateabout; + wi->close = &mac_closeabout; SetWRefCon(windows.about, (long)wi); vers = (VersRecHndl)Get1Resource('vers', 1); if (vers != NULL && *vers != NULL) { @@ -166,6 +181,7 @@ static void mac_openlicence(void) memset(wi, 0, sizeof(*wi)); wi->wtype = wLicence; wi->update = &mac_updatelicence; + wi->close = &mac_closelicence; SetWRefCon(windows.licence, (long)wi); ShowWindow(windows.licence); } -- 2.11.0