[libhandy/wip/exalm/backports: 6/7] Ensure types from class init




commit 8544989ea63094c306df6417f7fc37e78308fadf
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Jan 18 17:59:01 2022 +0500

    Ensure types from class init
    
    See https://gitlab.gnome.org/GNOME/libadwaita/-/commit/0a2ae94384b8aa0b59936dbf7cdf6473e58634f1
    and https://gitlab.gnome.org/GNOME/libadwaita/-/commit/a98d68b191f0cec01041ca79a3fa0a46e56a28b8

 src/hdy-carousel.c | 3 ++-
 src/hdy-keypad.c   | 3 ++-
 src/hdy-tab-bar.c  | 4 ++--
 src/hdy-tab.c      | 4 ++--
 4 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/hdy-carousel.c b/src/hdy-carousel.c
index 62ec0585..a95f9bea 100644
--- a/src/hdy-carousel.c
+++ b/src/hdy-carousel.c
@@ -764,6 +764,8 @@ hdy_carousel_class_init (HdyCarouselClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, position_shifted_cb);
 
   gtk_widget_class_set_css_name (widget_class, "carousel");
+
+  g_type_ensure (HDY_TYPE_CAROUSEL_BOX);
 }
 
 static void
@@ -771,7 +773,6 @@ hdy_carousel_init (HdyCarousel *self)
 {
   self->allow_scroll_wheel = TRUE;
 
-  g_type_ensure (HDY_TYPE_CAROUSEL_BOX);
   gtk_widget_init_template (GTK_WIDGET (self));
 
   self->animation_duration = DEFAULT_DURATION;
diff --git a/src/hdy-keypad.c b/src/hdy-keypad.c
index 1d947ab1..f258fcf7 100644
--- a/src/hdy-keypad.c
+++ b/src/hdy-keypad.c
@@ -363,6 +363,8 @@ hdy_keypad_class_init (HdyKeypadClass *klass)
 
   gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_DIAL);
   gtk_widget_class_set_css_name (widget_class, "keypad");
+
+  g_type_ensure (HDY_TYPE_KEYPAD_BUTTON);
 }
 
 
@@ -376,7 +378,6 @@ hdy_keypad_init (HdyKeypad *self)
   priv->letters_visible = TRUE;
   priv->symbols_visible = TRUE;
 
-  g_type_ensure (HDY_TYPE_KEYPAD_BUTTON);
   gtk_widget_init_template (GTK_WIDGET (self));
 }
 
diff --git a/src/hdy-tab-bar.c b/src/hdy-tab-bar.c
index 2648c367..4ed912eb 100644
--- a/src/hdy-tab-bar.c
+++ b/src/hdy-tab-bar.c
@@ -706,6 +706,8 @@ hdy_tab_bar_class_init (HdyTabBarClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, extra_drag_data_received_cb);
 
   gtk_widget_class_set_css_name (widget_class, "tabbar");
+
+  g_type_ensure (HDY_TYPE_TAB_BOX);
 }
 
 static void
@@ -715,8 +717,6 @@ hdy_tab_bar_init (HdyTabBar *self)
 
   self->autohide = TRUE;
 
-  g_type_ensure (HDY_TYPE_TAB_BOX);
-
   gtk_widget_init_template (GTK_WIDGET (self));
 
   adj = gtk_scrolled_window_get_hadjustment (self->scrolled_window);
diff --git a/src/hdy-tab.c b/src/hdy-tab.c
index 2b117237..50db8fe5 100644
--- a/src/hdy-tab.c
+++ b/src/hdy-tab.c
@@ -965,13 +965,13 @@ hdy_tab_class_init (HdyTabClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, indicator_clicked_cb);
 
   gtk_widget_class_set_css_name (widget_class, "tab");
+
+  g_type_ensure (HDY_TYPE_FADING_LABEL);
 }
 
 static void
 hdy_tab_init (HdyTab *self)
 {
-  g_type_ensure (HDY_TYPE_FADING_LABEL);
-
   gtk_widget_init_template (GTK_WIDGET (self));
 
   self->gesture = gtk_gesture_drag_new (GTK_WIDGET (self));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]