Bug 349225 - Added content handlers are not retained by feeds pane. patch by mconnor, r=gavin.
git-svn-id: svn://10.0.0.236/trunk@211850 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2399e7e0f2
commit
b7da62bcb8
@ -557,12 +557,30 @@ var WebContentConverterRegistrar = {
|
||||
* corresponding to the content handler to be registered
|
||||
*/
|
||||
_registerContentHandlerWithBranch: function(branch) {
|
||||
var type = branch.getCharPref("type");
|
||||
var uri = branch.getComplexValue("uri", Ci.nsIPrefLocalizedString).data;
|
||||
var title = branch.getComplexValue("title", Ci.nsIPrefLocalizedString).data;
|
||||
this._registerContentHandler(type, uri, title);
|
||||
/**
|
||||
* Since we support up to six predefined readers, we need to handle gaps
|
||||
* better, since the first branch with user-added values will be .6
|
||||
*
|
||||
* How we deal with that is to check to see if there's no prefs in the
|
||||
* branch and stop cycling once that's true. This doesn't fix the case
|
||||
* where a user manually removes a reader, but that's not supported yet!
|
||||
*/
|
||||
var vals = branch.getChildList("", {});
|
||||
if (vals.length == 0)
|
||||
return;
|
||||
|
||||
try {
|
||||
var type = branch.getCharPref("type");
|
||||
var uri = branch.getComplexValue("uri", Ci.nsIPrefLocalizedString).data;
|
||||
var title = branch.getComplexValue("title",
|
||||
Ci.nsIPrefLocalizedString).data;
|
||||
this._registerContentHandler(type, uri, title);
|
||||
}
|
||||
catch(ex) {
|
||||
// do nothing, the next branch might have values
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Load the auto handler, content handler and protocol tables from
|
||||
* preferences.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user