Added spellchecker support for different dictionaries/languages:

mozilla\editor\base\nsEditorShell.cpp
    mozilla\editor\idl\nsIEditorSpellCheck.idl
    mozilla\editor\txtsvc\public\nsISpellChecker.h

      - Added GetDictionaryList() and Get/SetCurrentDictionary() methods.

    mozilla\editor\ui\dialogs\content\EdDialogCommon.js

      - Added AppendValueAndDataToMenulist() function.

    mozilla\editor\ui\dialogs\content\EdSpellCheck.xul

      - We now import strres.js.

    mozilla\editor\ui\dialogs\content\EdSpellCheck.js

      - Added InitLanguageMenu().


git-svn-id: svn://10.0.0.236/trunk@68236 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kin%netscape.com
2000-05-04 14:37:56 +00:00
parent eddcbafbde
commit 4285edb03b
8 changed files with 359 additions and 13 deletions

View File

@@ -354,6 +354,35 @@ function AppendStringToMenulist(menulist, string)
return null;
}
function AppendValueAndDataToMenulist(menulist, valueStr, dataStr)
{
if (menulist)
{
var menupopup = menulist.firstChild;
// May not have any popup yet -- so create one
if (!menupopup)
{
menupopup = document.createElement("menupopup");
if (menupopup)
menulist.appendChild(menupopup);
else
{
dump("Failed to create menupoup\n");
return null;
}
}
menuItem = document.createElement("menuitem");
if (menuItem)
{
menuItem.setAttribute("value", valueStr);
menuItem.setAttribute("data", dataStr);
menupopup.appendChild(menuItem);
return menuItem;
}
}
return null;
}
function ClearMenulist(menulist)
{
// There is usually not more than 1 menupopup under a menulist,