Add accesskeys to spelling dialogs, b=112732, r=neil@parwaycc.co.uk, sr=hewitt

git-svn-id: svn://10.0.0.236/trunk@120479 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cmanske%netscape.com
2002-05-01 23:05:29 +00:00
parent f347f0f70b
commit cbbf6d1614
5 changed files with 72 additions and 27 deletions

View File

@@ -40,26 +40,35 @@
<columns><column style="width: 15em" flex="1"/><column flex="1"/></columns>
<rows>
<row>
<label value="&wordEditField.label;"/>
<label value="&wordEditField.label;"
control="WordInput"
accesskey="&wordEditField.accessKey;"/>
<spacer/>
</row>
<row>
<textbox id="WordInput" flex="1"/>
<button id="AddWord" oncommand="AddWord()" label="&AddButton.label;"/>
<button id="AddWord" oncommand="AddWord()" label="&AddButton.label;"
accesskey="&AddButton.accessKey;"/>
</row>
<row>
<label value="&DictionaryList.label;"/>
<label value="&DictionaryList.label;"
control="DictionaryList"
accesskey="&DictionaryList.accessKey;"/>
<spacer/>
</row>
<row>
<listbox rows="8" id="DictionaryList" flex="1"/>
<vbox flex="1">
<button id="ReplaceWord" oncommand="ReplaceWord()" label="&ReplaceButton.label;"/>
<button id="ReplaceWord" oncommand="ReplaceWord()" label="&ReplaceButton.label;"
accesskey="&ReplaceButton.accessKey;"/>
<spacer class="spacer"/>
<button id="RemoveWord" oncommand="RemoveWord()" label="&RemoveButton.label;"/>
<button id="RemoveWord" oncommand="RemoveWord()" label="&RemoveButton.label;"
accesskey="&RemoveButton.accessKey;"/>
<spacer class="spacer"/>
<spacer flex="1"/>
<button dlgtype="cancel" class="exit-dialog" id="close" label="&CloseButton.label;" default="true" oncommand="onClose();"/>
<button dlgtype="cancel" class="exit-dialog" id="close" label="&CloseButton.label;"
default="true" oncommand="onClose();"
accesskey="&CloseButton.accessKey;"/>
</vbox>
</row>
</rows>

View File

@@ -93,15 +93,17 @@ function Startup()
return;
}
// "Close" button becomes "Send"
gDialog.CloseButton.setAttribute("label", GetString("Send"));
// Hide "Close" button and use "Send" instead
gDialog.CloseButton.hidden = true;
gDialog.CloseButton = document.getElementById("Send");
gDialog.CloseButton.hidden = false;
}
else
{
// Normal spell checking - hide the "Stop" button
// (Note that this button is the "Cancel" button for
// Esc keybinding and related window close actions)
gDialog.StopButton.setAttribute("hidden", "true");
gDialog.StopButton.hidden = true;
}
// Clear flag that determines message when

View File

@@ -52,16 +52,22 @@
<row align="center">
<label id="MisspelledWordLabel" value="&misspelledWord.label;"/>
<label class="bold" id="MisspelledWord"/>
<button class="spell-check" label="&recheckButton.label;" oncommand="Recheck();"/>
<button class="spell-check" label="&recheckButton.label;" oncommand="Recheck();"
accesskey="&recheckButton.accessKey;"/>
</row>
<row align="center">
<label id="ReplaceWordLabel" value="&wordEditField.label;"/>
<label id="ReplaceWordLabel" value="&wordEditField.label;"
control="ReplaceWordInput"
accesskey="&wordEditField.accessKey;"/>
<textbox id="ReplaceWordInput" oninput="ChangeReplaceWord()" flex="1"/>
<button id="CheckWord" oncommand="CheckWord()" label="&checkwordButton.label;"/>
<button id="CheckWord" oncommand="CheckWord()" label="&checkwordButton.label;"
accesskey="&checkwordButton.accessKey;"/>
</row>
</rows>
</grid>
<label id="SuggestedListLabel" value="&suggestions.label;"/>
<label id="SuggestedListLabel" value="&suggestions.label;"
control="SuggestedList"
accesskey="&suggestions.accessKey;"/>
<grid>
<columns><column/><column/></columns>
<rows>
@@ -73,27 +79,32 @@
<columns><column class="spell-check" flex="1"/><column class="spell-check" flex="1"/></columns>
<rows>
<row>
<button id="Replace" oncommand="Replace();" label="&replaceButton.label;"/>
<button id="Ignore" oncommand="Ignore();" label="&ignoreButton.label;"/>
<button id="Replace" oncommand="Replace();" label="&replaceButton.label;"
accesskey="&replaceButton.accessKey;"/>
<button id="Ignore" oncommand="Ignore();" label="&ignoreButton.label;"
accesskey="&ignoreButton.accessKey;"/>
</row>
<row>
<button id="ReplaceAll" oncommand="ReplaceAll();" label="&replaceAllButton.label;"/>
<button id="IgnoreAll" oncommand="IgnoreAll();" label="&ignoreAllButton.label;"/>
<button id="ReplaceAll" oncommand="ReplaceAll();" label="&replaceAllButton.label;"
accesskey="&replaceAllButton.accessKey;"/>
<button id="IgnoreAll" oncommand="IgnoreAll();" label="&ignoreAllButton.label;"
accesskey="&ignoreAllButton.accessKey;"/>
</row>
</rows>
</grid>
<spacer flex="1"/>
<label value="&userDictionary.label;"/>
<hbox flex="1" align="start">
<button class="spell-check" id="AddToDictionary" oncommand="AddToDictionary()" label="&addToUserDictionaryButton.label;" />
<button class="spell-check" id="EditDictionary" oncommand="EditDictionary()" label="&editUserDictionaryButton.label;" />
<button class="spell-check" id="AddToDictionary" oncommand="AddToDictionary()" label="&addToUserDictionaryButton.label;"
accesskey="&addToUserDictionaryButton.accessKey;"/>
<button class="spell-check" id="EditDictionary" oncommand="EditDictionary()" label="&editUserDictionaryButton.label;"
accesskey="&editUserDictionaryButton.accessKey;"/>
</hbox>
</vbox>
</row>
<row>
<label value ="&languagePopup.label;"/>
<spacer/>
</row>
<label value ="&languagePopup.label;"
control="LanguageMenulist"
accesskey="&languagePopup.accessKey;"/>
<row>
<menulist id="LanguageMenulist" oncommand="SelectLanguage()">
<menupopup>
@@ -103,9 +114,13 @@
</menupopup>
</menulist>
<hbox flex="1">
<button class="spell-check" dlgtype="cancel" id="Stop" label="&stopButton.label;" oncommand="CancelSpellCheck();"/>
<button class="spell-check" dlgtype="cancel" id="Stop" label="&stopButton.label;" oncommand="CancelSpellCheck();"
accesskey="&stopButton.accessKey;"/>
<spacer flex="1"/>
<button class="spell-check" id="Close" label="&closeButton.label;" oncommand="onClose();"/>
<button class="spell-check" id="Close" label="&closeButton.label;" oncommand="onClose();"
accesskey="&closeButton.accessKey;"/>
<button class="spell-check" id="Send" label="&sendButton.label;" oncommand="onClose();"
accesskey="&sendButton.accessKey;" hidden="true"/>
</hbox>
</row>
</rows>

View File

@@ -24,9 +24,15 @@
<!ENTITY windowTitle.label "Personal Dictionary">
<!ENTITY wordEditField.label "New word:">
<!ENTITY wordEditField.accessKey "N">
<!ENTITY AddButton.label "Add">
<!ENTITY AddButton.accessKey "A">
<!ENTITY DictionaryList.label "Words in dictionary:">
<!ENTITY DictionaryList.accessKey "W">
<!ENTITY ReplaceButton.label "Replace">
<!ENTITY ReplaceButton.accessKey "R">
<!ENTITY RemoveButton.label "Remove">
<!ENTITY RemoveButton.accessKey "e">
<!ENTITY CloseButton.label "Close">
<!ENTITY CloseButton.accessKey "C">

View File

@@ -25,19 +25,32 @@
<!ENTITY misspelledWord.label "Misspelled word:">
<!ENTITY wordEditField.label "Replace with:">
<!ENTITY wordEditField.accessKey "w">
<!ENTITY checkwordButton.label "Check Word">
<!ENTITY checkwordButton.accessKey "k">
<!ENTITY suggestions.label "Suggestions:">
<!ENTITY suggestions.accessKey "u">
<!ENTITY ignoreButton.label "Ignore">
<!ENTITY ignoreButton.accessKey "I">
<!ENTITY ignoreAllButton.label "Ignore All">
<!ENTITY ignoreAllButton.accessKey "n">
<!ENTITY replaceButton.label "Replace">
<!ENTITY replaceButton.accessKey "R">
<!ENTITY replaceAllButton.label "Replace All">
<!ENTITY replaceAllButton.accessKey "A">
<!ENTITY stopButton.label "Stop">
<!ENTITY stopButton.accessKey "t">
<!ENTITY userDictionary.label "Personal Dictionary:">
<!ENTITY moreDictionaries.label "Download More">
<!ENTITY addToUserDictionaryButton.label "Add Word">
<!ENTITY addToUserDictionaryButton.accessKey "d">
<!ENTITY editUserDictionaryButton.label "Edit...">
<!ENTITY editUserDictionaryButton.accessKey "E">
<!ENTITY recheckButton.label "Recheck Page">
<!ENTITY recheckButton.accessKey "P">
<!ENTITY closeButton.label "Close">
<!ENTITY closeButton.accessKey "C">
<!ENTITY sendButton.label "Send">
<!ENTITY sendButton.accessKey "S">
<!ENTITY languagePopup.label "Language:">
<!ENTITY languagePopup.accessKey "L">