diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-06-02 21:35:07 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-06-02 21:35:07 (GMT) |
commit | e79dc76f53dfa18fb08c35f71b049259642c0142 (patch) | |
tree | 2d9cc6228cc713336a01d9ff09571eacff3a2ba0 /Mac/Modules/dlg/dlgsupport.py | |
parent | 33d1ad28cba273b94c70ffc22deb6c53b0c1b068 (diff) | |
download | cpython-e79dc76f53dfa18fb08c35f71b049259642c0142.zip cpython-e79dc76f53dfa18fb08c35f71b049259642c0142.tar.gz cpython-e79dc76f53dfa18fb08c35f71b049259642c0142.tar.bz2 |
Made the core toolbox modules carbon-compatible using the new greylist feature of bgen: non-carbon methods are still included in non-carbon MacPython. The issue of backward compatibility of Python code is still open.
Macmodule and macosmodule have also been carbonified. Some functionality is still missing there.
Diffstat (limited to 'Mac/Modules/dlg/dlgsupport.py')
-rw-r--r-- | Mac/Modules/dlg/dlgsupport.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py index 4c44722..78b6be2 100644 --- a/Mac/Modules/dlg/dlgsupport.py +++ b/Mac/Modules/dlg/dlgsupport.py @@ -129,7 +129,7 @@ class MyObjectDefinition(GlobalObjectDefinition): self.basechain = "&WinObj_chain" def outputInitStructMembers(self): GlobalObjectDefinition.outputInitStructMembers(self) - Output("SetWRefCon(itself, (long)it);") + Output("SetWRefCon(GetDialogWindow(itself), (long)it);") def outputCheckNewArg(self): Output("if (itself == NULL) return Py_None;") def outputCheckConvertArg(self): @@ -160,7 +160,7 @@ for f in methods: object.add(f) # Some methods that are currently macro's in C, but will be real routines # in MacOS 8. -f = Method(ExistingDialogPtr, 'GetDialogWindow', (DialogRef, 'dialog', InMode)) +f = Method(WindowPtr, 'GetDialogWindow', (DialogRef, 'dialog', InMode)) object.add(f) f = Method(SInt16, 'GetDialogDefaultItem', (DialogRef, 'dialog', InMode)) object.add(f) @@ -168,7 +168,8 @@ f = Method(SInt16, 'GetDialogCancelItem', (DialogRef, 'dialog', InMode)) object.add(f) f = Method(SInt16, 'GetDialogKeyboardFocusItem', (DialogRef, 'dialog', InMode)) object.add(f) -f = Method(void, 'SetGrafPortOfDialog', (DialogRef, 'dialog', InMode)) +f = Method(void, 'SetGrafPortOfDialog', (DialogRef, 'dialog', InMode), + condition='#ifndef TARGET_API_MAC_CARBON') object.add(f) setuseritembody = """ |