I would like to make it so that passing "*" as the parent to
nsIPref::EnumerateChildren() causes the callback to be called for all
prefs. This is a trivial change and I've implemented it with this diff.
Since mozilla.org appears to be down at the moment, I haven't filed a
bug, but I'll do so.
Here's the diff:
--- nsPref.cpp Wed Dec 13 15:05:54 2000
+++ nsPref.orig.cpp Wed Dec 13 15:04:52 2000
@@ -1307,8 +1307,7 @@
pref_enumChild(PLHashEntry *he, int i, void *arg)
{
EnumerateData *d = (EnumerateData *) arg;
- if (PL_strcmp((char *) d->parent, "*") == 0 ||
- PL_strncmp((char*)he->key, d->parent, PL_strlen(d->parent)) ==
0) {
+ if (PL_strncmp((char*)he->key, d->parent, PL_strlen(d->parent)) ==
0) {
d->pref_list->AppendElement((void *)he->key);
}
return HT_ENUMERATE_NEXT;
What do ya'll think? Is there another way to have a callback be called
for each pref?
This would make life easier for me in developing the new webclient
Preferences interface.
Ed
Sent via Deja.com
http://www.deja.com/