mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 556644 - 5. Enumerate prefs in the omnijar, r=bsmedberg a=blocking2.0
This commit is contained in:
parent
d83c01b1fa
commit
f90f4f45dd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user