Re: patch for drawing left frame in usage row bars

Maurice van der Pot <griffon26-bCGDfOjggl9Wk0Htik3J/[email protected]> Sun, 31 Aug 2008 18:24:12 +0200
Newsgroups gmane.comp.gnome.apps.planner.devel
Message-ID <[email protected]>
On Mon, Aug 25, 2008 at 03:38:20AM +0100, Lee Baylis wrote:
> My first planner patch - whilst tinkering around in planner-usage-row.c I 
> found a FIXME line which was near to what I happened to be playing with, so 
> I have fixed it.

I have reviewed the problem and the patch and I think that the reason
the problem was introduced is that two independent conditions (whether
the left side was at the start date and whether the right side was at
the end date) were forced into one enum.

I'd rather prefer to undo this initial decision, by for instance passing
two booleans to usage_row_draw_resource_ival() or using a bitmask
instead of an enum, instead of extending the enum with a ROW_WHOLE value
and complicating the conditions of if statements in
usage_row_draw_resource_ival() and usage_row_draw_resource().


By the way, I disagree with the other FIXME that is present near the
part of the code you changed:

        /* FIXME: This should be changed to draw the rectangle frame in one
         * piece, then fill the different colors.
         */

The shadow of the bars differs depending on whether it is at the start,
middle or end, so the information required for drawing the frame is
already present in usage_row_draw_resource_ival(). I see no reason for
moving frame drawing out of this function, so I'm fine with it if you
remove the FIXME comment.


Regards,
Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   [email protected]    http://www.gentoo.org
Gnome Planner Developer  griffon26-bCGDfOjggl9Wk0Htik3J/[email protected]  http://live.gnome.org/Planner

_______________________________________________
Planner-dev-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/planner-dev-list
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAki6xawACgkQMGnpIbeahxx99gCgi8lXkh4D8O5FnL7ovGvI8wFx
N38AoL/OJbM5Mk+44ADBzMVLy/U5qu1K
=D7YC
-----END PGP SIGNATURE-----