[libadwaita/wip/chergert/type-ensure-from-class-init: 1/2] tab: ensure types from class init
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/chergert/type-ensure-from-class-init: 1/2] tab: ensure types from class init
- Date: Sun, 19 Dec 2021 22:49:52 +0000 (UTC)
commit a98d68b191f0cec01041ca79a3fa0a46e56a28b8
Author: Christian Hergert <chergert redhat com>
Date: Sun Dec 19 14:49:15 2021 -0800
tab: ensure types from class init
These only need to be run once from class init.
src/adw-tab-bar.c | 4 ++--
src/adw-tab.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/adw-tab-bar.c b/src/adw-tab-bar.c
index 276776fe..c52ee983 100644
--- a/src/adw-tab-bar.c
+++ b/src/adw-tab-bar.c
@@ -612,6 +612,8 @@ adw_tab_bar_class_init (AdwTabBarClass *klass)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, "tabbar");
+
+ g_type_ensure (ADW_TYPE_TAB_BOX);
}
static void
@@ -621,8 +623,6 @@ adw_tab_bar_init (AdwTabBar *self)
self->autohide = TRUE;
- g_type_ensure (ADW_TYPE_TAB_BOX);
-
gtk_widget_init_template (GTK_WIDGET (self));
adj = gtk_scrolled_window_get_hadjustment (self->scrolled_window);
diff --git a/src/adw-tab.c b/src/adw-tab.c
index 9c1c55df..d135ce03 100644
--- a/src/adw-tab.c
+++ b/src/adw-tab.c
@@ -826,6 +826,8 @@ adw_tab_class_init (AdwTabClass *klass)
gtk_widget_class_add_binding (widget_class, GDK_KEY_KP_Enter, 0, (GtkShortcutFunc) activate_cb, NULL);
gtk_widget_class_set_css_name (widget_class, "tab");
+
+ g_type_ensure (ADW_TYPE_FADING_LABEL);
}
static void
@@ -833,8 +835,6 @@ adw_tab_init (AdwTab *self)
{
AdwAnimationTarget *target;
- g_type_ensure (ADW_TYPE_FADING_LABEL);
-
gtk_widget_init_template (GTK_WIDGET (self));
target = adw_callback_animation_target_new ((AdwAnimationTargetFunc)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]