GNOME Bugzilla – Bug 701048
GcrCertificateWidget: inherit from GtkBin, not GtkWidget
Last modified: 2019-02-22 11:59:32 UTC
We use GtkContainer methods, and we have one child. This is a ABI break, but avoiding it would mean duplicating all GtkBin code and some of GtkContainer in GcrCertificateWidget, and probably it would break anyway, because modern Gtk assumes that all widgets with children are containers.
Created attachment 245332 [details] [review] GcrCertificateWidget: inherit from GtkBin, not GtkWidget
Interesting. What is the use case that caused this to be a problem for you? FWIW, I didn't want people to get too intimate with the implementation of a GcrCertificateWidget (its currently uses a GtkTextView) because it may need to change in the future.
I got a crash in empathy-auth-client, when it called gtk_widget_realize on the certificate widget, because the has_window flag is not unset. After fixing that, I got an empty widget, and I saw that the child is not really added to the widget. I don't know if there were criticals, it's a dbus activated service on which I attached gdb.
I agree. Thanks for the fix. The Gcr ABI is not yet stable, and I don't think anyone has derived from this widget, so lets push this into git master. Attachment 245332 [details] pushed as cb3320b - GcrCertificateWidget: inherit from GtkBin, not GtkWidget
*** Bug 702740 has been marked as a duplicate of this bug. ***