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
Attachment:
pgpgeLKPJl7m5.pgp
Description: PGP signature