Fix bug 201257 -- clean up use of nsIControllerCommandManager by editor:

Renaming nsIControllerCommandManager to nsIControllerCommandTable to reduce confusion.
Moving the immutability flag from the nsBaseCommandController to the nsControllerCommandTable.
Renaming the 'refcon' on nsIControllerContext to 'context', and giving nsIControllerContext an Init() method that optionally takes a command table.
Fixing the editor and composer module code to create pre-filled nsIControllerCommandTables as services, and the controller constructors to create singleton command tables with do_GetService.
r=brade, sr=alecf.


git-svn-id: svn://10.0.0.236/trunk@140988 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sfraser%netscape.com
2003-04-10 18:44:03 +00:00
parent 2fa80f2084
commit 4a0df27c9c
24 changed files with 562 additions and 623 deletions

View File

@@ -189,7 +189,7 @@ nsCommandManager::IsCommandSupported(const char *aCommandName,
NS_ENSURE_ARG_POINTER(outCommandSupported);
nsCOMPtr<nsIController> controller;
nsresult rv = GetControllerForCommand(aCommandName, aTargetWindow, getter_AddRefs(controller));
GetControllerForCommand(aCommandName, aTargetWindow, getter_AddRefs(controller));
*outCommandSupported = (controller.get() != nsnull);
return NS_OK;
}
@@ -206,7 +206,7 @@ nsCommandManager::IsCommandEnabled(const char *aCommandName,
PRBool commandEnabled = PR_FALSE;
nsCOMPtr<nsIController> controller;
nsresult rv = GetControllerForCommand(aCommandName, aTargetWindow, getter_AddRefs(controller));
GetControllerForCommand(aCommandName, aTargetWindow, getter_AddRefs(controller));
if (controller)
{
controller->IsCommandEnabled(aCommandName, &commandEnabled);