Mercurial > cpython-lru_cache-weakref
comparison Mac/scripts/EditPythonPrefs.py @ 2979:7eea9b426802 legacy-trunk
Added prompts to various file-select dialogs
Renumbered resources to above 512
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Mon, 14 Aug 1995 12:21:12 +0000 |
| parents | 315760ba0041 |
| children | 022474ac2451 |
comparison
equal
deleted
inserted
replaced
| 2978:7a67dbcb6d83 | 2979:7eea9b426802 |
|---|---|
| 16 import Res # For Res.Error | 16 import Res # For Res.Error |
| 17 | 17 |
| 18 # resource IDs in our own resources (dialogs, etc) | 18 # resource IDs in our own resources (dialogs, etc) |
| 19 MESSAGE_ID = 256 | 19 MESSAGE_ID = 256 |
| 20 | 20 |
| 21 DIALOG_ID = 131 | 21 DIALOG_ID = 512 |
| 22 TEXT_ITEM = 1 | 22 TEXT_ITEM = 1 |
| 23 OK_ITEM = 2 | 23 OK_ITEM = 2 |
| 24 CANCEL_ITEM = 3 | 24 CANCEL_ITEM = 3 |
| 25 REVERT_ITEM = 4 | 25 REVERT_ITEM = 4 |
| 26 DIR_ITEM = 5 | 26 DIR_ITEM = 5 |
| 83 if n == CANCEL_ITEM: | 83 if n == CANCEL_ITEM: |
| 84 return None | 84 return None |
| 85 if n == REVERT_ITEM: | 85 if n == REVERT_ITEM: |
| 86 return [], pythondir | 86 return [], pythondir |
| 87 if n == DIR_ITEM: | 87 if n == DIR_ITEM: |
| 88 fss, ok = macfs.GetDirectory() | 88 fss, ok = macfs.GetDirectory('Select python home folder:') |
| 89 if ok: | 89 if ok: |
| 90 pythondir = fss | 90 pythondir = fss |
| 91 tmp = string.splitfields(GetDialogItemText(h), '\r') | 91 tmp = string.splitfields(GetDialogItemText(h), '\r') |
| 92 rv = [] | 92 rv = [] |
| 93 for i in tmp: | 93 for i in tmp: |
