Re: [Patch] migrate print objects to new scheme

Peter Bloomfield <[email protected]> Sat, 29 Jun 2019 16:43:53 -0400
Newsgroups gmane.comp.gnome.apps.balsa
Message-ID <[email protected]>
Hi Albrecht,

On 06/29/2019 08:23:11 AM Sat, Albrecht Dreß wrote:
> Hi all,
> 
> attached is a larger patch which migrates the various print objects to the modern GObject scheme using G_DECLARE_*_TYPE() and G_DEFINE_TYPE().  The main difficulty was the elimination of the direct access to the internal fields of BalsaPrintObject, i.e. the surrounding rectangle of the respective object, the page number and the logical depth.  I added setters/getters for this purpose, which required some refactoring in the derived classes.  However, IMO the result is actually cleaner…
> 
> Affected files are:
> src/balsa-print-object-decor.[ch], src/balsa-print-object-default.[ch], src/balsa-print-object-header.[ch], src/balsa-print-object-html.[ch], src/balsa-print-object-image.[ch], src/balsa-print-object-text.[ch], src/balsa-print-object.[ch], src/print-gtk.c
> 
> Opinions?
> 
> Best,
> Albrecht.

Looks great--thanks for the efforts!

I agree: the discipline imposed by this scheme requires the drudgery of implementing and using accessors, but it usually does clarify the interactions among objects.

Pushed to GitLab.

Best,

Peter

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQS030wPRfNNA5alz3MfX9S1uSp09QUCXRfNiQAKCRAfX9S1uSp0
9dKFAKCCayuGYfmS51cHl523aKOBWxPF9wCeL25QFypXUP8CtPPC4v7omjZU9m4=
=ySwR
-----END PGP SIGNATURE-----