summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-09-15 22:12:00 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-09-15 22:12:00 (GMT)
commitdf34cf120619ac394bce7f66b270f14af14a41b2 (patch)
tree44d38502aaa96c49af089163e098829331c7b5ae /Mac/Modules
parent0bdf979af726cafc4d3b473115f85ce3cf52a32f (diff)
downloadcpython-df34cf120619ac394bce7f66b270f14af14a41b2.zip
cpython-df34cf120619ac394bce7f66b270f14af14a41b2.tar.gz
cpython-df34cf120619ac394bce7f66b270f14af14a41b2.tar.bz2
Fixed macos.splash to actually *draw* the splash box:-)
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/macosmodule.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c
index 4780f1b..0220eed 100644
--- a/Mac/Modules/macosmodule.c
+++ b/Mac/Modules/macosmodule.c
@@ -500,15 +500,19 @@ static char splash_doc[] = "Open a splash-screen dialog by resource-id (0=close)
static PyObject *
MacOS_splash(PyObject *self, PyObject *args)
{
- int resid;
+ int resid = -1;
static DialogPtr curdialog;
- if (!PyArg_ParseTuple(args, "i", &resid))
+ if (!PyArg_ParseTuple(args, "|i", &resid))
return NULL;
if (curdialog)
DisposeDialog(curdialog);
- curdialog = GetNewDialog(resid, NULL, (WindowPtr)-1);
+ if ( resid != -1 ) {
+ curdialog = GetNewDialog(resid, NULL, (WindowPtr)-1);
+ if ( curdialog )
+ DrawDialog(curdialog);
+ }
Py_INCREF(Py_None);
return Py_None;
}