I’m running into a problem using the new GtkColorDialogButton and GtkFontDialogButton widgets in Rust. The buttons appear in my preferences dialog correctly, but when clicked give the following error messages.
Can you share how you’re constructing these buttons?
I’ve seen this sort of error when I used a builder, and gave ‘inconsistent’ arguments to it. The arguments were inconsistent in that GTK was expecting a field to be a particular pointer, because I’d given another builder function a different pointer, but I set that (first) field to a pointer different to what it was expecting.
The only other parts that might be relevant are that I’m also binding the selected font to some items in a gio::Settings object. I was planning to do the same with the color settings but didn’t get that far, as it’s no use to me until I can make the new widgets actually work.
For future reference, if anyone else encounters this, I just added an object for each FontDialog or ColorDialog corresponding to their respective buttons to my ui template, and then bound them using the “dialog” property on those buttons. The deprecated widgets automatically constructed those dialogs for you, while the new apparently expect you to explicitly do so. Not really a problem now that I know, it’s just not the behavior I expected.