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
+9 -1
View File
@@ -1457,11 +1457,19 @@ gcal_window_state_event (GtkWidget *widget,
}
static void
gcal_window_class_init(GcalWindowClass *klass)
gcal_window_class_init (GcalWindowClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
g_type_ensure (GCAL_TYPE_EDIT_DIALOG);
g_type_ensure (GCAL_TYPE_MONTH_VIEW);
g_type_ensure (GCAL_TYPE_QUICK_ADD_POPOVER);
g_type_ensure (GCAL_TYPE_SEARCH_VIEW);
g_type_ensure (GCAL_TYPE_SOURCE_DIALOG);
g_type_ensure (GCAL_TYPE_WEEK_VIEW);
g_type_ensure (GCAL_TYPE_YEAR_VIEW);
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gcal_window_finalize;
object_class->set_property = gcal_window_set_property;