From 40006e9f7a38bbbcf564c541cb0f2022b952e409 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 1 May 2003 22:06:15 +0000 Subject: Rename funny long suite to Disk_File_Folder. --- .../lib-scriptpackages/CodeWarrior/__init__.py | 36 +-- Lib/plat-mac/lib-scriptpackages/Finder/__init__.py | 68 ++--- .../lib-scriptpackages/Netscape/__init__.py | 8 +- .../lib-scriptpackages/StdSuites/__init__.py | 44 +-- .../SystemEvents/Disk_2d_Folder_2d_File_Suite.py | 335 --------------------- .../SystemEvents/Disk_Folder_File_Suite.py | 335 +++++++++++++++++++++ .../SystemEvents/System_Events_Suite.py | 12 +- .../lib-scriptpackages/SystemEvents/__init__.py | 34 +-- Mac/scripts/genallsuites.py | 3 +- 9 files changed, 438 insertions(+), 437 deletions(-) delete mode 100644 Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_2d_Folder_2d_File_Suite.py create mode 100644 Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py diff --git a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py index 84c817d..c67e92f 100644 --- a/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py +++ b/Lib/plat-mac/lib-scriptpackages/CodeWarrior/__init__.py @@ -47,6 +47,15 @@ import StdSuites # # Set property and element dictionaries now that all classes have been defined # +getbaseclasses(character) +getbaseclasses(text) +getbaseclasses(window) +getbaseclasses(file) +getbaseclasses(line) +getbaseclasses(selection_2d_object) +getbaseclasses(application) +getbaseclasses(insertion_point) +getbaseclasses(document) getbaseclasses(single_class_browser) getbaseclasses(project_document) getbaseclasses(symbol_browser) @@ -100,20 +109,20 @@ getbaseclasses(Font) getbaseclasses(Target_Source_Trees) getbaseclasses(Debugger_Display) getbaseclasses(class_) -getbaseclasses(character) -getbaseclasses(text) -getbaseclasses(window) -getbaseclasses(file) -getbaseclasses(line) -getbaseclasses(selection_2d_object) -getbaseclasses(application) -getbaseclasses(insertion_point) -getbaseclasses(document) # # Indices of types declared in this module # _classdeclarations = { + 'cha ' : character, + 'ctxt' : text, + 'cwin' : window, + 'file' : file, + 'clin' : line, + 'csel' : selection_2d_object, + 'capp' : application, + 'cins' : insertion_point, + 'docu' : document, '1BRW' : single_class_browser, 'PRJD' : project_document, 'SYMB' : symbol_browser, @@ -167,15 +176,6 @@ _classdeclarations = { 'TSTs' : Target_Source_Trees, 'DbDS' : Debugger_Display, 'Clas' : class_, - 'cha ' : character, - 'ctxt' : text, - 'cwin' : window, - 'file' : file, - 'clin' : line, - 'csel' : selection_2d_object, - 'capp' : application, - 'cins' : insertion_point, - 'docu' : document, } diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py b/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py index 30cf57a..1be70ba 100644 --- a/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py +++ b/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py @@ -67,17 +67,6 @@ import StdSuites # # Set property and element dictionaries now that all classes have been defined # -getbaseclasses(process) -getbaseclasses(application_process) -getbaseclasses(desk_accessory_process) -getbaseclasses(application) -getbaseclasses(package) -getbaseclasses(file) -getbaseclasses(application_file) -getbaseclasses(alias_file) -getbaseclasses(internet_location_file) -getbaseclasses(document_file) -getbaseclasses(clipping) getbaseclasses(icon_view_options) getbaseclasses(label) getbaseclasses(column) @@ -85,18 +74,29 @@ getbaseclasses(preferences) getbaseclasses(alias_list) getbaseclasses(icon_family) getbaseclasses(list_view_options) -getbaseclasses(application) getbaseclasses(item) -getbaseclasses(trash_2d_object) -getbaseclasses(desktop_2d_object) -getbaseclasses(container) -getbaseclasses(folder) -getbaseclasses(disk) +getbaseclasses(package) +getbaseclasses(file) +getbaseclasses(application_file) +getbaseclasses(alias_file) +getbaseclasses(internet_location_file) +getbaseclasses(document_file) +getbaseclasses(clipping) getbaseclasses(preferences_window) getbaseclasses(Finder_window) getbaseclasses(window) getbaseclasses(clipping_window) getbaseclasses(information_window) +getbaseclasses(application) +getbaseclasses(process) +getbaseclasses(application_process) +getbaseclasses(desk_accessory_process) +getbaseclasses(application) +getbaseclasses(trash_2d_object) +getbaseclasses(desktop_2d_object) +getbaseclasses(container) +getbaseclasses(folder) +getbaseclasses(disk) getbaseclasses(StdSuites.Type_Names_Suite.double_integer) getbaseclasses(StdSuites.Type_Names_Suite.version) getbaseclasses(StdSuites.Type_Names_Suite.RGB16_color) @@ -142,17 +142,6 @@ getbaseclasses(StdSuites.Type_Names_Suite.bounding_rectangle) # Indices of types declared in this module # _classdeclarations = { - 'prcs' : process, - 'pcap' : application_process, - 'pcda' : desk_accessory_process, - 'capp' : application, - 'pack' : package, - 'file' : file, - 'appf' : application_file, - 'alia' : alias_file, - 'inlf' : internet_location_file, - 'docf' : document_file, - 'clpf' : clipping, 'icop' : icon_view_options, 'clbl' : label, 'lvcl' : column, @@ -160,18 +149,29 @@ _classdeclarations = { 'alst' : alias_list, 'ifam' : icon_family, 'lvop' : list_view_options, - 'capp' : application, 'cobj' : item, - 'ctrs' : trash_2d_object, - 'cdsk' : desktop_2d_object, - 'ctnr' : container, - 'cfol' : folder, - 'cdis' : disk, + 'pack' : package, + 'file' : file, + 'appf' : application_file, + 'alia' : alias_file, + 'inlf' : internet_location_file, + 'docf' : document_file, + 'clpf' : clipping, 'pwnd' : preferences_window, 'brow' : Finder_window, 'cwin' : window, 'lwnd' : clipping_window, 'iwnd' : information_window, + 'capp' : application, + 'prcs' : process, + 'pcap' : application_process, + 'pcda' : desk_accessory_process, + 'capp' : application, + 'ctrs' : trash_2d_object, + 'cdsk' : desktop_2d_object, + 'ctnr' : container, + 'cfol' : folder, + 'cdis' : disk, 'comp' : StdSuites.Type_Names_Suite.double_integer, 'vers' : StdSuites.Type_Names_Suite.version, 'tr16' : StdSuites.Type_Names_Suite.RGB16_color, diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py b/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py index 4ab5de6..937c79f 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py @@ -61,8 +61,6 @@ import StdSuites # getbaseclasses(window) getbaseclasses(application) -getbaseclasses(text) -getbaseclasses(styleset) getbaseclasses(StdSuites.Text_Suite.text_flow) getbaseclasses(StdSuites.Text_Suite.character) getbaseclasses(StdSuites.Text_Suite.text_style_info) @@ -70,6 +68,8 @@ getbaseclasses(StdSuites.Text_Suite.line) getbaseclasses(StdSuites.Text_Suite.word) getbaseclasses(StdSuites.Text_Suite.paragraph) getbaseclasses(StdSuites.Text_Suite.text) +getbaseclasses(text) +getbaseclasses(styleset) # # Indices of types declared in this module @@ -77,8 +77,6 @@ getbaseclasses(StdSuites.Text_Suite.text) _classdeclarations = { 'cwin' : window, 'capp' : application, - 'ctxt' : text, - 'stys' : styleset, 'cflo' : StdSuites.Text_Suite.text_flow, 'cha ' : StdSuites.Text_Suite.character, 'tsty' : StdSuites.Text_Suite.text_style_info, @@ -86,6 +84,8 @@ _classdeclarations = { 'cwor' : StdSuites.Text_Suite.word, 'cpar' : StdSuites.Text_Suite.paragraph, 'ctxt' : StdSuites.Text_Suite.text, + 'ctxt' : text, + 'stys' : styleset, } diff --git a/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py b/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py index 21a289a..1ab2994 100644 --- a/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py +++ b/Lib/plat-mac/lib-scriptpackages/StdSuites/__init__.py @@ -220,13 +220,6 @@ getbaseclasses(double_integer) getbaseclasses(long_fixed) getbaseclasses(null) getbaseclasses(target_id) -getbaseclasses(paragraph) -getbaseclasses(character) -getbaseclasses(text_flow) -getbaseclasses(text_style_info) -getbaseclasses(line) -getbaseclasses(word) -getbaseclasses(text) getbaseclasses(graphic_group) getbaseclasses(oval) getbaseclasses(graphic_text) @@ -240,8 +233,19 @@ getbaseclasses(rounded_rectangle) getbaseclasses(arc) getbaseclasses(pixel_map) getbaseclasses(rectangle) +getbaseclasses(paragraph) +getbaseclasses(character) +getbaseclasses(text_flow) +getbaseclasses(text_style_info) +getbaseclasses(line) +getbaseclasses(word) +getbaseclasses(text) getbaseclasses(graphic_group) getbaseclasses(drawing_area) +getbaseclasses(cell) +getbaseclasses(column) +getbaseclasses(table) +getbaseclasses(row) getbaseclasses(AppleTalk_address) getbaseclasses(address_specification) getbaseclasses(Token_Ring_address) @@ -254,10 +258,6 @@ getbaseclasses(device_specification) getbaseclasses(LocalTalk_address) getbaseclasses(IP_address) getbaseclasses(Ethernet_address) -getbaseclasses(cell) -getbaseclasses(column) -getbaseclasses(table) -getbaseclasses(row) # # Indices of types declared in this module @@ -415,13 +415,6 @@ _classdeclarations = { 'lfxd' : long_fixed, 'null' : null, 'targ' : target_id, - 'cpar' : paragraph, - 'cha ' : character, - 'cflo' : text_flow, - 'tsty' : text_style_info, - 'clin' : line, - 'cwor' : word, - 'ctxt' : text, 'cpic' : graphic_group, 'covl' : oval, 'cgtx' : graphic_text, @@ -435,8 +428,19 @@ _classdeclarations = { 'carc' : arc, 'cpix' : pixel_map, 'crec' : rectangle, + 'cpar' : paragraph, + 'cha ' : character, + 'cflo' : text_flow, + 'tsty' : text_style_info, + 'clin' : line, + 'cwor' : word, + 'ctxt' : text, 'cpic' : graphic_group, 'cdrw' : drawing_area, + 'ccel' : cell, + 'ccol' : column, + 'ctbl' : table, + 'crow' : row, 'cat ' : AppleTalk_address, 'cadr' : address_specification, 'ctok' : Token_Ring_address, @@ -449,10 +453,6 @@ _classdeclarations = { 'clt ' : LocalTalk_address, 'cip ' : IP_address, 'cen ' : Ethernet_address, - 'ccel' : cell, - 'ccol' : column, - 'ctbl' : table, - 'crow' : row, } diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_2d_Folder_2d_File_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_2d_Folder_2d_File_Suite.py deleted file mode 100644 index b3e1757..0000000 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_2d_Folder_2d_File_Suite.py +++ /dev/null @@ -1,335 +0,0 @@ -"""Suite Disk-Folder-File Suite: Terms and Events for controlling Disks, Folders, and Files -Level 1, version 1 - -Generated from /System/Library/CoreServices/System Events.app -AETE/AEUT resource version 1/0, language 0, script 0 -""" - -import aetools -import MacOS - -_code = 'cdis' - -class Disk_2d_Folder_2d_File_Suite_Events: - - _argmap_move = { - 'to' : 'insh', - } - - def move(self, _object, _attributes={}, **_arguments): - """move: Move disk item(s) to a new location. - Required argument: the object for the command - Keyword argument to: The new location for the disk item(s). - Keyword argument _attributes: AppleEvent attribute dictionary - Returns: the reply for the command - """ - _code = 'core' - _subcode = 'move' - - aetools.keysubst(_arguments, self._argmap_move) - _arguments['----'] = _object - - - _reply, _arguments, _attributes = self.send(_code, _subcode, - _arguments, _attributes) - if _arguments.get('errn', 0): - raise aetools.Error, aetools.decodeerror(_arguments) - # XXXX Optionally decode result - if _arguments.has_key('----'): - return _arguments['----'] - - -class alias(aetools.ComponentItem): - """alias - An alias in the file system """ - want = 'alis' -class _Prop__3c_Inheritance_3e_(aetools.NProperty): - """ - All of the properties of the superclass. """ - which = 'c@#^' - want = 'cobj' -class _Prop_properties(aetools.NProperty): - """properties - every property of the alias """ - which = 'pALL' - want = '****' -class _Prop_version(aetools.NProperty): - """version - the version of the application bundle referenced by the alias (visible at the bottom of the "Get Info" window) """ - which = 'vers' - want = 'utxt' -# element 'alis' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'file' as ['name', 'indx', 'rele', 'rang', 'test'] - -aliases = alias - -class disk(aetools.ComponentItem): - """disk - A disk in the file system """ - want = 'cdis' -class _Prop_capacity(aetools.NProperty): - """capacity - the total number of bytes (free or used) on the disk """ - which = 'capa' - want = 'magn' -class _Prop_ejectable(aetools.NProperty): - """ejectable - Can the media be ejected (floppies, CD's, and so on)? """ - which = 'isej' - want = 'bool' -class _Prop_format(aetools.NProperty): - """format - the file system format of this disk """ - which = 'dfmt' - want = 'edfm' -class _Prop_free_space(aetools.NProperty): - """free space - the number of free bytes left on the disk """ - which = 'frsp' - want = 'magn' -class _Prop_ignore_privileges(aetools.NProperty): - """ignore privileges - Ignore permissions on this disk? """ - which = 'igpr' - want = 'bool' -class _Prop_local_volume(aetools.NProperty): - """local volume - Is the media a local volume (as opposed to a file server)? """ - which = 'isrv' - want = 'bool' -class _Prop_startup(aetools.NProperty): - """startup - Is this disk the boot disk? """ - which = 'istd' - want = 'bool' -# element 'alis' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'file' as ['name', 'indx', 'rele', 'rang', 'test'] - -disks = disk - -class folder(aetools.ComponentItem): - """folder - A folder in the file system """ - want = 'cfol' -# element 'alis' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test'] -# element 'file' as ['name', 'indx', 'rele', 'rang', 'test'] - -folders = folder - -class item(aetools.ComponentItem): - """item - An item in the file system """ - want = 'cobj' -class _Prop_POSIX_path(aetools.NProperty): - """POSIX path - the POSIX file system path of the item """ - which = 'posx' - want = 'utxt' -class _Prop_busy_status(aetools.NProperty): - """busy status - Is the item busy? """ - which = 'busy' - want = 'bool' -class _Prop_creation_date(aetools.NProperty): - """creation date - the date on which the item was created """ - which = 'ascd' - want = '****' -class _Prop_displayed_name(aetools.NProperty): - """displayed name - the name of the item as displayed in the User Interface """ - which = 'dnam' - want = 'utxt' -class _Prop_modification_date(aetools.NProperty): - """modification date - the date on which the item was last modified """ - which = 'asmo' - want = '****' -class _Prop_name(aetools.NProperty): - """name - the name of the item """ - which = 'pnam' - want = 'utxt' -class _Prop_name_extension(aetools.NProperty): - """name extension - the extension portion of the name """ - which = 'extn' - want = 'utxt' -class _Prop_package_folder(aetools.NProperty): - """package folder - Is the item a package? """ - which = 'pkgf' - want = 'bool' -class _Prop_path(aetools.NProperty): - """path - the file system path of the item """ - which = 'ppth' - want = 'utxt' -class _Prop_url(aetools.NProperty): - """url - the url of the item """ - which = 'url ' - want = 'utxt' -class _Prop_visible(aetools.NProperty): - """visible - Is the item visible? """ - which = 'pvis' - want = 'bool' -class _Prop_volume(aetools.NProperty): - """volume - the volume on which the item resides """ - which = 'volu' - want = 'utxt' - -items = item - -class file(aetools.ComponentItem): - """file - A file in the file system """ - want = 'file' -class _Prop_creator_type(aetools.NProperty): - """creator type - the OSType identifying the application that created the file """ - which = 'fcrt' - want = 'utxt' -class _Prop_file_type(aetools.NProperty): - """file type - the OSType identifying the type of data contained in the file """ - which = 'asty' - want = 'utxt' -class _Prop_physical_size(aetools.NProperty): - """physical size - the actual space used by the file on disk """ - which = 'phys' - want = '****' -class _Prop_product_version(aetools.NProperty): - """product version - the version of the product (visible at the top of the "Get Info" window) """ - which = 'ver2' - want = 'utxt' -class _Prop_size(aetools.NProperty): - """size - the logical size of the file """ - which = 'ptsz' - want = '****' -class _Prop_stationery(aetools.NProperty): - """stationery - Is the file a stationery pad? """ - which = 'pspd' - want = 'bool' - -files = file -alias._superclassnames = ['item'] -alias._privpropdict = { - '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, - 'properties' : _Prop_properties, - 'version' : _Prop_version, -} -alias._privelemdict = { - 'alias' : alias, - 'file' : file, - 'folder' : folder, - 'item' : item, -} -disk._superclassnames = ['item'] -disk._privpropdict = { - '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, - 'capacity' : _Prop_capacity, - 'ejectable' : _Prop_ejectable, - 'format' : _Prop_format, - 'free_space' : _Prop_free_space, - 'ignore_privileges' : _Prop_ignore_privileges, - 'local_volume' : _Prop_local_volume, - 'properties' : _Prop_properties, - 'startup' : _Prop_startup, -} -disk._privelemdict = { - 'alias' : alias, - 'file' : file, - 'folder' : folder, - 'item' : item, -} -folder._superclassnames = ['item'] -folder._privpropdict = { - '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, - 'properties' : _Prop_properties, -} -folder._privelemdict = { - 'alias' : alias, - 'file' : file, - 'folder' : folder, - 'item' : item, -} -item._superclassnames = [] -item._privpropdict = { - 'POSIX_path' : _Prop_POSIX_path, - '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, - 'busy_status' : _Prop_busy_status, - 'creation_date' : _Prop_creation_date, - 'displayed_name' : _Prop_displayed_name, - 'modification_date' : _Prop_modification_date, - 'name' : _Prop_name, - 'name_extension' : _Prop_name_extension, - 'package_folder' : _Prop_package_folder, - 'path' : _Prop_path, - 'properties' : _Prop_properties, - 'url' : _Prop_url, - 'visible' : _Prop_visible, - 'volume' : _Prop_volume, -} -item._privelemdict = { -} -file._superclassnames = ['item'] -file._privpropdict = { - '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, - 'creator_type' : _Prop_creator_type, - 'file_type' : _Prop_file_type, - 'physical_size' : _Prop_physical_size, - 'product_version' : _Prop_product_version, - 'properties' : _Prop_properties, - 'size' : _Prop_size, - 'stationery' : _Prop_stationery, - 'version' : _Prop_version, -} -file._privelemdict = { -} -_Enum_edfm = { - 'MS_2d_DOS_format' : 'dfms', # MS-DOS format - 'Apple_Photo_format' : 'dfph', # Apple Photo format - 'ISO_9660_format' : 'df96', # ISO 9660 format - 'QuickTake_format' : 'dfqt', # QuickTake format - 'AppleShare_format' : 'dfas', # AppleShare format - 'High_Sierra_format' : 'dfhs', # High Sierra format - 'Mac_OS_Extended_format' : 'dfh+', # Mac OS Extended format - 'UDF_format' : 'dfud', # UDF format - 'unknown_format' : 'df??', # unknown format - 'audio_format' : 'dfau', # audio format - 'Mac_OS_format' : 'dfhf', # Mac OS format - 'UFS_format' : 'dfuf', # UFS format - 'NFS_format' : 'dfnf', # NFS format - 'ProDOS_format' : 'dfpr', # ProDOS format - 'WebDAV_format' : 'dfwd', # WebDAV format -} - - -# -# Indices of types declared in this module -# -_classdeclarations = { - 'alis' : alias, - 'cdis' : disk, - 'cfol' : folder, - 'cobj' : item, - 'file' : file, -} - -_propdeclarations = { - 'ascd' : _Prop_creation_date, - 'asmo' : _Prop_modification_date, - 'asty' : _Prop_file_type, - 'busy' : _Prop_busy_status, - 'c@#^' : _Prop__3c_Inheritance_3e_, - 'capa' : _Prop_capacity, - 'dfmt' : _Prop_format, - 'dnam' : _Prop_displayed_name, - 'extn' : _Prop_name_extension, - 'fcrt' : _Prop_creator_type, - 'frsp' : _Prop_free_space, - 'igpr' : _Prop_ignore_privileges, - 'isej' : _Prop_ejectable, - 'isrv' : _Prop_local_volume, - 'istd' : _Prop_startup, - 'pALL' : _Prop_properties, - 'phys' : _Prop_physical_size, - 'pkgf' : _Prop_package_folder, - 'pnam' : _Prop_name, - 'posx' : _Prop_POSIX_path, - 'ppth' : _Prop_path, - 'pspd' : _Prop_stationery, - 'ptsz' : _Prop_size, - 'pvis' : _Prop_visible, - 'url ' : _Prop_url, - 'ver2' : _Prop_product_version, - 'vers' : _Prop_version, - 'volu' : _Prop_volume, -} - -_compdeclarations = { -} - -_enumdeclarations = { - 'edfm' : _Enum_edfm, -} diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py new file mode 100644 index 0000000..4b9e49f --- /dev/null +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py @@ -0,0 +1,335 @@ +"""Suite Disk-Folder-File Suite: Terms and Events for controlling Disks, Folders, and Files +Level 1, version 1 + +Generated from /System/Library/CoreServices/System Events.app +AETE/AEUT resource version 1/0, language 0, script 0 +""" + +import aetools +import MacOS + +_code = 'cdis' + +class Disk_Folder_File_Suite_Events: + + _argmap_move = { + 'to' : 'insh', + } + + def move(self, _object, _attributes={}, **_arguments): + """move: Move disk item(s) to a new location. + Required argument: the object for the command + Keyword argument to: The new location for the disk item(s). + Keyword argument _attributes: AppleEvent attribute dictionary + Returns: the reply for the command + """ + _code = 'core' + _subcode = 'move' + + aetools.keysubst(_arguments, self._argmap_move) + _arguments['----'] = _object + + + _reply, _arguments, _attributes = self.send(_code, _subcode, + _arguments, _attributes) + if _arguments.get('errn', 0): + raise aetools.Error, aetools.decodeerror(_arguments) + # XXXX Optionally decode result + if _arguments.has_key('----'): + return _arguments['----'] + + +class alias(aetools.ComponentItem): + """alias - An alias in the file system """ + want = 'alis' +class _Prop__3c_Inheritance_3e_(aetools.NProperty): + """ - All of the properties of the superclass. """ + which = 'c@#^' + want = 'cobj' +class _Prop_properties(aetools.NProperty): + """properties - every property of the alias """ + which = 'pALL' + want = '****' +class _Prop_version(aetools.NProperty): + """version - the version of the application bundle referenced by the alias (visible at the bottom of the "Get Info" window) """ + which = 'vers' + want = 'utxt' +# element 'alis' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'file' as ['name', 'indx', 'rele', 'rang', 'test'] + +aliases = alias + +class disk(aetools.ComponentItem): + """disk - A disk in the file system """ + want = 'cdis' +class _Prop_capacity(aetools.NProperty): + """capacity - the total number of bytes (free or used) on the disk """ + which = 'capa' + want = 'magn' +class _Prop_ejectable(aetools.NProperty): + """ejectable - Can the media be ejected (floppies, CD's, and so on)? """ + which = 'isej' + want = 'bool' +class _Prop_format(aetools.NProperty): + """format - the file system format of this disk """ + which = 'dfmt' + want = 'edfm' +class _Prop_free_space(aetools.NProperty): + """free space - the number of free bytes left on the disk """ + which = 'frsp' + want = 'magn' +class _Prop_ignore_privileges(aetools.NProperty): + """ignore privileges - Ignore permissions on this disk? """ + which = 'igpr' + want = 'bool' +class _Prop_local_volume(aetools.NProperty): + """local volume - Is the media a local volume (as opposed to a file server)? """ + which = 'isrv' + want = 'bool' +class _Prop_startup(aetools.NProperty): + """startup - Is this disk the boot disk? """ + which = 'istd' + want = 'bool' +# element 'alis' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'file' as ['name', 'indx', 'rele', 'rang', 'test'] + +disks = disk + +class folder(aetools.ComponentItem): + """folder - A folder in the file system """ + want = 'cfol' +# element 'alis' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test'] +# element 'file' as ['name', 'indx', 'rele', 'rang', 'test'] + +folders = folder + +class item(aetools.ComponentItem): + """item - An item in the file system """ + want = 'cobj' +class _Prop_POSIX_path(aetools.NProperty): + """POSIX path - the POSIX file system path of the item """ + which = 'posx' + want = 'utxt' +class _Prop_busy_status(aetools.NProperty): + """busy status - Is the item busy? """ + which = 'busy' + want = 'bool' +class _Prop_creation_date(aetools.NProperty): + """creation date - the date on which the item was created """ + which = 'ascd' + want = '****' +class _Prop_displayed_name(aetools.NProperty): + """displayed name - the name of the item as displayed in the User Interface """ + which = 'dnam' + want = 'utxt' +class _Prop_modification_date(aetools.NProperty): + """modification date - the date on which the item was last modified """ + which = 'asmo' + want = '****' +class _Prop_name(aetools.NProperty): + """name - the name of the item """ + which = 'pnam' + want = 'utxt' +class _Prop_name_extension(aetools.NProperty): + """name extension - the extension portion of the name """ + which = 'extn' + want = 'utxt' +class _Prop_package_folder(aetools.NProperty): + """package folder - Is the item a package? """ + which = 'pkgf' + want = 'bool' +class _Prop_path(aetools.NProperty): + """path - the file system path of the item """ + which = 'ppth' + want = 'utxt' +class _Prop_url(aetools.NProperty): + """url - the url of the item """ + which = 'url ' + want = 'utxt' +class _Prop_visible(aetools.NProperty): + """visible - Is the item visible? """ + which = 'pvis' + want = 'bool' +class _Prop_volume(aetools.NProperty): + """volume - the volume on which the item resides """ + which = 'volu' + want = 'utxt' + +items = item + +class file(aetools.ComponentItem): + """file - A file in the file system """ + want = 'file' +class _Prop_creator_type(aetools.NProperty): + """creator type - the OSType identifying the application that created the file """ + which = 'fcrt' + want = 'utxt' +class _Prop_file_type(aetools.NProperty): + """file type - the OSType identifying the type of data contained in the file """ + which = 'asty' + want = 'utxt' +class _Prop_physical_size(aetools.NProperty): + """physical size - the actual space used by the file on disk """ + which = 'phys' + want = '****' +class _Prop_product_version(aetools.NProperty): + """product version - the version of the product (visible at the top of the "Get Info" window) """ + which = 'ver2' + want = 'utxt' +class _Prop_size(aetools.NProperty): + """size - the logical size of the file """ + which = 'ptsz' + want = '****' +class _Prop_stationery(aetools.NProperty): + """stationery - Is the file a stationery pad? """ + which = 'pspd' + want = 'bool' + +files = file +alias._superclassnames = ['item'] +alias._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'properties' : _Prop_properties, + 'version' : _Prop_version, +} +alias._privelemdict = { + 'alias' : alias, + 'file' : file, + 'folder' : folder, + 'item' : item, +} +disk._superclassnames = ['item'] +disk._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'capacity' : _Prop_capacity, + 'ejectable' : _Prop_ejectable, + 'format' : _Prop_format, + 'free_space' : _Prop_free_space, + 'ignore_privileges' : _Prop_ignore_privileges, + 'local_volume' : _Prop_local_volume, + 'properties' : _Prop_properties, + 'startup' : _Prop_startup, +} +disk._privelemdict = { + 'alias' : alias, + 'file' : file, + 'folder' : folder, + 'item' : item, +} +folder._superclassnames = ['item'] +folder._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'properties' : _Prop_properties, +} +folder._privelemdict = { + 'alias' : alias, + 'file' : file, + 'folder' : folder, + 'item' : item, +} +item._superclassnames = [] +item._privpropdict = { + 'POSIX_path' : _Prop_POSIX_path, + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'busy_status' : _Prop_busy_status, + 'creation_date' : _Prop_creation_date, + 'displayed_name' : _Prop_displayed_name, + 'modification_date' : _Prop_modification_date, + 'name' : _Prop_name, + 'name_extension' : _Prop_name_extension, + 'package_folder' : _Prop_package_folder, + 'path' : _Prop_path, + 'properties' : _Prop_properties, + 'url' : _Prop_url, + 'visible' : _Prop_visible, + 'volume' : _Prop_volume, +} +item._privelemdict = { +} +file._superclassnames = ['item'] +file._privpropdict = { + '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, + 'creator_type' : _Prop_creator_type, + 'file_type' : _Prop_file_type, + 'physical_size' : _Prop_physical_size, + 'product_version' : _Prop_product_version, + 'properties' : _Prop_properties, + 'size' : _Prop_size, + 'stationery' : _Prop_stationery, + 'version' : _Prop_version, +} +file._privelemdict = { +} +_Enum_edfm = { + 'MS_2d_DOS_format' : 'dfms', # MS-DOS format + 'Apple_Photo_format' : 'dfph', # Apple Photo format + 'ISO_9660_format' : 'df96', # ISO 9660 format + 'QuickTake_format' : 'dfqt', # QuickTake format + 'AppleShare_format' : 'dfas', # AppleShare format + 'High_Sierra_format' : 'dfhs', # High Sierra format + 'Mac_OS_Extended_format' : 'dfh+', # Mac OS Extended format + 'UDF_format' : 'dfud', # UDF format + 'unknown_format' : 'df??', # unknown format + 'audio_format' : 'dfau', # audio format + 'Mac_OS_format' : 'dfhf', # Mac OS format + 'UFS_format' : 'dfuf', # UFS format + 'NFS_format' : 'dfnf', # NFS format + 'ProDOS_format' : 'dfpr', # ProDOS format + 'WebDAV_format' : 'dfwd', # WebDAV format +} + + +# +# Indices of types declared in this module +# +_classdeclarations = { + 'alis' : alias, + 'cdis' : disk, + 'cfol' : folder, + 'cobj' : item, + 'file' : file, +} + +_propdeclarations = { + 'ascd' : _Prop_creation_date, + 'asmo' : _Prop_modification_date, + 'asty' : _Prop_file_type, + 'busy' : _Prop_busy_status, + 'c@#^' : _Prop__3c_Inheritance_3e_, + 'capa' : _Prop_capacity, + 'dfmt' : _Prop_format, + 'dnam' : _Prop_displayed_name, + 'extn' : _Prop_name_extension, + 'fcrt' : _Prop_creator_type, + 'frsp' : _Prop_free_space, + 'igpr' : _Prop_ignore_privileges, + 'isej' : _Prop_ejectable, + 'isrv' : _Prop_local_volume, + 'istd' : _Prop_startup, + 'pALL' : _Prop_properties, + 'phys' : _Prop_physical_size, + 'pkgf' : _Prop_package_folder, + 'pnam' : _Prop_name, + 'posx' : _Prop_POSIX_path, + 'ppth' : _Prop_path, + 'pspd' : _Prop_stationery, + 'ptsz' : _Prop_size, + 'pvis' : _Prop_visible, + 'url ' : _Prop_url, + 'ver2' : _Prop_product_version, + 'vers' : _Prop_version, + 'volu' : _Prop_volume, +} + +_compdeclarations = { +} + +_enumdeclarations = { + 'edfm' : _Enum_edfm, +} diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py index 5c245da..3fa5893 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py @@ -50,7 +50,7 @@ class _Prop_system_wide_UI_element(aetools.NProperty): applications = application application._superclassnames = [] -import Disk_2d_Folder_2d_File_Suite +import Disk_Folder_File_Suite import Standard_Suite import Folder_Actions_Suite import Login_Items_Suite @@ -63,15 +63,15 @@ application._privpropdict = { } application._privelemdict = { 'UI_element' : Processes_Suite.UI_element, - 'alias' : Disk_2d_Folder_2d_File_Suite.alias, + 'alias' : Disk_Folder_File_Suite.alias, 'application_process' : Processes_Suite.application_process, 'desk_accessory_process' : Processes_Suite.desk_accessory_process, - 'disk' : Disk_2d_Folder_2d_File_Suite.disk, + 'disk' : Disk_Folder_File_Suite.disk, 'document' : Standard_Suite.document, - 'file' : Disk_2d_Folder_2d_File_Suite.file, - 'folder' : Disk_2d_Folder_2d_File_Suite.folder, + 'file' : Disk_Folder_File_Suite.file, + 'folder' : Disk_Folder_File_Suite.folder, 'folder_action' : Folder_Actions_Suite.folder_action, - 'item' : Disk_2d_Folder_2d_File_Suite.item, + 'item' : Disk_Folder_File_Suite.item, 'login_item' : Login_Items_Suite.login_item, 'process' : Processes_Suite.process, 'window' : Standard_Suite.window, diff --git a/Lib/plat-mac/lib-scriptpackages/SystemEvents/__init__.py b/Lib/plat-mac/lib-scriptpackages/SystemEvents/__init__.py index a7330c2..8115e08 100644 --- a/Lib/plat-mac/lib-scriptpackages/SystemEvents/__init__.py +++ b/Lib/plat-mac/lib-scriptpackages/SystemEvents/__init__.py @@ -5,7 +5,7 @@ import aetools Error = aetools.Error import Standard_Suite import Text_Suite -import Disk_2d_Folder_2d_File_Suite +import Disk_Folder_File_Suite import Folder_Actions_Suite import Login_Items_Suite import Power_Suite @@ -17,7 +17,7 @@ import Hidden_Suite _code_to_module = { '????' : Standard_Suite, '????' : Text_Suite, - 'cdis' : Disk_2d_Folder_2d_File_Suite, + 'cdis' : Disk_Folder_File_Suite, 'faco' : Folder_Actions_Suite, 'logi' : Login_Items_Suite, 'powr' : Power_Suite, @@ -31,7 +31,7 @@ _code_to_module = { _code_to_fullname = { '????' : ('SystemEvents.Standard_Suite', 'Standard_Suite'), '????' : ('SystemEvents.Text_Suite', 'Text_Suite'), - 'cdis' : ('SystemEvents.Disk_2d_Folder_2d_File_Suite', 'Disk_2d_Folder_2d_File_Suite'), + 'cdis' : ('SystemEvents.Disk_Folder_File_Suite', 'Disk_Folder_File_Suite'), 'faco' : ('SystemEvents.Folder_Actions_Suite', 'Folder_Actions_Suite'), 'logi' : ('SystemEvents.Login_Items_Suite', 'Login_Items_Suite'), 'powr' : ('SystemEvents.Power_Suite', 'Power_Suite'), @@ -42,7 +42,7 @@ _code_to_fullname = { from Standard_Suite import * from Text_Suite import * -from Disk_2d_Folder_2d_File_Suite import * +from Disk_Folder_File_Suite import * from Folder_Actions_Suite import * from Login_Items_Suite import * from Power_Suite import * @@ -67,17 +67,18 @@ import StdSuites # # Set property and element dictionaries now that all classes have been defined # -getbaseclasses(color) -getbaseclasses(window) -getbaseclasses(application) -getbaseclasses(item) -getbaseclasses(document) getbaseclasses(character) getbaseclasses(attachment) getbaseclasses(paragraph) getbaseclasses(word) getbaseclasses(attribute_run) getbaseclasses(text) +getbaseclasses(color) +getbaseclasses(window) +getbaseclasses(application) +getbaseclasses(item) +getbaseclasses(document) +getbaseclasses(application) getbaseclasses(login_item) getbaseclasses(file) getbaseclasses(alias) @@ -170,23 +171,23 @@ getbaseclasses(color_well) getbaseclasses(scroll_bar) getbaseclasses(combo_box) getbaseclasses(browser) -getbaseclasses(application) # # Indices of types declared in this module # _classdeclarations = { - 'colr' : color, - 'cwin' : window, - 'capp' : application, - 'cobj' : item, - 'docu' : document, 'cha ' : character, 'atts' : attachment, 'cpar' : paragraph, 'cwor' : word, 'catr' : attribute_run, 'ctxt' : text, + 'colr' : color, + 'cwin' : window, + 'capp' : application, + 'cobj' : item, + 'docu' : document, + 'capp' : application, 'logi' : login_item, 'file' : file, 'alis' : alias, @@ -279,13 +280,12 @@ _classdeclarations = { 'scrb' : scroll_bar, 'comB' : combo_box, 'broW' : browser, - 'capp' : application, } class SystemEvents(Standard_Suite_Events, Text_Suite_Events, - Disk_2d_Folder_2d_File_Suite_Events, + Disk_Folder_File_Suite_Events, Folder_Actions_Suite_Events, Login_Items_Suite_Events, Power_Suite_Events, diff --git a/Mac/scripts/genallsuites.py b/Mac/scripts/genallsuites.py index cdd9ee8..884d4a4 100644 --- a/Mac/scripts/genallsuites.py +++ b/Mac/scripts/genallsuites.py @@ -28,7 +28,8 @@ gensuitemodule.processfile_fromresource(APPLESCRIPT, gensuitemodule.processfile(SYSTEMEVENTS, output=os.path.join(DSTDIR, 'SystemEvents'), basepkgname='StdSuites', - edit_modnames=[], verbose=verbose) + edit_modnames=[('Disk_2d_Folder_2d_File_Suite', 'Disk_Folder_File_Suite')], + verbose=verbose) gensuitemodule.processfile(CODEWARRIOR, output=os.path.join(DSTDIR, 'CodeWarrior'), basepkgname='StdSuites', -- cgit v0.12