mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Fixed the first two bugs in the new file dialogs (found by Just):
- AskFileForSave didn't work for string return values - filterProc didn't work.
This commit is contained in:
parent
b2a57722a8
commit
e58962af4d
2 changed files with 13 additions and 11 deletions
|
@ -30,6 +30,7 @@ from Carbon.ControlAccessor import * # Also import Controls constants
|
|||
import Carbon.File
|
||||
import macfs
|
||||
import macresource
|
||||
import os
|
||||
|
||||
_initialized = 0
|
||||
|
||||
|
@ -660,7 +661,7 @@ def AskFileForSave(**args):
|
|||
# This is gross, and probably incorrect too
|
||||
vrefnum, dirid, name = rr.selection[0].as_tuple()
|
||||
pardir_fss = Carbon.File.FSSpec((vrefnum, dirid, ''))
|
||||
pardir_fsr = Carbon.File.FSRef(fss)
|
||||
pardir_fsr = Carbon.File.FSRef(pardir_fss)
|
||||
pardir_path = pardir_fsr.FSRefMakePath() # This is utf-8
|
||||
name_utf8 = unicode(name, 'macroman').encode('utf8')
|
||||
fullpath = os.path.join(pardir_path, name_utf8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue