widgets: ensure types on class_init

This will avoid GtkBuilder crashing because it couldn't
find the correct type for a given widget.
This commit is contained in:
Georges Basile Stavracas Neto
2017-09-20 19:14:15 -03:00
parent c232aaff69
commit b9310a84a3
4 changed files with 17 additions and 1 deletions
+2
View File
@@ -189,6 +189,8 @@ gcal_date_selector_class_init (GcalDateSelectorClass *klass)
GtkEntryClass *entry_class = GTK_ENTRY_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_ensure (GCAL_TYPE_DATE_CHOOSER);
object_class->finalize = gcal_date_selector_finalize;
object_class->get_property = gcal_date_selector_get_property;
object_class->set_property = gcal_date_selector_set_property;