vkczyz / forager

A simple RSS feed reader
https://czyz.xyz/projects/forager/
GNU General Public License v3.0
0 stars 0 forks source link

Hook up UI signals from Glade file #5

Open vkczyz opened 3 years ago

vkczyz commented 3 years ago

The recent move to XML for the interface #4 has removed all the object initialisation code, but I've kept the signals. There appears to be a way to assign a callback in the XML file itself, but I haven't figured out how to do that yet.

vkczyz commented 3 years ago

This would be the method to use

https://docs.rs/gtk/0.14.0/gtk/prelude/trait.BuilderExtManual.html#tymethod.connect_signals

Although I gave it a test run, I am unsure how to pass extra data to the callback functions; I would rather not regenerate the whole builder every time the user touches something.