mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Trying again to check it in. Changes to:
- Use Universal Headers as input - Change addpack calls to not depend on Guido's disklayout - Checkge testprograms to use new names for some functions
This commit is contained in:
parent
ae8a68f40c
commit
b81cf9d61c
31 changed files with 1231 additions and 599 deletions
|
@ -2,12 +2,19 @@
|
|||
|
||||
import os
|
||||
from Menu import *
|
||||
|
||||
# Since we can't (yet) list the mounted volumes, here's a list of some:
|
||||
my_volumes = ['C:', 'D:', 'E:', 'F:']
|
||||
import macfs
|
||||
import sys
|
||||
|
||||
def main():
|
||||
global oldbar
|
||||
my_volumes = []
|
||||
while 1:
|
||||
fss, ok = macfs.GetDirectory()
|
||||
if not ok:
|
||||
break
|
||||
my_volumes.append(fss.as_pathname())
|
||||
if not my_volumes:
|
||||
return
|
||||
oldbar = GetMenuBar()
|
||||
ClearMenuBar()
|
||||
makevolmenus(my_volumes)
|
||||
|
@ -40,10 +47,10 @@ def adddirectory(menu, dir, maxdepth = 1):
|
|||
for file in files:
|
||||
item = item+1
|
||||
menu.AppendMenu('x') # add a dummy string
|
||||
menu.SetItem(item, file) # set the actual text
|
||||
menu.SetMenuItemText(item, file) # set the actual text
|
||||
fullname = os.path.join(dir, file)
|
||||
if os.path.isdir(fullname):
|
||||
menu.SetItem(item, ':' + file + ':') # append colons
|
||||
menu.SetMenuItemText(item, ':' + file + ':') # append colons
|
||||
if maxdepth > 0:
|
||||
id = nextid()
|
||||
submenu = NewMenu(id, fullname)
|
||||
|
@ -58,3 +65,4 @@ def adddirectory(menu, dir, maxdepth = 1):
|
|||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
sys.exit(1) # To allow the user to interact...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue