diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1999-12-23 14:34:07 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1999-12-23 14:34:07 (GMT) |
commit | 6a6db0724cfa6f6d7126672be68551e49f52f063 (patch) | |
tree | d89295c935419d0dc5e9bb24ab747fceb0bc433f /Mac/scripts | |
parent | d2bf68fdb99309ff5b385b424a8791281573ca2e (diff) | |
download | cpython-6a6db0724cfa6f6d7126672be68551e49f52f063.zip cpython-6a6db0724cfa6f6d7126672be68551e49f52f063.tar.gz cpython-6a6db0724cfa6f6d7126672be68551e49f52f063.tar.bz2 |
Partially converted to Appearance, the dialog still has the old ugly layout and
interaction.
Diffstat (limited to 'Mac/scripts')
-rw-r--r-- | Mac/scripts/EditPythonPrefs.py | 32 | ||||
-rw-r--r-- | Mac/scripts/EditPythonPrefs.rsrc | bin | 7925 -> 8553 bytes |
2 files changed, 17 insertions, 15 deletions
diff --git a/Mac/scripts/EditPythonPrefs.py b/Mac/scripts/EditPythonPrefs.py index b882bde..e8177c6 100644 --- a/Mac/scripts/EditPythonPrefs.py +++ b/Mac/scripts/EditPythonPrefs.py @@ -6,6 +6,7 @@ from Dlg import * from Events import * from Res import * +import Controls import string import struct import macfs @@ -64,24 +65,24 @@ OD_HELP_ITEM = 22 def optinteract(options): """Let the user interact with the options dialog""" d = GetNewDialog(OPT_DIALOG_ID, -1) - tp, h, rect = d.GetDialogItem(OD_CREATOR_ITEM) - SetDialogItemText(h, options['creator']) - tp, h, rect = d.GetDialogItem(OD_TYPE_ITEM) - SetDialogItemText(h, options['type']) + htext = d.GetDialogItemAsControl(OD_CREATOR_ITEM) + SetDialogItemText(htext, options['creator']) + htext = d.GetDialogItemAsControl(OD_TYPE_ITEM) + SetDialogItemText(htext, options['type']) d.SetDialogDefaultItem(OD_OK_ITEM) d.SetDialogCancelItem(OD_CANCEL_ITEM) while 1: for name in opt_dialog_dict.keys(): num = opt_dialog_dict[name] - tp, h, rect = d.GetDialogItem(num) - h.as_Control().SetControlValue(options[name]) + ctl = d.GetDialogItemAsControl(num) + ctl.SetControlValue(options[name]) n = ModalDialog(None) if n == OD_OK_ITEM: - tp, h, rect = d.GetDialogItem(OD_CREATOR_ITEM) - ncreator = GetDialogItemText(h) - tp, h, rect = d.GetDialogItem(OD_TYPE_ITEM) - ntype = GetDialogItemText(h) + htext = d.GetDialogItemAsControl(OD_CREATOR_ITEM) + ncreator = GetDialogItemText(htext) + htext = d.GetDialogItemAsControl(OD_TYPE_ITEM) + ntype = GetDialogItemText(htext) if len(ncreator) == 4 and len(ntype) == 4: options['creator'] = ncreator options['type'] = ntype @@ -107,11 +108,12 @@ def interact(options, title): except os.error: pass d = GetNewDialog(DIALOG_ID, -1) - tp, h, rect = d.GetDialogItem(TITLE_ITEM) - SetDialogItemText(h, title) - tp, h, rect = d.GetDialogItem(TEXT_ITEM) -## SetDialogItemText(h, string.joinfields(list, '\r')) - h.data = string.joinfields(options['path'], '\r') + htext = d.GetDialogItemAsControl(TITLE_ITEM) + SetDialogItemText(htext, title) + ctl = d.GetDialogItemAsControl(TEXT_ITEM) + data = string.joinfields(options['path'], '\r') + ctl.SetControlData(Controls.kControlEditTextPart, Controls.kControlEditTextTextTag, data) + d.SelectDialogItemText(TEXT_ITEM, 0, 32767) d.SelectDialogItemText(TEXT_ITEM, 0, 0) ## d.SetDialogDefaultItem(OK_ITEM) diff --git a/Mac/scripts/EditPythonPrefs.rsrc b/Mac/scripts/EditPythonPrefs.rsrc Binary files differindex 4644c5a..e8452c4 100644 --- a/Mac/scripts/EditPythonPrefs.rsrc +++ b/Mac/scripts/EditPythonPrefs.rsrc |