Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ggalan87 opened this issue Nov 22, 2020 · 1 comment
Open

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

ggalan87 opened this issue Nov 22, 2020 · 1 comment

Comments

@ggalan87
Copy link
Member

ggalan87 commented Nov 22, 2020

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

@aggalex
Copy link

aggalex commented Dec 14, 2020

I feel flattered :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants