diff options
-rw-r--r-- | src/gl-application.c | 6 | ||||
-rw-r--r-- | src/gl-window.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/gl-application.c b/src/gl-application.c index daaded4..d7082d8 100644 --- a/src/gl-application.c +++ b/src/gl-application.c @@ -196,12 +196,6 @@ gl_application_startup (GApplication *application) /* gtk_init() calls setlocale(), so gettext must be called after that. */ g_set_application_name (_(PACKAGE_NAME)); gtk_window_set_default_icon_name (PACKAGE_TARNAME); - - /* Must register custom types before using them from GtkBuilder. */ - gl_window_get_type (); - gl_category_list_get_type (); - gl_event_toolbar_get_type (); - gl_event_view_list_get_type (); } static void diff --git a/src/gl-window.c b/src/gl-window.c index b6dbee2..3b3716a 100644 --- a/src/gl-window.c +++ b/src/gl-window.c @@ -402,6 +402,13 @@ gl_window_init (GlWindow *window) gboolean ignore; GlJournalModel *model; + /* Ensure these types that are used by the template have been + * registered before calling gtk_widget_init_template(). + */ + g_type_ensure(GL_TYPE_CATEGORY_LIST); + g_type_ensure(GL_TYPE_EVENT_TOOLBAR); + g_type_ensure(GL_TYPE_EVENT_VIEW_LIST); + gtk_widget_init_template (GTK_WIDGET (window)); priv = gl_window_get_instance_private (window); |