mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 19:22:25 +01:00
And completion.preference.
This commit is contained in:
@@ -1394,7 +1394,14 @@ function Completion() //{{{
|
|||||||
context.completions = completions;
|
context.completions = completions;
|
||||||
},
|
},
|
||||||
|
|
||||||
preference: function preference(filter) commands.get("set").completer(filter, true), // XXX
|
preference: function preference(context)
|
||||||
|
{
|
||||||
|
let prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
|
.getService(Components.interfaces.nsIPrefBranch);
|
||||||
|
context.title = ["Firefox Preference", "Value"];
|
||||||
|
context.keys = { text: function (item) item.item, description: function (item) options.getPref(item.item) };
|
||||||
|
context.completions = prefs.getChildList("", { value: 0 });
|
||||||
|
},
|
||||||
|
|
||||||
search: function search(context, noSuggest)
|
search: function search(context, noSuggest)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -678,11 +678,7 @@ function Options() //{{{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
return completion.preference(context);
|
||||||
.getService(Components.interfaces.nsIPrefBranch);
|
|
||||||
context.keys = { text: function (pref) pref.item, description: function (pref) options.getPref(pref.item) };
|
|
||||||
context.completions = prefs.getChildList("", { value: 0 });
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let opt = options.parseOpt(filter, modifiers);
|
let opt = options.parseOpt(filter, modifiers);
|
||||||
|
|||||||
Reference in New Issue
Block a user