]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed macos.splash to actually *draw* the splash box:-)
authorJack Jansen <jack.jansen@cwi.nl>
Sun, 15 Sep 1996 22:12:00 +0000 (22:12 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sun, 15 Sep 1996 22:12:00 +0000 (22:12 +0000)
Mac/Modules/macosmodule.c

index 4780f1b217b0bf0d96d67631450e34a7e10e40a1..0220eed73467cd468c2d1ccf5bc0acb6e9f8c686 100644 (file)
@@ -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;
 }