1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 11:17:58 +01:00

Add 'spelllang'. Closes issue #530.

This commit is contained in:
Kris Maglione
2011-08-06 08:47:36 -04:00
parent 4958d6854f
commit d828a53b7a
5 changed files with 30 additions and 0 deletions

View File

@@ -855,6 +855,21 @@ var Editor = Module("editor", {
options.add(["insertmode", "im"], options.add(["insertmode", "im"],
"Enter Insert mode rather than Text Edit mode when focusing text areas", "Enter Insert mode rather than Text Edit mode when focusing text areas",
"boolean", true); "boolean", true);
options.add(["spelllang", "spl"],
"The language used by the spell checker",
"string", config.locale,
{
initValue: function () {},
getter: function getter() services.spell.dictionary || "",
setter: function setter(val) { services.spell.dictionary = val; },
completer: function completer(context) {
let res = {};
services.spell.getDictionaryList(res, {});
context.completions = res.value;
context.keys = { text: util.identity, description: util.identity };
}
});
} }
}); });

View File

@@ -1326,6 +1326,16 @@
</description> </description>
</item> </item>
<item>
<tags>'spl' 'spelllang'</tags>
<spec>'spelllang'</spec>
<type>&option.spelllang.type;</type>
<default>&option.spelllang.default;</default>
<description short="true">
<p>The language used by the spell checker.</p>
</description>
</item>
<item> <item>
<tags>'ss' 'sanitizeshutdown'</tags> <tags>'ss' 'sanitizeshutdown'</tags>
<spec>'sanitizeshutdown' 'ss'</spec> <spec>'sanitizeshutdown' 'ss'</spec>

View File

@@ -57,6 +57,9 @@ var Option = Class("Option", {
if (Set.has(this.modules.config.defaults, this.name)) if (Set.has(this.modules.config.defaults, this.name))
defaultValue = this.modules.config.defaults[this.name]; defaultValue = this.modules.config.defaults[this.name];
if (defaultValue == null && this.getter)
defaultValue = this.getter();
if (defaultValue !== undefined) { if (defaultValue !== undefined) {
if (this.type === "string") if (this.type === "string")
defaultValue = Commands.quote(defaultValue); defaultValue = Commands.quote(defaultValue);

View File

@@ -57,6 +57,7 @@ var Services = Module("Services", {
this.add("runtime", "@mozilla.org/xre/runtime;1", ["nsIXULAppInfo", "nsIXULRuntime"]); this.add("runtime", "@mozilla.org/xre/runtime;1", ["nsIXULAppInfo", "nsIXULRuntime"]);
this.add("rdf", "@mozilla.org/rdf/rdf-service;1", "nsIRDFService"); this.add("rdf", "@mozilla.org/rdf/rdf-service;1", "nsIRDFService");
this.add("sessionStore", "@mozilla.org/browser/sessionstore;1", "nsISessionStore"); this.add("sessionStore", "@mozilla.org/browser/sessionstore;1", "nsISessionStore");
this.add("spell", "@mozilla.org/spellchecker/engine;1", "mozISpellCheckingEngine");
this.add("stringBundle", "@mozilla.org/intl/stringbundle;1", "nsIStringBundleService"); this.add("stringBundle", "@mozilla.org/intl/stringbundle;1", "nsIStringBundleService");
this.add("stylesheet", "@mozilla.org/content/style-sheet-service;1", "nsIStyleSheetService"); this.add("stylesheet", "@mozilla.org/content/style-sheet-service;1", "nsIStyleSheetService");
this.add("subscriptLoader", "@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader"); this.add("subscriptLoader", "@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader");

View File

@@ -201,6 +201,7 @@
- Added 'passunknown' option. [b7] - Added 'passunknown' option. [b7]
- Changed 'urlseparator' default value to "|". [b3] - Changed 'urlseparator' default value to "|". [b3]
- Added "passwords" and "venkman" dialogs to :dialog. [b2] - Added "passwords" and "venkman" dialogs to :dialog. [b2]
- Added 'spelllang' option. [b8]
- Make 'showmode' a [stringlist] option. [b7] - Make 'showmode' a [stringlist] option. [b7]
- Added 'wildanchor' option. [b2] - Added 'wildanchor' option. [b2]
• Added BookmarkChange, BookmarkRemove autocommands. [b2] • Added BookmarkChange, BookmarkRemove autocommands. [b2]