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 <romjerome@yahoo.fr> wrote:
Hi,


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).

32a33
> #from gen.display.name import displayer as name_displayer
74a76
>         pprivate = fprivate = mprivate = 0
76a79
>         #private = []
117a121,143
>         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 = self.link(str(name), '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
>
146a173,176
>         self.link("%s:" % _("Private individuals"),
>                   'Filter', 'private people')
>         self.append_text(" %s" % pprivate)
>         self.append_text("\n")
156a187,190
>         self.link("%s:" % _("Private families"),
>                   'Filter', 'private families')
>         self.append_text(" %s" % fprivate)
>         self.append_text("\n")
171d204
<
178c211,215
<         self.append_text(" %s\n" % len(notfound))
---
>         self.append_text(" %s" % len(notfound))
>         self.append_text("\n")
>         self.link("%s:" % _("Private media objects"),
>                   'Filter', 'private media objects')
>         self.append_text(" %s\n" % mprivate)


Regards,
Jérôme




------------------------------------------------------------------------------
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.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Gramps-devel mailing list
Gramps-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-devel