diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-28 22:07:22 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-28 22:07:22 (GMT) |
commit | 7377bec6ae20e2a3b83f7084bc98af47e5bd3886 (patch) | |
tree | fef9adf10767b4f12a5918345a392cda9eb67f04 /Lib/plat-mac/lib-scriptpackages/Netscape | |
parent | 03b9c91afff90cd8ac2e0b84f486d0f2ebf4e549 (diff) | |
download | cpython-7377bec6ae20e2a3b83f7084bc98af47e5bd3886.zip cpython-7377bec6ae20e2a3b83f7084bc98af47e5bd3886.tar.gz cpython-7377bec6ae20e2a3b83f7084bc98af47e5bd3886.tar.bz2 |
Regenerated (from resource files) with sorting version of gensuitemodule.
This is a first step towards regenerating the modules with newer, MacOSX,
versions of these programs, and using the programmatic interface to
get at the terminology in stead of poking in resource files.
Diffstat (limited to 'Lib/plat-mac/lib-scriptpackages/Netscape')
5 files changed, 217 insertions, 217 deletions
diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py index 56408f3..ede7189 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Mozilla_suite.py @@ -12,23 +12,16 @@ _code = 'MOSS' class Mozilla_suite_Events: - _argmap_Read_help_file = { - 'with_index' : 'idid', - 'search_text' : 'sear', - } - - def Read_help_file(self, _object, _attributes={}, **_arguments): - """Read help file: Reads in the help file (file should be in the help file format) - Required argument: undocumented, typecode 'alis' - Keyword argument with_index: Index to the help file. Defaults to \xd4DEFAULT\xd5) - Keyword argument search_text: Optional text to search for + def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments): + """Get Import Data: Returns a structure containing information that is of use to an external module in importing data from an external mail application into Communicator. Keyword argument _attributes: AppleEvent attribute dictionary + Returns: vRefNum and dirID of profile folder (2+4 bytes), vRefNum and DirID of the local mail folder (2+4 bytes), window type of front window (0 if none, \xd4Brwz\xd5 browser, \xd4Addr\xd5 addressbook, \xd4Mesg\xd5 messenger, etc., 4 bytes) """ _code = 'MOSS' - _subcode = 'help' + _subcode = 'Impt' - aetools.keysubst(_arguments, self._argmap_Read_help_file) - _arguments['----'] = _object + if _arguments: raise TypeError, 'No optional args expected' + if _no_object != None: raise TypeError, 'No direct arg expected' _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -39,16 +32,16 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Open_bookmark(self, _object=None, _attributes={}, **_arguments): - """Open bookmark: Reads in a bookmark file - Required argument: If not available, reloads the current bookmark file + def Get_Profile_Name(self, _no_object=None, _attributes={}, **_arguments): + """Get Profile Name: Get the current User Profile Keyword argument _attributes: AppleEvent attribute dictionary + Returns: Name of the current profile, like \xd2Joe Bloggs\xd3. This is the name of the profile folder in the Netscape Users folder. """ _code = 'MOSS' - _subcode = 'book' + _subcode = 'upro' if _arguments: raise TypeError, 'No optional args expected' - _arguments['----'] = _object + if _no_object != None: raise TypeError, 'No direct arg expected' _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -59,23 +52,17 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_Go = { - 'direction' : 'dire', - } - - def Go(self, _object, _attributes={}, **_arguments): - """Go: navigate a window: back, forward, again(reload), home) - Required argument: window - Keyword argument direction: undocumented, typecode 'dire' + def Get_workingURL(self, _no_object=None, _attributes={}, **_arguments): + """Get workingURL: Get the path to the running application in URL format. This will allow a script to construct a relative URL Keyword argument _attributes: AppleEvent attribute dictionary + Returns: Will return text of the from \xd2FILE://foo/applicationname\xd3 """ _code = 'MOSS' - _subcode = 'gogo' + _subcode = 'wurl' - aetools.keysubst(_arguments, self._argmap_Go) - _arguments['----'] = _object + if _arguments: raise TypeError, 'No optional args expected' + if _no_object != None: raise TypeError, 'No direct arg expected' - aetools.enumsubst(_arguments, 'dire', _Enum_dire) _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) @@ -85,17 +72,23 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Get_workingURL(self, _no_object=None, _attributes={}, **_arguments): - """Get workingURL: Get the path to the running application in URL format. This will allow a script to construct a relative URL + _argmap_Go = { + 'direction' : 'dire', + } + + def Go(self, _object, _attributes={}, **_arguments): + """Go: navigate a window: back, forward, again(reload), home) + Required argument: window + Keyword argument direction: undocumented, typecode 'dire' Keyword argument _attributes: AppleEvent attribute dictionary - Returns: Will return text of the from \xd2FILE://foo/applicationname\xd3 """ _code = 'MOSS' - _subcode = 'wurl' + _subcode = 'gogo' - if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + aetools.keysubst(_arguments, self._argmap_Go) + _arguments['----'] = _object + aetools.enumsubst(_arguments, 'dire', _Enum_dire) _reply, _arguments, _attributes = self.send(_code, _subcode, _arguments, _attributes) @@ -105,15 +98,16 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Open_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments): - """Open Profile Manager: Open the user profile manager (obsolete) + def Handle_command(self, _object, _attributes={}, **_arguments): + """Handle command: Handle a command + Required argument: The command to handle Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'MOSS' - _subcode = 'prfl' + _subcode = 'hcmd' if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -124,13 +118,12 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments): - """Get Import Data: Returns a structure containing information that is of use to an external module in importing data from an external mail application into Communicator. + def Open_Address_Book(self, _no_object=None, _attributes={}, **_arguments): + """Open Address Book: Opens the address book Keyword argument _attributes: AppleEvent attribute dictionary - Returns: vRefNum and dirID of profile folder (2+4 bytes), vRefNum and DirID of the local mail folder (2+4 bytes), window type of front window (0 if none, \xd4Brwz\xd5 browser, \xd4Addr\xd5 addressbook, \xd4Mesg\xd5 messenger, etc., 4 bytes) """ _code = 'MOSS' - _subcode = 'Impt' + _subcode = 'addr' if _arguments: raise TypeError, 'No optional args expected' if _no_object != None: raise TypeError, 'No direct arg expected' @@ -144,16 +137,16 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Get_Profile_Name(self, _no_object=None, _attributes={}, **_arguments): - """Get Profile Name: Get the current User Profile + def Open_Component(self, _object, _attributes={}, **_arguments): + """Open Component: Open a Communicator component + Required argument: The component to open Keyword argument _attributes: AppleEvent attribute dictionary - Returns: Name of the current profile, like \xd2Joe Bloggs\xd3. This is the name of the profile folder in the Netscape Users folder. """ _code = 'MOSS' - _subcode = 'upro' + _subcode = 'cpnt' if _arguments: raise TypeError, 'No optional args expected' - if _no_object != None: raise TypeError, 'No direct arg expected' + _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -164,12 +157,12 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Open_Address_Book(self, _no_object=None, _attributes={}, **_arguments): - """Open Address Book: Opens the address book + def Open_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments): + """Open Profile Manager: Open the user profile manager (obsolete) Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'MOSS' - _subcode = 'addr' + _subcode = 'prfl' if _arguments: raise TypeError, 'No optional args expected' if _no_object != None: raise TypeError, 'No direct arg expected' @@ -183,13 +176,13 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Open_Component(self, _object, _attributes={}, **_arguments): - """Open Component: Open a Communicator component - Required argument: The component to open + def Open_bookmark(self, _object=None, _attributes={}, **_arguments): + """Open bookmark: Reads in a bookmark file + Required argument: If not available, reloads the current bookmark file Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'MOSS' - _subcode = 'cpnt' + _subcode = 'book' if _arguments: raise TypeError, 'No optional args expected' _arguments['----'] = _object @@ -203,15 +196,22 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def Handle_command(self, _object, _attributes={}, **_arguments): - """Handle command: Handle a command - Required argument: The command to handle + _argmap_Read_help_file = { + 'with_index' : 'idid', + 'search_text' : 'sear', + } + + def Read_help_file(self, _object, _attributes={}, **_arguments): + """Read help file: Reads in the help file (file should be in the help file format) + Required argument: undocumented, typecode 'alis' + Keyword argument with_index: Index to the help file. Defaults to \xd4DEFAULT\xd5) + Keyword argument search_text: Optional text to search for Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'MOSS' - _subcode = 'hcmd' + _subcode = 'help' - if _arguments: raise TypeError, 'No optional args expected' + aetools.keysubst(_arguments, self._argmap_Read_help_file) _arguments['----'] = _object @@ -223,13 +223,6 @@ class Mozilla_suite_Events: if _arguments.has_key('----'): return _arguments['----'] -_Enum_dire = { - 'again' : 'agai', # Again (reload) - 'home' : 'home', # Home - 'backward' : 'prev', # Previous page - 'forward' : 'next', # Next page -} - _Enum_comp = { 'Navigator' : 'navg', # The Navigator component 'InBox' : 'inbx', # The InBox component @@ -239,6 +232,13 @@ _Enum_comp = { 'Calendar' : 'cald', # The Calendar Component } +_Enum_dire = { + 'again' : 'agai', # Again (reload) + 'home' : 'home', # Home + 'backward' : 'prev', # Previous page + 'forward' : 'next', # Next page +} + _Enum_ncmd = { 'Get_new_mail' : '\x00\x00\x04W', # 'Send_queued_messages' : '\x00\x00\x04X', # diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py b/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py index b1cc8ee..d69b987 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/PowerPlant.py @@ -12,21 +12,20 @@ _code = 'ppnt' class PowerPlant_Events: - _argmap_select = { - 'data' : 'data', + _argmap_SwitchTellTarget = { + 'to' : 'data', } - def select(self, _object, _attributes={}, **_arguments): - """select: Sets the present selection - Required argument: object to select or container of sub-objects to select - Keyword argument data: sub-object(s) to select + def SwitchTellTarget(self, _no_object=None, _attributes={}, **_arguments): + """SwitchTellTarget: Makes an object the \xd2focus\xd3 of AppleEvents + Keyword argument to: reference to new focus of AppleEvents Keyword argument _attributes: AppleEvent attribute dictionary """ - _code = 'misc' - _subcode = 'slct' + _code = 'ppnt' + _subcode = 'sttg' - aetools.keysubst(_arguments, self._argmap_select) - _arguments['----'] = _object + aetools.keysubst(_arguments, self._argmap_SwitchTellTarget) + if _no_object != None: raise TypeError, 'No direct arg expected' _reply, _arguments, _attributes = self.send(_code, _subcode, @@ -37,20 +36,21 @@ class PowerPlant_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_SwitchTellTarget = { - 'to' : 'data', + _argmap_select = { + 'data' : 'data', } - def SwitchTellTarget(self, _no_object=None, _attributes={}, **_arguments): - """SwitchTellTarget: Makes an object the \xd2focus\xd3 of AppleEvents - Keyword argument to: reference to new focus of AppleEvents + def select(self, _object, _attributes={}, **_arguments): + """select: Sets the present selection + Required argument: object to select or container of sub-objects to select + Keyword argument data: sub-object(s) to select Keyword argument _attributes: AppleEvent attribute dictionary """ - _code = 'ppnt' - _subcode = 'sttg' + _code = 'misc' + _subcode = 'slct' - aetools.keysubst(_arguments, self._argmap_SwitchTellTarget) - if _no_object != None: raise TypeError, 'No direct arg expected' + aetools.keysubst(_arguments, self._argmap_select) + _arguments['----'] = _object _reply, _arguments, _attributes = self.send(_code, _subcode, diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py b/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py index 5878f9b..7a36509 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py @@ -16,31 +16,6 @@ class Text_Events(Text_Suite_Events): pass -class text(aetools.ComponentItem): - """text - independent text view objects """ - want = 'ctxt' -class updateLevel(aetools.NProperty): - """updateLevel - updating level. Can only be incremented or decremented. Do so only in a try block -- if the level is greater than zero, visual text updating will cease. """ - which = 'pUpL' - want = 'long' -class beginning(aetools.NProperty): - """beginning - Beginning of element """ - which = 'bgng' - want = 'obj ' -class end(aetools.NProperty): - """end - Ending of element """ - which = 'end ' - want = 'obj ' -class infront(aetools.NProperty): - """infront - Immediately before element """ - which = 'pBef' - want = 'obj ' -class justbehind(aetools.NProperty): - """justbehind - Immediately after element """ - which = 'pAft' - want = 'obj ' -# element 'stys' as ['indx', 'name'] - class styleset(aetools.ComponentItem): """styleset - A style \xd2set\xd3 that may be used repeatedly in text objects. """ want = 'stys' @@ -70,17 +45,31 @@ class style(aetools.NProperty): want = 'tsty' stylesets = styleset -text._superclassnames = [] -text._privpropdict = { - 'updateLevel' : updateLevel, - 'beginning' : beginning, - 'end' : end, - 'infront' : infront, - 'justbehind' : justbehind, -} -text._privelemdict = { - 'styleset' : styleset, -} + +class text(aetools.ComponentItem): + """text - independent text view objects """ + want = 'ctxt' +class updateLevel(aetools.NProperty): + """updateLevel - updating level. Can only be incremented or decremented. Do so only in a try block -- if the level is greater than zero, visual text updating will cease. """ + which = 'pUpL' + want = 'long' +class beginning(aetools.NProperty): + """beginning - Beginning of element """ + which = 'bgng' + want = 'obj ' +class end(aetools.NProperty): + """end - Ending of element """ + which = 'end ' + want = 'obj ' +class infront(aetools.NProperty): + """infront - Immediately before element """ + which = 'pBef' + want = 'obj ' +class justbehind(aetools.NProperty): + """justbehind - Immediately after element """ + which = 'pAft' + want = 'obj ' +# element 'stys' as ['indx', 'name'] styleset._superclassnames = [] styleset._privpropdict = { 'name' : name, @@ -92,27 +81,38 @@ styleset._privpropdict = { } styleset._privelemdict = { } +text._superclassnames = [] +text._privpropdict = { + 'updateLevel' : updateLevel, + 'beginning' : beginning, + 'end' : end, + 'infront' : infront, + 'justbehind' : justbehind, +} +text._privelemdict = { + 'styleset' : styleset, +} # # Indices of types declared in this module # _classdeclarations = { - 'ctxt' : text, 'stys' : styleset, + 'ctxt' : text, } _propdeclarations = { - 'pBef' : infront, + 'ptsz' : size, 'bgng' : beginning, 'colr' : color, 'txst' : style, 'psct' : writing_code, 'pAft' : justbehind, + 'font' : font, 'end ' : end, - 'ptsz' : size, 'pUpL' : updateLevel, 'pnam' : name, - 'font' : font, + 'pBef' : infront, } _compdeclarations = { diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py b/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py index a5e5cc6..5b70464 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/WorldWideWeb_suite.py @@ -78,32 +78,6 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_parse_anchor = { - 'relative_to' : 'RELA', - } - - def parse_anchor(self, _object, _attributes={}, **_arguments): - """parse anchor: Resolves the relative URL - Required argument: Main URL - Keyword argument relative_to: Relative URL - Keyword argument _attributes: AppleEvent attribute dictionary - Returns: Parsed URL - """ - _code = 'WWW!' - _subcode = 'PRSA' - - aetools.keysubst(_arguments, self._argmap_parse_anchor) - _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['----'] - _argmap_cancel_progress = { 'in_window' : 'WIND', } @@ -150,13 +124,14 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def webActivate(self, _object=None, _attributes={}, **_arguments): - """webActivate: Makes Netscape the frontmost application, and selects a given window. This event is here for suite completeness/ cross-platform compatibility only, you should use standard AppleEvents instead. - Required argument: window to bring to front + def get_window_info(self, _object=None, _attributes={}, **_arguments): + """get window info: Returns the information about the window as a list. Currently the list contains the window title and the URL. You can get the same information using standard Apple Event GetProperty. + Required argument: window ID Keyword argument _attributes: AppleEvent attribute dictionary + Returns: undocumented, typecode 'list' """ _code = 'WWW!' - _subcode = 'ACTV' + _subcode = 'WNFO' if _arguments: raise TypeError, 'No optional args expected' _arguments['----'] = _object @@ -190,16 +165,21 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def get_window_info(self, _object=None, _attributes={}, **_arguments): - """get window info: Returns the information about the window as a list. Currently the list contains the window title and the URL. You can get the same information using standard Apple Event GetProperty. - Required argument: window ID + _argmap_parse_anchor = { + 'relative_to' : 'RELA', + } + + def parse_anchor(self, _object, _attributes={}, **_arguments): + """parse anchor: Resolves the relative URL + Required argument: Main URL + Keyword argument relative_to: Relative URL Keyword argument _attributes: AppleEvent attribute dictionary - Returns: undocumented, typecode 'list' + Returns: Parsed URL """ _code = 'WWW!' - _subcode = 'WNFO' + _subcode = 'PRSA' - if _arguments: raise TypeError, 'No optional args expected' + aetools.keysubst(_arguments, self._argmap_parse_anchor) _arguments['----'] = _object @@ -231,15 +211,21 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - def unregister_URL_echo(self, _object, _attributes={}, **_arguments): - """unregister URL echo: cancels URL echo - Required argument: application signature + _argmap_register_protocol = { + 'for_protocol' : 'PROT', + } + + def register_protocol(self, _object=None, _attributes={}, **_arguments): + """register protocol: Registers application as a \xd2handler\xd3 for this protocol with a given prefix. The handler will receive \xd2OpenURL\xd3, or if that fails, \xd2GetURL\xd3 event. + Required argument: Application sig + Keyword argument for_protocol: protocol prefix: \xd2finger:\xd3, \xd2file\xd3, Keyword argument _attributes: AppleEvent attribute dictionary + Returns: TRUE if registration has been successful """ _code = 'WWW!' - _subcode = 'UNRU' + _subcode = 'RGPR' - if _arguments: raise TypeError, 'No optional args expected' + aetools.keysubst(_arguments, self._argmap_register_protocol) _arguments['----'] = _object @@ -279,21 +265,21 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_unregister_viewer = { - 'MIME_type' : 'MIME', + _argmap_register_window_close = { + 'for_window' : 'WIND', } - def unregister_viewer(self, _object, _attributes={}, **_arguments): - """unregister viewer: Revert to the old way of handling this MIME type - Required argument: Application sig - Keyword argument MIME_type: MIME type to be unregistered + def register_window_close(self, _object=None, _attributes={}, **_arguments): + """register window close: Netscape will notify registered application when this window closes + Required argument: Application signature + Keyword argument for_window: window ID Keyword argument _attributes: AppleEvent attribute dictionary - Returns: TRUE if the event was successful + Returns: true if successful """ _code = 'WWW!' - _subcode = 'UNRV' + _subcode = 'RGWC' - aetools.keysubst(_arguments, self._argmap_unregister_viewer) + aetools.keysubst(_arguments, self._argmap_register_window_close) _arguments['----'] = _object @@ -305,21 +291,15 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_register_protocol = { - 'for_protocol' : 'PROT', - } - - def register_protocol(self, _object=None, _attributes={}, **_arguments): - """register protocol: Registers application as a \xd2handler\xd3 for this protocol with a given prefix. The handler will receive \xd2OpenURL\xd3, or if that fails, \xd2GetURL\xd3 event. - Required argument: Application sig - Keyword argument for_protocol: protocol prefix: \xd2finger:\xd3, \xd2file\xd3, + def unregister_URL_echo(self, _object, _attributes={}, **_arguments): + """unregister URL echo: cancels URL echo + Required argument: application signature Keyword argument _attributes: AppleEvent attribute dictionary - Returns: TRUE if registration has been successful """ _code = 'WWW!' - _subcode = 'RGPR' + _subcode = 'UNRU' - aetools.keysubst(_arguments, self._argmap_register_protocol) + if _arguments: raise TypeError, 'No optional args expected' _arguments['----'] = _object @@ -357,21 +337,21 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] - _argmap_register_window_close = { - 'for_window' : 'WIND', + _argmap_unregister_viewer = { + 'MIME_type' : 'MIME', } - def register_window_close(self, _object=None, _attributes={}, **_arguments): - """register window close: Netscape will notify registered application when this window closes - Required argument: Application signature - Keyword argument for_window: window ID + def unregister_viewer(self, _object, _attributes={}, **_arguments): + """unregister viewer: Revert to the old way of handling this MIME type + Required argument: Application sig + Keyword argument MIME_type: MIME type to be unregistered Keyword argument _attributes: AppleEvent attribute dictionary - Returns: true if successful + Returns: TRUE if the event was successful """ _code = 'WWW!' - _subcode = 'RGWC' + _subcode = 'UNRV' - aetools.keysubst(_arguments, self._argmap_register_window_close) + aetools.keysubst(_arguments, self._argmap_unregister_viewer) _arguments['----'] = _object @@ -409,6 +389,26 @@ class WorldWideWeb_suite_Events: if _arguments.has_key('----'): return _arguments['----'] + def webActivate(self, _object=None, _attributes={}, **_arguments): + """webActivate: Makes Netscape the frontmost application, and selects a given window. This event is here for suite completeness/ cross-platform compatibility only, you should use standard AppleEvents instead. + Required argument: window to bring to front + Keyword argument _attributes: AppleEvent attribute dictionary + """ + _code = 'WWW!' + _subcode = 'ACTV' + + if _arguments: raise TypeError, 'No optional args expected' + _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['----'] + # # Indices of types declared in this module diff --git a/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py b/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py index 42902c6..67240d4 100644 --- a/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py +++ b/Lib/plat-mac/lib-scriptpackages/Netscape/__init__.py @@ -4,44 +4,44 @@ Resource aete resid 0 """ import aetools Error = aetools.Error -import Required_suite import Standard_Suite import Standard_URL_suite -import WorldWideWeb_suite import Mozilla_suite -import PowerPlant import Text +import WorldWideWeb_suite +import PowerPlant +import Required_suite _code_to_module = { - 'reqd' : Required_suite, 'CoRe' : Standard_Suite, 'GURL' : Standard_URL_suite, - 'WWW!' : WorldWideWeb_suite, 'MOSS' : Mozilla_suite, - 'ppnt' : PowerPlant, 'TEXT' : Text, + 'WWW!' : WorldWideWeb_suite, + 'ppnt' : PowerPlant, + 'reqd' : Required_suite, } _code_to_fullname = { - 'reqd' : ('Netscape.Required_suite', 'Required_suite'), 'CoRe' : ('Netscape.Standard_Suite', 'Standard_Suite'), 'GURL' : ('Netscape.Standard_URL_suite', 'Standard_URL_suite'), - 'WWW!' : ('Netscape.WorldWideWeb_suite', 'WorldWideWeb_suite'), 'MOSS' : ('Netscape.Mozilla_suite', 'Mozilla_suite'), - 'ppnt' : ('Netscape.PowerPlant', 'PowerPlant'), 'TEXT' : ('Netscape.Text', 'Text'), + 'WWW!' : ('Netscape.WorldWideWeb_suite', 'WorldWideWeb_suite'), + 'ppnt' : ('Netscape.PowerPlant', 'PowerPlant'), + 'reqd' : ('Netscape.Required_suite', 'Required_suite'), } -from Required_suite import * from Standard_Suite import * from Standard_URL_suite import * -from WorldWideWeb_suite import * from Mozilla_suite import * -from PowerPlant import * from Text import * +from WorldWideWeb_suite import * +from PowerPlant import * +from Required_suite import * def getbaseclasses(v): if not getattr(v, '_propdict', None): @@ -62,8 +62,6 @@ import StdSuites # getbaseclasses(window) getbaseclasses(application) -getbaseclasses(text) -getbaseclasses(styleset) getbaseclasses(StdSuites.Text_Suite.paragraph) getbaseclasses(StdSuites.Text_Suite.character) getbaseclasses(StdSuites.Text_Suite.text_style_info) @@ -71,6 +69,8 @@ getbaseclasses(StdSuites.Text_Suite.word) getbaseclasses(StdSuites.Text_Suite.text_flow) getbaseclasses(StdSuites.Text_Suite.line) getbaseclasses(StdSuites.Text_Suite.text) +getbaseclasses(text) +getbaseclasses(styleset) # # Indices of types declared in this module @@ -78,8 +78,6 @@ getbaseclasses(StdSuites.Text_Suite.text) _classdeclarations = { 'cwin' : window, 'capp' : application, - 'ctxt' : text, - 'stys' : styleset, 'cpar' : StdSuites.Text_Suite.paragraph, 'cha ' : StdSuites.Text_Suite.character, 'tsty' : StdSuites.Text_Suite.text_style_info, @@ -87,16 +85,18 @@ _classdeclarations = { 'cflo' : StdSuites.Text_Suite.text_flow, 'clin' : StdSuites.Text_Suite.line, 'ctxt' : StdSuites.Text_Suite.text, + 'ctxt' : text, + 'stys' : styleset, } -class Netscape(Required_suite_Events, - Standard_Suite_Events, +class Netscape(Standard_Suite_Events, Standard_URL_suite_Events, - WorldWideWeb_suite_Events, Mozilla_suite_Events, - PowerPlant_Events, Text_Events, + WorldWideWeb_suite_Events, + PowerPlant_Events, + Required_suite_Events, aetools.TalkTo): _signature = 'MOSS' |