Skip to content

Refactor widget classes to use Gtk.Template.Child() #4

@ggalan87

Description

@ggalan87

As shown in https://belmoussaoui.com/article/5-how-to-create-a-gtk-application-using-python-part-1 widget children can be found by reflection using Gtk.Template.Child() , rather than traversal of the tree using the utility function that is used here:

self._message = utils.get_descendant(self, 'message_textview', 0)

We should refactor the code as such.

PS: Thnx to @aggalex who mentioned such syntax in his fosscomm presentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions