зеркало из https://github.com/mozilla/pjs.git
Bug 556644 - 5. Enumerate prefs in the omnijar, r=bsmedberg a=blocking2.0
This commit is contained in:
Родитель
9e3e18da7b
Коммит
d78747d0be
|
@ -156,8 +156,6 @@ dist: FORCE
|
|||
$(NSINSTALL) -D dist/defaults
|
||||
rm -rf dist/defaults/*
|
||||
@(for f in $(DIST)/bin/defaults/* ; do $(NSINSTALL) $$f dist/defaults ; done )
|
||||
@(for PREF in $(DIST)/bin/defaults/pref/*.js ; do cat "$$PREF" >> dist/defaults/prefs.js ; echo >> dist/defaults/prefs.js ; done )
|
||||
rm -rf dist/defaults/pref
|
||||
@(for f in $(DIST_LINK_FILES) ; do if [ -e $(DIST)/bin/$$f ] ; then echo $$f ; ln -sf ../$(DIST)/bin/$$f dist ; fi ; done)
|
||||
|
||||
gecko-unsigned-unaligned.apk: gecko.ap_ classes.dex dist $(FULL_LIBS)
|
||||
|
|
|
@ -768,9 +768,22 @@ static nsresult pref_InitAppDefaultsFromOmnijar()
|
|||
rv = pref_ReadPrefFromJar(jarReader, "greprefs.js");
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = pref_ReadPrefFromJar(jarReader, "defaults/prefs.js");
|
||||
nsZipFind *findPtr;
|
||||
rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoPtr<nsZipFind> find(findPtr);
|
||||
|
||||
nsCAutoString prefName;
|
||||
const char *entryName;
|
||||
PRUint16 entryNameLen;
|
||||
while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
|
||||
prefName = nsDependentCSubstring(entryName, entryName + entryNameLen);
|
||||
rv = pref_ReadPrefFromJar(jarReader, prefName.get());
|
||||
if (NS_FAILED(rv))
|
||||
NS_WARNING("Error parsing preferences.");
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче