Allow Unicode characters in string prefs, including sync username
This commit is contained in:
parent
e7710660ef
commit
8444a4d8b4
2 changed files with 8 additions and 3 deletions
|
@ -31,7 +31,7 @@
|
|||
helpTopic="sync">
|
||||
<preferences>
|
||||
<preference id="pref-sync-autosync" name="extensions.zotero.sync.autoSync" type="bool"/>
|
||||
<preference id="pref-sync-username" name="extensions.zotero.sync.server.username" type="string" instantApply="true"/>
|
||||
<preference id="pref-sync-username" name="extensions.zotero.sync.server.username" type="unichar" instantApply="true"/>
|
||||
<preference id="pref-sync-fulltext-enabled" name="extensions.zotero.sync.fulltext.enabled" type="bool"/>
|
||||
<preference id="pref-storage-enabled" name="extensions.zotero.sync.storage.enabled" type="bool"/>
|
||||
<preference id="pref-storage-protocol" name="extensions.zotero.sync.storage.protocol" type="string"
|
||||
|
|
|
@ -2184,7 +2184,10 @@ Zotero.Prefs = new function(){
|
|||
case this.prefBranch.PREF_BOOL:
|
||||
return this.prefBranch.setBoolPref(pref, value);
|
||||
case this.prefBranch.PREF_STRING:
|
||||
return this.prefBranch.setCharPref(pref, value);
|
||||
let str = Cc["@mozilla.org/supports-string;1"]
|
||||
.createInstance(Ci.nsISupportsString);
|
||||
str.data = value;
|
||||
return this.prefBranch.setComplexValue(pref, Ci.nsISupportsString, str);
|
||||
case this.prefBranch.PREF_INT:
|
||||
return this.prefBranch.setIntPref(pref, value);
|
||||
|
||||
|
@ -2205,7 +2208,9 @@ Zotero.Prefs = new function(){
|
|||
throw ("Invalid preference value '" + value + "' for pref '" + pref + "'");
|
||||
}
|
||||
}
|
||||
catch (e){
|
||||
catch (e) {
|
||||
Components.utils.reportError(e);
|
||||
Zotero.debug(e, 1);
|
||||
throw ("Invalid preference '" + pref + "'");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue