mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-31 08:12:28 +01:00
Only show "Waiting..." message if wed otherwise show items (should maybe do the same for context.message); prefix window functions with "window."; general cleanup.
This commit is contained in:
@@ -281,6 +281,16 @@ Option.prototype = {
|
||||
return "E474: Invalid argument: " + values;
|
||||
this.setValues(newValue, scope);
|
||||
}
|
||||
};
|
||||
// TODO: Run this by default?
|
||||
Option.validateCompleter = function (values)
|
||||
{
|
||||
let context = CompletionContext("");
|
||||
let res = this.completer(context);
|
||||
if (!res)
|
||||
res = context.allItems.map(function (item) [item.text]);
|
||||
return Array.concat(values).every(
|
||||
function (value) res.some(function (item) item[0] == value));
|
||||
}; //}}}
|
||||
|
||||
function Options() //{{{
|
||||
@@ -504,7 +514,7 @@ function Options() //{{{
|
||||
}
|
||||
else
|
||||
{
|
||||
openPreferences();
|
||||
window.openPreferences();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -942,17 +952,6 @@ function Options() //{{{
|
||||
return ret;
|
||||
},
|
||||
|
||||
// TODO: Run this by default?
|
||||
validateCompleter: function (values)
|
||||
{
|
||||
let context = CompletionContext("");
|
||||
let res = this.completer(context);
|
||||
if (!res)
|
||||
res = context.allItems.map(function (item) [item.text]);
|
||||
return Array.concat(values).every(
|
||||
function (value) res.some(function (item) item[0] == value));
|
||||
},
|
||||
|
||||
get store() storage.options,
|
||||
|
||||
getPref: function (name, forcedDefault)
|
||||
|
||||
Reference in New Issue
Block a user