Dear Jerome:

Are you going to create this into a gramplet or may I have a go at it?

Sincerely yours,
Rob G. Healey

On Tue, Oct 5, 2010 at 1:20 AM, jerome <> wrote:

Looking at a previous bug report, I remembering a gramplet for matching private records. Useful for tracking down something wrong with private records.

It could be useful for some users: how to know what are my current private records ?
New exporter provides an 'experimental' user interface, but I think this may also be added on StatsGramplet.

I do not generated the filters by name matching private records because it is a try and I do not like to re-use the same code for multiple objects. I guess there is something like factory ?
To use 'object' as a generic primary object.

I also do not fully understand why yield is not more used, not for code optimisation, just for graphical effect !!!
To display data as coming rather than a empty page and a wait message.

Here, the simple try|draft for (displaying) all private persons, families, media object (without active filters by name).

> #from import displayer as name_displayer
>         pprivate = fprivate = mprivate = 0
>         #private = []
>         plist = self.dbstate.db.get_person_handles()
>         for handle in plist:
>             person = self.dbstate.db.get_person_from_handle(handle)
>             #name = name_displayer.display(person)
>             if person.private:
>                 yield True
>                 #value = name
>                 #entry =, 'Person', str(handle))
>                 #private.append(entry)
>                 pprivate += 1
>         flist = self.dbstate.db.get_family_handles()
>         for handle in flist:
>             family = self.dbstate.db.get_family_from_handle(handle)
>             if family.private:
>                 yield True
>                 fprivate += 1
>         mlist = self.dbstate.db.get_media_object_handles()
>         for handle in mlist:
>             media = self.dbstate.db.get_object_from_handle(handle)
>             if media.private:
>                 yield True
>                 mprivate += 1
>"%s:" % _("Private individuals"),
>                   'Filter', 'private people')
>         self.append_text(" %s" % pprivate)
>         self.append_text("\n")
>"%s:" % _("Private families"),
>                   'Filter', 'private families')
>         self.append_text(" %s" % fprivate)
>         self.append_text("\n")
<         self.append_text(" %s\n" % len(notfound))
>         self.append_text(" %s" % len(notfound))
>         self.append_text("\n")
>"%s:" % _("Private media objects"),
>                   'Filter', 'private media objects')
>         self.append_text(" %s\n" % mprivate)


Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
Gramps-devel mailing list