]> granicus.if.org Git - python/commitdiff
PyMac_PromptGetFile and PyMac_GetDirectory don't exist in carbonpython.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 14 Jul 2000 22:15:24 +0000 (22:15 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 14 Jul 2000 22:15:24 +0000 (22:15 +0000)
Mac/Include/macglue.h
Mac/Python/macglue.c

index 6785dff3ff0f875b1f91869441e2697b2d70c870..a0410cc7d46826d6a4e0d746d691ea159a045813 100644 (file)
@@ -92,9 +92,11 @@ int PyMac_FindCodeResourceModule(PyStringObject *, char *, char *); /* Test for
 PyObject * PyMac_LoadCodeResourceModule(char *, char *); /* Load 'PYD ' resource from file */
 struct filedescr *PyMac_FindModuleExtension(char *, size_t *, char *); /* Look for module in single folder */
 
+#ifndef TARGET_API_MAC_CARBON
 int PyMac_GetDirectory(FSSpec *dirfss, char *prompt);          /* Ask user for a directory */
 void PyMac_PromptGetFile(short numTypes, ConstSFTypeListPtr typeList, 
        StandardFileReply *reply, char *prompt);        /* Ask user for file, with prompt */
+#endif /* TARGET_API_MAC_CARBON */
 
 int PyMac_GetOSType(PyObject *, OSType *);     /* argument parser for OSType */
 PyObject *PyMac_BuildOSType(OSType);           /* Convert OSType to PyObject */
index 607f4bbfcfe7259e4d3f233b42bf5c12bc18498e..d7eb9ec5673da67cead9ced32935363b6bc1230e 100644 (file)
@@ -754,7 +754,7 @@ myhook_proc(short item, DialogPtr theDialog, struct hook_args *dataptr)
        }
        return item;
 }      
-
+#ifndef TARGET_API_MAC_CARBON
 /*
 ** Ask the user for a directory. I still can't understand
 ** why Apple doesn't provide a standard solution for this...
@@ -769,12 +769,10 @@ PyMac_GetDirectory(dirfss, prompt)
        StandardFileReply reply;
        struct hook_args hook_args;
        
-#ifndef TARGET_API_MAC_CARBON
        if ( !upp_inited ) {
                myhook_upp = NewDlgHookYDProc(myhook_proc);
                upp_inited = 1;
        }
-#endif
        if ( prompt && *prompt )
                hook_args.prompt = (char *)Pstring(prompt);
        else
@@ -797,12 +795,10 @@ void PyMac_PromptGetFile(short numTypes, ConstSFTypeListPtr typeList,
        static Point where = {-1, -1};
        struct hook_args hook_args;
        
-#ifndef TARGET_API_MAC_CARBON
        if ( !upp_inited ) {
                myhook_upp = NewDlgHookYDProc(myhook_proc);
                upp_inited = 1;
        }
-#endif
        if ( prompt && *prompt )
                hook_args.prompt = (char *)Pstring(prompt);
        else
@@ -811,6 +807,7 @@ void PyMac_PromptGetFile(short numTypes, ConstSFTypeListPtr typeList,
        CustomGetFile((FileFilterYDUPP)0, numTypes, typeList, reply, GETFILEPROMPT_ID, where,
                                myhook_upp, NULL, NULL, NULL, (void *)&hook_args);
 }
+#endif /* TARGET_API_MAC_CARBON */
 
 /* Convert a 4-char string object argument to an OSType value */
 int