mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-12 14:25:44 +01:00
changed setCharPref to allow localized strings
This commit is contained in:
1
Donators
1
Donators
@@ -3,6 +3,7 @@
|
|||||||
Also drop me a note, if you want the donated amount to be displayed.
|
Also drop me a note, if you want the donated amount to be displayed.
|
||||||
|
|
||||||
2008:
|
2008:
|
||||||
|
* Luc St-Louis
|
||||||
* Robert Meerman
|
* Robert Meerman
|
||||||
* Silvio Di Stefano
|
* Silvio Di Stefano
|
||||||
* Lance Feagan
|
* Lance Feagan
|
||||||
|
|||||||
@@ -1047,7 +1047,7 @@ liberator.CommandLine = function () //{{{
|
|||||||
if (liberator.mode != liberator.modes.COMMAND_LINE)
|
if (liberator.mode != liberator.modes.COMMAND_LINE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
completionList.setItems(compl, -1);
|
completionList.setItems(compl);
|
||||||
|
|
||||||
if (completionIndex >= 0 && completionIndex < compl.length && completionIndex < completions.length)
|
if (completionIndex >= 0 && completionIndex < compl.length && completionIndex < completions.length)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,6 +52,14 @@ function getCharPref(name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setCharPref(name, value)
|
||||||
|
{
|
||||||
|
var str = Components.classes['@mozilla.org/supports-string;1']
|
||||||
|
.createInstance(Components.interfaces.nsISupportsString);
|
||||||
|
str.data = value;
|
||||||
|
return prefService.setComplexValue(name, Components.interfaces.nsISupportsString, str);
|
||||||
|
}
|
||||||
|
|
||||||
function loadPref(name, store, type)
|
function loadPref(name, store, type)
|
||||||
{
|
{
|
||||||
if (store)
|
if (store)
|
||||||
@@ -65,7 +73,7 @@ function loadPref(name, store, type)
|
|||||||
function savePref(obj)
|
function savePref(obj)
|
||||||
{
|
{
|
||||||
if (obj.store)
|
if (obj.store)
|
||||||
prefService.setCharPref(obj.name, obj.serial)
|
setCharPref(obj.name, obj.serial)
|
||||||
}
|
}
|
||||||
|
|
||||||
var prototype = {
|
var prototype = {
|
||||||
|
|||||||
Reference in New Issue
Block a user