diff options
Diffstat (limited to 'Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py')
| -rw-r--r-- | Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py | 157 |
1 files changed, 86 insertions, 71 deletions
diff --git a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py index 68f1b38..c7856cf 100644 --- a/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py +++ b/Lib/plat-mac/lib-scriptpackages/Finder/Finder_items.py @@ -1,7 +1,7 @@ """Suite Finder items: Commands used with file system items, and basic item definition Level 1, version 1 -Generated from /Volumes/Moes/Systeemmap/Finder +Generated from /System/Library/CoreServices/Finder.app AETE/AEUT resource version 0/144, language 0, script 0 """ @@ -13,7 +13,7 @@ _code = 'fndr' class Finder_items_Events: def add_to_favorites(self, _object, _attributes={}, **_arguments): - """add to favorites: Add the items to the Favorites menu in the Apple Menu and in Open and Save dialogs + """add to favorites: (NOT AVAILABLE YET) Add the items to the user\xd5s Favorites Required argument: the items to add to the collection of Favorites Keyword argument _attributes: AppleEvent attribute dictionary """ @@ -37,7 +37,7 @@ class Finder_items_Events: } def clean_up(self, _object, _attributes={}, **_arguments): - """clean up: Arrange items in window nicely (only applies to open windows in icon or button views that are not kept arranged) + """clean up: (NOT AVAILABLE YET) Arrange items in window nicely (only applies to open windows in icon view that are not kept arranged) Required argument: the window to clean up Keyword argument by: the order in which to clean up the objects (name, index, date, etc.) Keyword argument _attributes: AppleEvent attribute dictionary @@ -58,8 +58,8 @@ class Finder_items_Events: return _arguments['----'] def eject(self, _object=None, _attributes={}, **_arguments): - """eject: Eject the specified disk(s), or every ejectable disk if no parameter is specified - Required argument: the items to eject + """eject: Eject the specified disk(s) + Required argument: the disk(s) to eject Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'fndr' @@ -98,7 +98,7 @@ class Finder_items_Events: return _arguments['----'] def erase(self, _object, _attributes={}, **_arguments): - """erase: Erase the specified disk(s) + """erase: (NOT AVAILABLE) Erase the specified disk(s) Required argument: the items to erase Keyword argument _attributes: AppleEvent attribute dictionary """ @@ -117,33 +117,6 @@ class Finder_items_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_put_away = { - 'asking' : 'fask', - } - - def put_away(self, _object, _attributes={}, **_arguments): - """put away: Put away the specified object(s) - Required argument: the items to put away - Keyword argument asking: Specifies whether or not to present a dialog to confirm putting this item away. - Keyword argument _attributes: AppleEvent attribute dictionary - Returns: the object put away in its put-away location - """ - _code = 'fndr' - _subcode = 'ptwy' - - aetools.keysubst(_arguments, self._argmap_put_away) - _arguments['----'] = _object - - aetools.enumsubst(_arguments, 'fask', _Enum_bool) - - _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['----'] - def reveal(self, _object, _attributes={}, **_arguments): """reveal: Bring the specified object(s) into view Required argument: the object to be made visible @@ -164,15 +137,22 @@ class Finder_items_Events: if _arguments.has_key('----'): return _arguments['----'] + _argmap_update = { + 'necessity' : 'nec?', + 'registering_applications' : 'reg?', + } + def update(self, _object, _attributes={}, **_arguments): """update: Update the display of the specified object(s) to match their on-disk representation Required argument: the item to update + Keyword argument necessity: only update if necessary (i.e. a finder window is open). default is false + Keyword argument registering_applications: register applications. default is true Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'fndr' _subcode = 'fupd' - if _arguments: raise TypeError, 'No optional args expected' + aetools.keysubst(_arguments, self._argmap_update) _arguments['----'] = _object @@ -195,15 +175,11 @@ class bounds(aetools.NProperty): class comment(aetools.NProperty): """comment - the comment of the item, displayed in the \xd2Get Info\xd3 window """ which = 'comt' - want = 'itxt' + want = 'utxt' class container(aetools.NProperty): """container - the container of the item """ which = 'ctnr' want = 'obj ' -class content_space(aetools.NProperty): - """content space - the window that would open if the item was opened """ - which = 'dwnd' - want = 'obj ' class creation_date(aetools.NProperty): """creation date - the date on which the item was created """ which = 'ascd' @@ -211,23 +187,35 @@ class creation_date(aetools.NProperty): class description(aetools.NProperty): """description - a description of the item """ which = 'dscr' - want = 'itxt' + want = 'utxt' class disk(aetools.NProperty): """disk - the disk on which the item is stored """ which = 'cdis' want = 'obj ' -class folder(aetools.NProperty): - """folder - the folder in which the item is stored """ - which = 'asdr' - want = 'obj ' +class displayed_name(aetools.NProperty): + """displayed name - the user-visible name of the item """ + which = 'dnam' + want = 'utxt' +class everyones_privileges(aetools.NProperty): + """everyones privileges - """ + which = 'gstp' + want = 'priv' +class extension_hidden(aetools.NProperty): + """extension hidden - Is the item's extension hidden from the user? """ + which = 'hidx' + want = 'bool' +class group(aetools.NProperty): + """group - the user or group that has special access to the container """ + which = 'sgrp' + want = 'utxt' +class group_privileges(aetools.NProperty): + """group privileges - """ + which = 'gppr' + want = 'priv' class icon(aetools.NProperty): """icon - the icon bitmap of the item """ which = 'iimg' want = 'ifam' -class id(aetools.NProperty): - """id - an id that identifies the item """ - which = 'ID ' - want = 'long' class index(aetools.NProperty): """index - the index in the front-to-back ordering within its container """ which = 'pidx' @@ -239,11 +227,15 @@ class information_window(aetools.NProperty): class kind(aetools.NProperty): """kind - the kind of the item """ which = 'kind' - want = 'itxt' + want = 'utxt' class label_index(aetools.NProperty): """label index - the label of the item """ which = 'labi' want = 'long' +class locked(aetools.NProperty): + """locked - Is the file locked? """ + which = 'aslk' + want = 'bool' class modification_date(aetools.NProperty): """modification date - the date on which the item was last modified """ which = 'asmo' @@ -251,27 +243,39 @@ class modification_date(aetools.NProperty): class name(aetools.NProperty): """name - the name of the item """ which = 'pnam' - want = 'itxt' + want = 'utxt' +class name_extension(aetools.NProperty): + """name extension - the name extension of the item (such as \xd2txt\xd3) """ + which = 'nmxt' + want = 'utxt' +class owner(aetools.NProperty): + """owner - the user that owns the container """ + which = 'sown' + want = 'utxt' +class owner_privileges(aetools.NProperty): + """owner privileges - """ + which = 'ownr' + want = 'priv' class physical_size(aetools.NProperty): """physical size - the actual space used by the item on disk """ which = 'phys' - want = 'long' + want = 'comp' class position(aetools.NProperty): """position - the position of the item within its parent window (can only be set for an item in a window viewed as icons or buttons) """ which = 'posn' want = 'QDpt' -class selected(aetools.NProperty): - """selected - Is the item selected? """ - which = 'issl' - want = 'bool' +class properties(aetools.NProperty): + """properties - every property of an item """ + which = 'pALL' + want = 'reco' class size(aetools.NProperty): """size - the logical size of the item """ which = 'ptsz' - want = 'long' -class window(aetools.NProperty): - """window - the window that would open if the item was opened """ - which = 'cwin' - want = 'obj ' + want = 'comp' +class url(aetools.NProperty): + """url - the url of the item """ + which = 'pURL' + want = 'utxt' items = item item._superclassnames = [] @@ -279,28 +283,33 @@ item._privpropdict = { 'bounds' : bounds, 'comment' : comment, 'container' : container, - 'content_space' : content_space, 'creation_date' : creation_date, 'description' : description, 'disk' : disk, - 'folder' : folder, + 'displayed_name' : displayed_name, + 'everyones_privileges' : everyones_privileges, + 'extension_hidden' : extension_hidden, + 'group' : group, + 'group_privileges' : group_privileges, 'icon' : icon, - 'id' : id, 'index' : index, 'information_window' : information_window, 'kind' : kind, 'label_index' : label_index, + 'locked' : locked, 'modification_date' : modification_date, 'name' : name, + 'name_extension' : name_extension, + 'owner' : owner, + 'owner_privileges' : owner_privileges, 'physical_size' : physical_size, 'position' : position, - 'selected' : selected, + 'properties' : properties, 'size' : size, - 'window' : window, + 'url' : url, } item._privelemdict = { } -_Enum_bool = None # XXXX enum bool not found!! # # Indices of types declared in this module @@ -310,27 +319,33 @@ _classdeclarations = { } _propdeclarations = { - 'ID ' : id, 'ascd' : creation_date, - 'asdr' : folder, + 'aslk' : locked, 'asmo' : modification_date, 'cdis' : disk, 'comt' : comment, 'ctnr' : container, - 'cwin' : window, + 'dnam' : displayed_name, 'dscr' : description, - 'dwnd' : content_space, + 'gppr' : group_privileges, + 'gstp' : everyones_privileges, + 'hidx' : extension_hidden, 'iimg' : icon, - 'issl' : selected, 'iwnd' : information_window, 'kind' : kind, 'labi' : label_index, + 'nmxt' : name_extension, + 'ownr' : owner_privileges, + 'pALL' : properties, + 'pURL' : url, 'pbnd' : bounds, 'phys' : physical_size, 'pidx' : index, 'pnam' : name, 'posn' : position, 'ptsz' : size, + 'sgrp' : group, + 'sown' : owner, } _compdeclarations = { |
