[PATCH] Minor tweaks to comprehensive ancestors reports

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Minor tweaks to comprehensive ancestors reports

Tim Allen
Attached is a patch which addresses a couple of my whinges the other day
about the comprehensive ancestors report. I think that making trivial
changes to reports is as good a way as any to introduce oneself to the
source code base. The changes are:

- iff the option to start generations on a new page is selected, the
sources list will also start on a new page

- for people without photos, we leave the photo box completely blank, no
text, no ugly black rectangles

I expect the first to be a no-brainer, but perhaps the second may invite
debate, since the initial author of this report (was it Tim Waugh?)
presumably thought that ugly black rectangles all over the report was a
feature, not a bug. Ugliness is in the eye of the beholder, so I'm quite
willing to discuss the subject and possibly modify my patch if required.

I've done all my testing of the changes with the pdf output option -
please let me know if the other options have other subtleties that I've
overlooked.

Tim


Index: src/plugins/Ancestors.py
===================================================================
RCS file: /cvsroot/gramps/gramps2/src/plugins/Ancestors.py,v
retrieving revision 1.78.2.2
diff -u -3 -r1.78.2.2 Ancestors.py
--- src/plugins/Ancestors.py 21 Jul 2005 00:23:19 -0000 1.78.2.2
+++ src/plugins/Ancestors.py 21 Aug 2005 10:28:55 -0000
@@ -120,10 +120,6 @@
 
         cell = BaseDoc.TableCellStyle ()
         cell.set_padding (0.1)
-        cell.set_left_border (1)
-        cell.set_top_border (1)
-        cell.set_right_border (1)
-        cell.set_bottom_border (1)
         self.doc.add_cell_style ("AR-NoPhoto", cell)
 
         cell = BaseDoc.TableCellStyle ()
@@ -155,6 +151,9 @@
                              [self.start_person.get_handle()])
 
         if len (self.sources) > 0:
+    if self.pgbrk:
+                self.doc.page_break()
+
             self.doc.start_paragraph ("AR-Heading")
             self.doc.write_text (_("Sources"))
             self.doc.end_paragraph ()
@@ -396,7 +395,6 @@
                 if len (photos) == 0:
                     ret.append ((self.doc.start_cell, ["AR-NoPhoto"]))
                     ret.append ((self.doc.start_paragraph, ["AR-NoPhotoText"]))
-                    ret.append ((self.doc.write_text, [_("(no photo)")]))
                     ret.append ((self.doc.end_paragraph, []))
                     ret.append ((self.doc.end_cell, []))
                 else:
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Minor tweaks to comprehensive ancestors reports

Alex Roitman
Tim,

On Sun, 2005-08-21 at 20:45 +1000, Tim Allen wrote:
> Attached is a patch which addresses a couple of my whinges the other day
> about the comprehensive ancestors report. I think that making trivial
> changes to reports is as good a way as any to introduce oneself to the
> source code base. The changes are:
>
> - iff the option to start generations on a new page is selected, the
> sources list will also start on a new page

This makes perfect sense. I will commit it shortly, thanks.

> - for people without photos, we leave the photo box completely blank, no
> text, no ugly black rectangles
>
> I expect the first to be a no-brainer, but perhaps the second may invite
> debate, since the initial author of this report (was it Tim Waugh?)
> presumably thought that ugly black rectangles all over the report was a
> feature, not a bug. Ugliness is in the eye of the beholder, so I'm quite
> willing to discuss the subject and possibly modify my patch if required.

Here I have no opinion. Definitely, Tim Waugh placed the boxes and
the No Photo text on purpose, not by accident. As to what's the correct
thing to do here -- I don't know. I can see both sides of the argument.
Perhaps the best thing is to make them user-adjustable options. Does
this make sense? Would you like to tackle this? I can help you in that.

Alex

--
Alexander Roitman   http://www.gramps-project.org

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Minor tweaks to comprehensive ancestors reports

Tim Waugh
On Wed, Sep 21, 2005 at 07:23:54PM -0700, Alexander Roitman wrote:

> > - for people without photos, we leave the photo box completely blank, no
> > text, no ugly black rectangles
> >
> > I expect the first to be a no-brainer, but perhaps the second may invite
> > debate, since the initial author of this report (was it Tim Waugh?)
> > presumably thought that ugly black rectangles all over the report was a
> > feature, not a bug. Ugliness is in the eye of the beholder, so I'm quite
> > willing to discuss the subject and possibly modify my patch if required.
>
> Here I have no opinion. Definitely, Tim Waugh placed the boxes and
> the No Photo text on purpose, not by accident. As to what's the correct
> thing to do here -- I don't know. I can see both sides of the argument.
> Perhaps the best thing is to make them user-adjustable options. Does
> this make sense? Would you like to tackle this? I can help you in that.
If there are no rectangles, it just looks like a ridiculous amount of
indent for the text, and so it doesn't flow right.

Tim.
*/

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Minor tweaks to comprehensive ancestors reports

Julio Sánchez-2
2005/9/22, Tim Waugh <[hidden email]>:
>
> If there are no rectangles, it just looks like a ridiculous amount of
> indent for the text, and so it doesn't flow right.

The problem with this report for me is that, in my tree, most people
lived before photography was invented and portraits were rare.

So, even if I like this report a lot, the result is very weird.

Julio


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel