clapper-gtk: Ensure private types before template init

We need to ensure types that are not part of public API, otherwise GtkBuilder will fail to use them
(e81aad25a1/gtk/glade/README.glade (L15)).
This commit is contained in:
Rafał Dzięgiel
2024-06-16 14:51:50 +02:00
parent 4118f98e3a
commit 7cd0d3782d
2 changed files with 8 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
#include <clapper/clapper.h>
#include "clapper-gtk-extra-menu-button.h"
#include "clapper-gtk-stream-check-button-private.h"
#include "clapper-gtk-utils-private.h"
#define PERCENTAGE_ROUND(a) (round ((gdouble) a / 0.01) * 0.01)
@@ -453,6 +454,9 @@ clapper_gtk_extra_menu_button_init (ClapperGtkExtraMenuButton *self)
{ "open-subtitle-stream", open_subtitle_stream, NULL, NULL, NULL },
};
/* Ensure private types */
g_type_ensure (CLAPPER_GTK_TYPE_STREAM_CHECK_BUTTON);
gtk_widget_init_template (GTK_WIDGET (self));
self->action_group = g_simple_action_group_new ();

View File

@@ -1384,6 +1384,10 @@ clapper_gtk_video_init (ClapperGtkVideo *self)
self->touch_fade_delay = DEFAULT_TOUCH_FADE_DELAY;
self->auto_inhibit = DEFAULT_AUTO_INHIBIT;
/* Ensure private types */
g_type_ensure (CLAPPER_GTK_TYPE_STATUS);
g_type_ensure (CLAPPER_GTK_TYPE_BUFFERING_ANIMATION);
gtk_widget_init_template (GTK_WIDGET (self));
gtk_gesture_group (self->touch_gesture, self->click_gesture);